[Lunar-commits] <moonbase> bzip2: disabled static libs

Duncan Gibson engelsman at lunar-linux.org
Fri Mar 18 20:15:18 CET 2011


commit ad4dfc6aded2974c68c8fc6a93ba7faeaa4b30f7
Author: Christian Krause <kizkizzbangbang at googlemail.com>
Date:   Fri Mar 18 20:15:18 2011 +0100

    bzip2: disabled static libs
    
    ... the hack looks a little dirty, but it works
    ... maybe you find a way to clean it up a little ;)
---
 archive/bzip2/BUILD |   31 +++++++++++++++++++++++--------
 1 files changed, 23 insertions(+), 8 deletions(-)

diff --git a/archive/bzip2/BUILD b/archive/bzip2/BUILD
index c354a8a..35d3796 100644
--- a/archive/bzip2/BUILD
+++ b/archive/bzip2/BUILD
@@ -4,15 +4,30 @@
     CFLAGS+=" \$(BIGFILES)"
   fi
 
-  sedit "s/^CFLAGS=.*$/CFLAGS=$CFLAGS -fPIC/" Makefile  &&
-  sedit "s/ln/ln -f/" Makefile     &&
+  sedit "s/^CFLAGS=.*$/CFLAGS=$CFLAGS -fPIC/"        Makefile  &&
+  sedit "s/ln/ln -f/"                                Makefile  &&
   sedit "s/\$(PREFIX)\/man/\$(PREFIX)\/share\/man/g" Makefile  &&
 
-  make  PREFIX=/usr             &&
-  prepare_install               &&
-  make  PREFIX=/usr install     &&
-  strip /usr/bin/bzip2 /usr/bin/bzip2recover /usr/bin/bzcat /usr/bin/bunzip2 &&
-  make  -f  Makefile-libbz2_so  &&
-  ( cp    -a  libbz2.so* /usr/lib || true )
+  # Makefile hack to not install static lib
+  sedit "s/all: libbz2.a/all:/g"                 Makefile  &&
+  sedit "s/bzip2: libbz2.a/bzip2:/g"             Makefile  &&
+  sedit "/cp -f libbz2.a/d"                      Makefile  &&
+  sedit "/chmod a+r \$(PREFIX)\/lib\/libbz2.a/d" Makefile  &&
+
+  # build shared lib first so the app part will
+  # not complain about the missing static lib
+  make  -f  Makefile-libbz2_so  PREFIX=/usr  &&
+  make                          PREFIX=/usr  &&
+
+  prepare_install  &&
+  make  PREFIX=/usr install  &&
+
+  # shared libs have to be installed separately
+  install -m755 libbz2.so.1.0.6 /usr/lib/libbz2.so.1.0.6 &&
+  ln -sf /usr/lib/libbz2.so.1.0.6 /usr/lib/libbz2.so.1.0 &&
+  ln -sf /usr/lib/libbz2.so.1.0 /usr/lib/libbz2.so.1 &&
+  ln -sf /usr/lib/libbz2.so.1 /usr/lib/libbz2.so &&
+
+  strip /usr/bin/bzip2 /usr/bin/bzip2recover /usr/bin/bzcat /usr/bin/bunzip2
 
 ) > $C_FIFO 2>&1


More information about the Lunar-commits mailing list