void-packages/srcpkgs/bzip2/template

54 lines
1.5 KiB
Bash

# Template file for 'bzip2'
pkgname=bzip2
version=1.0.6
revision=14
bootstrap=yes
short_desc="The bzip2 compression library"
maintainer="Juan RP <xtraeme@voidlinux.org>"
license="bzip2-1.0.6"
homepage="http://sources.redhat.com/bzip2"
# Currently not available
# distfiles="http://sources.redhat.com/pub/bzip2/v${version/./}/${pkgname}-${version}.tar.gz"
distfiles="https://fossies.org/linux/misc/bzip2-${version}.tar.gz"
checksum=a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd
do_build() {
make ${makejobs} CFLAGS="$CFLAGS -fPIC $LDFLAGS" LDFLAGS="$LDFLAGS" -f Makefile-libbz2_so
make ${makejobs} CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" bzip2recover libbz2.a
}
do_check() {
make check
}
do_install() {
vbin bzip2-shared bzip2
vbin bzip2recover
ln -sf bzip2 ${DESTDIR}/usr/bin/bunzip2
ln -sf bzip2 ${DESTDIR}/usr/bin/bzcat
install -m755 bzdiff bzgrep bzmore ${DESTDIR}/usr/bin
vinstall libbz2.so.${version} 755 usr/lib
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
vinstall libbz2.a 644 usr/lib
vinstall bzlib.h 644 usr/include
vman 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
}
bzip2-devel_package() {
depends="bzip2-${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
}
}