diff options
Diffstat (limited to 'chapter8/bzip2.sh')
-rw-r--r-- | chapter8/bzip2.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/chapter8/bzip2.sh b/chapter8/bzip2.sh new file mode 100644 index 0000000..b1b4459 --- /dev/null +++ b/chapter8/bzip2.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +patch -Np1 -i ../bzip2-"${VERSION}"-install_docs-1.patch + +sed -i 's@\(ln -s -f \)$(PREFIX)/bin/@\1@' Makefile +sed -i "s@(PREFIX)/man@(PREFIX)/share/man@g" Makefile + +make -f Makefile-libbz2_so +make clean +make + +make PREFIX=/usr -j1 install + +cp -v bzip2-shared /bin/bzip2 +cp -av libbz2.so* /lib +ln -sv ../../lib/libbz2.so.1.0 /usr/lib/libbz2.so +rm -v /usr/bin/{bunzip2,bzcat,bzip2} +ln -sv bzip2 /bin/bunzip2 +ln -sv bzip2 /bin/bzcat + +rm -fv /usr/lib/libbz2.a |