summary refs log tree commit diff
path: root/def/a/bzip2
diff options
context:
space:
mode:
Diffstat (limited to 'def/a/bzip2')
-rw-r--r--def/a/bzip231
1 files changed, 31 insertions, 0 deletions
diff --git a/def/a/bzip2 b/def/a/bzip2
new file mode 100644
index 0000000..00c66db
--- /dev/null
+++ b/def/a/bzip2
@@ -0,0 +1,31 @@
+pkgname=bzip2
+version=1.0.8
+distfiles="https://sourceware.org/pub/${pkgname}/${pkgname}-${version}.tar.gz"
+
+do_build() {
+  make ${makejobs} CFLAGS="$CFLAGS -fPIC $LDFLAGS" LDFLAGS="$LDFLAGS" -f Makefile-libbz2_so
+  make ${makejobs} CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" bzip2recover libbz2.a
+}
+
+do_install() {
+  # XXX ugly
+
+  install -Dm755 bzip2-shared $DESTDIR/usr/bin/bzip2
+  install -Dm755 bzip2recover $DESTDIR/usr/bin/
+  ln -sf bzip2 ${DESTDIR}/usr/bin/bunzip2
+  ln -sf bzip2 ${DESTDIR}/usr/bin/bzcat
+  install -m755 bzdiff bzgrep bzmore ${DESTDIR}/usr/bin
+
+  install -Dm644 libbz2.so.${version} ${DESTDIR}/usr/lib/libbz2.so.${version}
+  ln -s libbz2.so.${version} ${DESTDIR}/usr/lib/libbz2.so
+  ln -s libbz2.so.${version} ${DESTDIR}/usr/lib/libbz2.so.1
+  ln -s libbz2.so.${version} ${DESTDIR}/usr/lib/libbz2.so.1.0
+
+  install -Dm644 libbz2.a ${DESTDIR}/usr/lib/libbz2.a
+  install -Dm644 bzlib.h ${DESTDIR}/usr/include/bzlib.h
+
+  install -Dm644 bzip2.1 ${DESTDIR}/usr/share/man/man1/bzip2.1
+  ln -sf bzip2.1 ${DESTDIR}/usr/share/man/man1/bunzip2.1
+  ln -sf bzip2.1 ${DESTDIR}/usr/share/man/man1/bzcat.1
+  ln -sf bzip2.1 ${DESTDIR}/usr/share/man/man1/bzip2recover.1
+}