bzip2: Saner build

This commit is contained in:
Dylan Araps 2020-04-23 07:39:08 +03:00
parent 11af8eeffe
commit 9ca23ccd81
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E
1 changed files with 5 additions and 9 deletions

View File

@ -2,19 +2,15 @@
make CC="${CC:-cc} $CFLAGS -fPIC $LDFLAGS" -f Makefile-libbz2_so
make CC="${CC:-cc} $CFLAGS -fPIC $LDFLAGS" bzip2recover libbz2.a
make PREFIX="$1/usr" install
for bin in bzip2-shared bzdiff bzgrep bzip2recover bzmore; do
install -Dm755 "$bin" "$1/usr/bin/${bin%%-shared}"
done
# Fix nonsensical man page handling.
mkdir -p "$1/usr/share"
mv -f "$1/usr/man" "$1/usr/share/man"
# Install the shared library.
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"