blob: 4145c7828359a80dd4eeccc61f29bf2a1620ea73 (
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
|
#!/bin/sh -e
[ "$CPT_CROSS_TRIPLET" ] &&
CC=$CPT_CROSS_TRIPLET-cc AR=$CPT_CROSS_TRIPLET-ar RANLIB=$CPT_CROSS_TRIPLET-ranlib
LD=${CC:=cc}
CC="$CC $CFLAGS -fPIC $LDFLAGS"
make CC="$CC" LD="$LD" -f Makefile-libbz2_so
make CC="$CC" AR="${AR:-ar}" RANLIB="${RANLIB:-ranlib}" LD="$LD" \
bzip2 bzip2recover libbz2.a
for bin in bzip2 bzdiff bzgrep bzip2recover bzmore; do
install -Dm755 "$bin" "$1/usr/bin/$bin"
done
install -Dm755 libbz2.so.1.0.8 "$1/usr/lib/libbz2.so.1.0.8"
install -Dm644 libbz2.a "$1/usr/lib/libbz2.a"
install -Dm644 bzip2.1 "$1/usr/share/man/man1/bzip2.1"
install -Dm644 bzlib.h "$1/usr/include/bzlib.h"
for lib in libbz2.so libbz2.so.1 libbz2.so.1.0; do
ln -sf libbz2.so.1.0.8 "$1/usr/lib/$lib"
done
ln -sf bzip2 "$1/usr/bin/bunzip2"
ln -sf bzip2 "$1/usr/bin/bzcat"
|