Control: tag -1 patch
-=| Niko Tyni, 25.06.2014 23:36:02 +0300 |=-
> Package: libpg-perl
> Version: 1:2.1.1-4
> Severity: important
> User: [email protected]
> Usertags: perl-5.20-transition
>
> Starting with version 5.20.0 (currently in experimental), the Debian
> perl package is changing the "vendorarch" library paths (currently
> /usr/lib/perl5) to include the multiarch triplet and the perl version. See
> #748380 for details.
>
> 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.
>
> This package fails to build with perl_5.20.0-1 from experimental:
>
> install -m 644 -D /«PKGBUILDDIR»/debian/libpg-perl/usr/lib/perl5/Pg.pm
> /«PKGBUILDDIR»/debian/libpg-perl/usr/share/perl5/Pg.pm
> install: cannot stat
> '/«PKGBUILDDIR»/debian/libpg-perl/usr/lib/perl5/Pg.pm': No such file or
> directory
> make: *** [binary-arch] Error 1
> debian/rules:31: recipe for target 'binary-arch' failed
Please find a patch that uses $Config{vendorarch} for finding the
right directory where arch-specific files are installed.
Cheers,
dam
diff --git a/debian/rules b/debian/rules
index 2e327d4..150b153 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,6 +5,7 @@
HERE=$(shell pwd)
LIB=$(HERE)/debian/libpg-perl
+VENDORARCH := $(shell perl -MConfig -e'print substr($$Config{vendorarch},1)')
ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CONFFLAGS:= OPTIMIZE="-O3 -g"
@@ -32,7 +33,7 @@ binary-arch: build-stamp
dh_testroot
$(MAKE) DESTDIR=$(LIB) pure_vendor_install
- install -m 644 -D $(LIB)/usr/lib/perl5/Pg.pm $(LIB)/usr/share/perl5/Pg.pm
+ install -m 644 -D $(LIB)/$(VENDORARCH)/Pg.pm $(LIB)/usr/share/perl5/Pg.pm
# install general Debian files
dh_installdocs -a README