void-packages/srcpkgs/bzip2/template

50 lines
1.4 KiB
Bash

# Template build file for 'bzip2'.
pkgname=bzip2
version=1.0.6
revision=11
bootstrap=yes
homepage="http://www.bzip.org"
distfiles="http://www.bzip.org/$version/$pkgname-$version.tar.gz"
short_desc="The bzip2 compression library"
license="BSD"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
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_install() {
vinstall bzip2-shared 755 usr/bin bzip2
vinstall bzip2recover 755 usr/bin
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
vinstall bzip2.1 644 usr/share/man/man1
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
vlicense LICENSE
}
bzip2-devel_package() {
depends="bzip2>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
}
}