Control: tag -1 + patch On Thu, 26 Jun 2014 20:41:55 +0300, Niko Tyni wrote:
> This package fails to build with perl_5.20.0-1 from experimental:
>
> # Fix the messed up paths
> #
> cd /«PKGBUILDDIR»/debian/libprima-perl && \
> mkdir -p usr/share/doc/prima usr/lib/perl5 usr/share/perl5/Prima/VB
> && \
> mv local/lib/perl/*/Prima/*.pod usr/share/perl5/Prima/
> && \
> mv local/lib/perl/*/Prima/*.gif usr/share/perl5/Prima/
> && \
> mv local/lib/perl/*/Prima/VB/*.gif usr/share/perl5/Prima/VB/
> && \
> mv local/lib/perl/*/* usr/lib/perl5/
> && \
> mv bin usr/
> && \
> mv usr/lib/perl5/man usr/share/
> && \
> mv usr/lib/perl5/Prima/tutorial usr/share/doc/prima/
> && \
> mv usr/lib/perl5/Prima/examples usr/share/doc/prima/
> && \
> mv usr/lib/perl5/Prima/VB/examples usr/share/doc/prima/examples/VB
> mv: cannot stat 'local/lib/perl/*/Prima/*.pod': No such file or directory
> make: *** [install] Error 1
> debian/rules:54: recipe for target 'install' failed
> dpkg-buildpackage: error: fakeroot debian/rules binary-arch gave error exit
> status 2
>
> (I see that Makefile.PL is, despite the name, not based on
> ExtUtils::MakeMaker but rather a custom implementation, and sadly
> doesn't support INSTALLDIRS=vendor. Wow.)
Heh, this Makefile.PL is really 'wow'.
Recommended for reading :)
Anyway, here's a patch the uses both $Config{vendorarch} and
$Config{sitearch} in debian/rules to dynamically get the directories
for moving stuff around in debian/rules.
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: Supertramp: My Kind Of Lady
diff -u prima-1.28/debian/changelog prima-1.28/debian/changelog
--- prima-1.28/debian/changelog
+++ prima-1.28/debian/changelog
@@ -1,3 +1,13 @@
+prima (1.28-1.3) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Fix "hardcodes /usr/lib/perl5":
+ use $Config{vendorarch} and $Config{sitearch} in debian/rules
+ to get correct paths for moving files around at build time.
+ (Closes: #752805)
+
+ -- gregor herrmann <[email protected]> Sun, 06 Jul 2014 18:53:27 +0200
+
prima (1.28-1.2) unstable; urgency=medium
* Non-maintainer upload. Announced with this bug: (Closes: #734974)
diff -u prima-1.28/debian/rules prima-1.28/debian/rules
--- prima-1.28/debian/rules
+++ prima-1.28/debian/rules
@@ -1,6 +1,8 @@
#!/usr/bin/make -f
DEST = $(CURDIR)/debian/libprima-perl
+VENDORARCH := $(shell perl -MConfig -e 'print substr($$Config{vendorarch}, 1)')
+SITEARCH := $(shell perl -MConfig -e 'print substr($$Config{sitearch}, 5)')
ifneq ($(findstring parallel=,$(DEB_BUILD_OPTIONS)),)
PARALLEL = -j$(subst parallel=,,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
@@ -64,21 +66,21 @@
# Fix the messed up paths
#
cd $(DEST) && \
- mkdir -p usr/share/doc/prima usr/lib/perl5 usr/share/perl5/Prima/VB && \
- mv local/lib/perl/*/Prima/*.pod usr/share/perl5/Prima/ && \
- mv local/lib/perl/*/Prima/*.gif usr/share/perl5/Prima/ && \
- mv local/lib/perl/*/Prima/VB/*.gif usr/share/perl5/Prima/VB/ && \
- mv local/lib/perl/*/* usr/lib/perl5/ && \
+ mkdir -p usr/share/doc/prima $(VENDORARCH) usr/share/perl5/Prima/VB && \
+ mv $(SITEARCH)/Prima/*.pod usr/share/perl5/Prima/ && \
+ mv $(SITEARCH)/Prima/*.gif usr/share/perl5/Prima/ && \
+ mv $(SITEARCH)/Prima/VB/*.gif usr/share/perl5/Prima/VB/ && \
+ mv $(SITEARCH)/* $(VENDORARCH)/ && \
mv bin usr/ && \
- mv usr/lib/perl5/man usr/share/ && \
- mv usr/lib/perl5/Prima/tutorial usr/share/doc/prima/ && \
- mv usr/lib/perl5/Prima/examples usr/share/doc/prima/ && \
- mv usr/lib/perl5/Prima/VB/examples usr/share/doc/prima/examples/VB
+ mv $(VENDORARCH)/man usr/share/ && \
+ mv $(VENDORARCH)/Prima/tutorial usr/share/doc/prima/ && \
+ mv $(VENDORARCH)/Prima/examples usr/share/doc/prima/ && \
+ mv $(VENDORARCH)/Prima/VB/examples usr/share/doc/prima/examples/VB
cd $(DEST) && \
- rmdir local/lib/perl/* local/lib/perl local/lib/ local/ && \
- rm usr/lib/perl5/auto/Prima/.packlist && \
- rm -r usr/lib/perl5/Prima/sys/win32
+ rmdir --ignore-fail-on-non-empty --parents $(SITEARCH) && \
+ rm $(VENDORARCH)/auto/Prima/.packlist && \
+ rm -r $(VENDORARCH)/Prima/sys/win32
#######################################################################
# Fix overly generic names of binaries
signature.asc
Description: Digital Signature

