[SCM] Debian Qt/KDE packaging tools branch, improved-gensymbols, updated. debian/0.5.3-17-g9e83174

Modestas Vainius modax at alioth.debian.org
Sat Jan 9 18:17:41 UTC 2010


The following commit has been merged in the improved-gensymbols branch:
commit 9b54f1f05014387c6a52284167c52e58c4e53a15
Author: Modestas Vainius <modestas at vainius.eu>
Date:   Sat Jan 9 19:51:53 2010 +0200

    Add pkgkde-symbolshelper addon.
---
 Makefile                                           |    8 ++++-
 debian/changelog                                   |    1 +
 .../Debhelper/Sequence/pkgkde-symbolshelper.pm     |    9 +++++++
 symbolshelper/dh_pkgkde-symbolshelper              |   26 ++++++++++++++++++++
 4 files changed, 42 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 2da09ec..06ba9ca 100644
--- a/Makefile
+++ b/Makefile
@@ -11,12 +11,16 @@ build:
 	# Nothing do build
 
 install:
-	install -d $(BINDIR) $(MANDIR) $(MANDIR)/man1
+	install -d $(DATADIR) $(BINDIR) $(MANDIR) $(MANDIR)/man1
 	
 	# symbolshelper
 	cd $(SYMBOLSHELPER_DIR) && find Debian -type f -name "*.pm" -exec \
 	    install -D -m 0644 {} $(DESTDIR)/$(PERLLIBDIR)/{} \;
-	install -m 0755 $(SYMBOLSHELPER_DIR)/pkgkde-symbolshelper-basic $(DESTDIR)/usr/bin/pkgkde-symbolshelper	
+	install -m 0755 $(SYMBOLSHELPER_DIR)/pkgkde-symbolshelper-basic $(BINDIR)/pkgkde-symbolshelper
+	install -m 0755 $(SYMBOLSHELPER_DIR)/dh_pkgkde-symbolshelper $(DATADIR)
+	ln -sf /usr/share/pkg-kde-tools/dh_pkgkde-symbolshelper $(BINDIR)/dh_pkgkde-symbolshelper_generate
+	ln -sf /usr/share/pkg-kde-tools/dh_pkgkde-symbolshelper $(BINDIR)/dh_pkgkde-symbolshelper_clean
+	
 	# Improved Dpkg::Shlibs and dpkg-gensymbols
 	cd $(SYMBOLSHELPER_DIR) && find Dpkg -type f -name "*.pm" -exec \
 	    install -D -m 0644 {} $(DATADIR)/{} \;
diff --git a/debian/changelog b/debian/changelog
index ebd987d..357d84d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,7 @@ pkg-kde-tools (0.6.0~pre2) UNRELEASED; urgency=low
     (by adding /usr/share/pkg-kde-tools/bin to $PATH).
   * Use my @debian.org address in the Uploaders field.
   * Make cdbs/symbolshelper.mk add /usr/share/pkg-kde-tools/bin to $PATH.
+  * Add pkgkde-symbolshelper addon.
 
  -- Modestas Vainius <modestas at vainius.eu>  Sun, 06 Dec 2009 22:06:01 +0200
 
diff --git a/symbolshelper/Debian/Debhelper/Sequence/pkgkde-symbolshelper.pm b/symbolshelper/Debian/Debhelper/Sequence/pkgkde-symbolshelper.pm
new file mode 100644
index 0000000..2c20d7c
--- /dev/null
+++ b/symbolshelper/Debian/Debhelper/Sequence/pkgkde-symbolshelper.pm
@@ -0,0 +1,9 @@
+use constant PKGKDE_BINDIR => '/usr/share/pkg-kde-tools/bin';
+
+# Add /usr/share/pkg-kde-tools/bin to $PATH
+if (! grep { PKGKDE_BINDIR eq $_ } split(":", $ENV{PATH})) {
+    $ENV{PATH} = PKGKDE_BINDIR . ":" . $ENV{PATH};
+}
+
+insert_before("dh_makeshlibs", "dh_pkgkde-symbolshelper_generate");
+insert_after("dh_clean", "dh_pkgkde-symbolshelper_clean");
diff --git a/symbolshelper/dh_pkgkde-symbolshelper b/symbolshelper/dh_pkgkde-symbolshelper
new file mode 100755
index 0000000..8445235
--- /dev/null
+++ b/symbolshelper/dh_pkgkde-symbolshelper
@@ -0,0 +1,26 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+use Debian::Debhelper::Dh_Lib;
+
+init();
+
+foreach my $pkg (@{$dh{DOPACKAGES}}) {
+    my $infile = "debian/$pkg.symbols.in";
+    my $outfile = "debian/$pkg.symbols." . package_arch($pkg);
+
+    next if $pkg eq "all";
+
+    if ($0 =~ /_generate$/) {
+        if (-f $infile) {
+            doit('pkgkde-symbolshelper', 'symbolfile', '-p', $pkg, '-o', $outfile);
+        }
+    } elsif ($0 =~ /_clean$/) {
+        if (-f $outfile) {
+            doit("rm", "-f", $outfile);
+        }
+    } else {
+        error("invalid program execution");
+    }
+}

-- 
Debian Qt/KDE packaging tools



More information about the pkg-kde-commits mailing list