Control: tag -1 + patch

On Sun, 22 Jun 2014 23:01:41 +0300, Niko Tyni wrote:

> > For this to work, packages containing binary perl modules need to migrate
> > from using the hardcoded /usr/lib/perl5 directory to the value of the
> > $Config{vendorarch} variable, as defined in the 'Config' module.

Attached is a patch that uses $Config{vendorarch} in d/rules and
debian/gbrowse-calign.dirs.

Cheers,
gregor

-- 
 .''`.  Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer  -  http://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Peter Ratzenbeck: Unterwegs / Bye Bye Melk
Index: debian/changelog
===================================================================
--- debian/changelog	(revision 17380)
+++ debian/changelog	(working copy)
@@ -1,3 +1,14 @@
+gbrowse (2.54+dfsg-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Don't hardcode /usr/lib/perl5:
+    - debian/rules: use $Config{vendorarch}
+    - debian/gbrowse-calign.dirs: use $Config{vendorarch} and make executable
+    - debian/compat: bump to 9
+  Closes: #752345
+
+ -- gregor herrmann <gre...@debian.org>  Mon, 30 Jun 2014 23:07:52 +0200
+
 gbrowse (2.54+dfsg-2) unstable; urgency=low
 
   * Transition to apache 2.4 (Closes: #669830).
Index: debian/compat
===================================================================
--- debian/compat	(revision 17380)
+++ debian/compat	(working copy)
@@ -1 +1 @@
-8
+9
Index: debian/gbrowse-calign.dirs
===================================================================
--- debian/gbrowse-calign.dirs	(revision 17380)
+++ debian/gbrowse-calign.dirs	(working copy)
@@ -1,2 +1,9 @@
-usr/lib/perl5/auto/Bio/Graphics/Browser2/CAlign
-usr/lib/perl5/Bio/Graphics/Browser2/
+#!/usr/bin/perl -w
+
+use Config;
+
+my $vendorarch = substr($Config{vendorarch}, 1);
+
+print "$vendorarch/auto/Bio/Graphics/Browser2/CAlign\n";
+print "$vendorarch/Bio/Graphics/Browser2/\n";
+
Index: debian/rules
===================================================================
--- debian/rules	(revision 17380)
+++ debian/rules	(working copy)
@@ -1,6 +1,7 @@
 #!/usr/bin/make -f
 
 GBROWSE_BUILD_OPTIONS = --conf=/etc/gbrowse --htdocs=/usr/share/gbrowse/htdocs --tmp=/var/cache/gbrowse --databases=/var/lib/gbrowse/databases --cgibin=/usr/lib/cgi-bin/gbrowse --www-user=www-data --registration_done=1 --persistent=/var/lib/gbrowse
+ARCHLIB := $(shell perl -MConfig -e 'print $$Config{vendorarch}')
 
 %: 
 	dh $@ --with apache2
@@ -8,6 +9,11 @@
 override_dh_auto_configure:
 	dh_auto_configure -- $(GBROWSE_BUILD_OPTIONS)
 
+override_dh_installdirs:
+	# svn(-buildpackage) seems to ignore the x bit
+	chmod +x debian/gbrowse-calign.dirs
+	dh_installdirs
+
 override_dh_auto_install:
 	./Build  --install_base=debian/gbrowse debianinstall
 	#./Build   apache_conf > debian/gbrowse/etc/gbrowse/gbrowse_apache2.conf
@@ -15,8 +21,8 @@
 	./Build  --install_base=debian/gbrowse install_slave
 	mv debian/gbrowse/lib/perl5/* debian/gbrowse/usr/share/perl5
 	# Remove arch dependant data
-	mv debian/gbrowse/usr/share/perl5/auto/Bio/Graphics/Browser2/CAlign/* debian/gbrowse-calign/usr/lib/perl5/auto/Bio/Graphics/Browser2/CAlign/
-	mv debian/gbrowse/usr/share/perl5/Bio/Graphics/Browser2/CAlign.pm debian/gbrowse-calign/usr/lib/perl5/Bio/Graphics/Browser2/CAlign.pm
+	mv debian/gbrowse/usr/share/perl5/auto/Bio/Graphics/Browser2/CAlign/* debian/gbrowse-calign$(ARCHLIB)/auto/Bio/Graphics/Browser2/CAlign/
+	mv debian/gbrowse/usr/share/perl5/Bio/Graphics/Browser2/CAlign.pm debian/gbrowse-calign$(ARCHLIB)/Bio/Graphics/Browser2/CAlign.pm
 	rm -rf debian/gbrowse/lib
 	rm -f debian/gbrowse/usr/share/doc/gbrowse/INSTALL
 	rm -f debian/gbrowse/usr/share/perl5/auto/GBrowse/.packlist

Attachment: signature.asc
Description: Digital Signature

Reply via email to