blob: f01a6b76f2f7af66fa66ebdb0fecf20bbf7c5256 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
#!/bin/bash
DEPS=(glibc sh)
PKG_VER=1.0.8
SOURCE=git://sourceware.org/git/bzip2.git
BRANCH=bzip2-$PKG_VER
DESC="a selection of programs for compressing and decompressing bzip2 files"
build () {
#curl https://www.linuxfromscratch.org/patches/lfs/development/bzip2-$PKG_VER-install_docs-1.patch > bzip2-$PKG_VER-install_docs-1.patch
#patch -Np1 -i bzip2-$PKG_VER-install_docs-1.patch
# ensure symbolic links are relative
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=$PKG_DEST/usr install
}
package () {
cp -av libbz2.so* $PKG_DEST/usr/lib
cp -av libbz2.so.$PKG_VER $PKG_DEST/usr/lib/libbz2.so
cp -v bzip2-shared $PKG_DEST/usr/bin/bzip2
for i in $PKG_DEST/usr/bin/{bzcat,bunzip2}; do
ln -sfv bzip2 $i
done
# remove a useless static library
rm -fv $PKG_DEST/usr/lib/libbz2.a
}
|