mirror of
https://git.adityakumar.xyz/lfs-scripts.git
synced 2024-11-21 11:52:52 +00:00
Add 8.7 - Build bzip
This commit is contained in:
parent
cdf02897b2
commit
5a95107da4
2 changed files with 49 additions and 0 deletions
37
scripts/chapter8/8.7-bzip.sh
Normal file
37
scripts/chapter8/8.7-bzip.sh
Normal file
|
@ -0,0 +1,37 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd /sources
|
||||
tar xf bzip2-1.0.8.tar.gz
|
||||
cd bzip2-1.0.8
|
||||
|
||||
patch -Np1 -i ../bzip2-1.0.8-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 -j5
|
||||
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
make PREFIX=/usr install
|
||||
|
||||
cp -av libbz2.so.* /usr/lib
|
||||
ln -sv libbz2.so.1.0.8 /usr/lib/libbz2.so
|
||||
|
||||
cp -v bzip2-shared /usr/bin/bzip2
|
||||
for i in /usr/bin/{bzcat,bunzip2}; do
|
||||
ln -sfv bzip2 $i
|
||||
done
|
||||
|
||||
rm -fv /usr/lib/libbz2.a
|
||||
|
||||
cd /sources
|
||||
rm -rf bzip2-1.0.8
|
||||
|
|
@ -618,3 +618,15 @@ then
|
|||
stop_script "chapter8/8.6-zlib.sh"
|
||||
fi
|
||||
|
||||
# Chapter 8.7
|
||||
# ===========
|
||||
echo "Building bzip2"
|
||||
su -c "bash $SCRIPT/chapter8/8.7-bzip.sh"
|
||||
|
||||
# Exit on error
|
||||
check_exit_code
|
||||
if [ $exit_status -ne 0 ]
|
||||
then
|
||||
stop_script "chapter8/8.7-bzip.sh"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue