From 21160fed4ca457bc17ecb2098b06950957868e4c Mon Sep 17 00:00:00 2001 From: Stefan Fiedler Date: Fri, 2 Nov 2007 13:22:07 +0000 Subject: [PATCH] Stefan Fiedler: bzip2: fix for multilib builds; cleanups [2007091023133630890] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@8720 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- package/base/bzip2/bzip2.conf | 45 ++++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 14 deletions(-) diff --git a/package/base/bzip2/bzip2.conf b/package/base/bzip2/bzip2.conf index d6567f300..26c085c6c 100644 --- a/package/base/bzip2/bzip2.conf +++ b/package/base/bzip2/bzip2.conf @@ -21,21 +21,38 @@ # # --- ROCK-COPYRIGHT-NOTE-END --- -# var_append makeopt " " "PREFIX=$root" -var_append makeinstopt " " "PREFIX=$root/usr" +var_append makeinstopt " " "PREFIX=$instroot/$prefix" -inmake="cp Makefile{,.orig}; \ - sed -e '/^all:/s/ test//' Makefile.orig > Makefile; \ - cp -v manual* bzip2.txt $docdir; \ +premake="bzip2_premake" +bzip2_premake() { + if [ $stagelevel -le 2 ] ; then + cp Makefile{,.orig} + sed -e '/^all:/s/ test//' Makefile.orig > Makefile + fi + + sed -i "s@/lib\(/\| \|$\)@/$multilib\1@g" Makefile +} + +inmake="cp -v manual* bzip2.txt $docdir; \ if [ \"$ROCKCFG_DIETLIBC_bzip2\" != 1 ]; then \ - $MAKE -f Makefile-libbz2_so; \ + eval $MAKE -f Makefile-libbz2_so \$makeopt; \ fi" -postmake="if [ \"$ROCKCFG_DIETLIBC_bzip2\" != 1 ]; then \ - ln -svf libbz2.so.1.0 libbz2.so.1; \ - cp -a libbz2.so.* $root/lib; \ - cp -v bzip2-shared $root/bin/bzip2; \ - fi; \ - rm -vf $root/usr/bin/{bunzip2,bzcat,bzip2}; \ - ln -sfv bzip2 $root/bin/bunzip2; \ - ln -sfv bzip2 $root/bin/bzcat" +postmake="bzip2_postmake" +bzip2_postmake() +{ + if [ \"$ROCKCFG_DIETLIBC_bzip2\" != 1 ]; then + ln -svf libbz2.so.1.0 libbz2.so.1 + cp -a libbz2.so.* $root/$multilib + if [[ "$xpkg" != *-32bit ]] ; then + cp -v bzip2-shared $root/bin/bzip2 + fi + fi + if [[ "$xpkg" = *-32bit ]] ; then + cp -a $instroot/$prefix/lib/* $root/usr/lib/ + else + rm -vf $bindir/{bunzip2,bzcat,bzip2} + ln -sfv bzip2 $root/bin/bunzip2 + ln -sfv bzip2 $root/bin/bzcat + fi +}