void-packages/srcpkgs/bzip2/template

52 lines
1.5 KiB
Bash

# Template file for 'bzip2'
pkgname=bzip2
version=1.0.8
revision=1
bootstrap=yes
short_desc="Freely available, patent free, high-quality data compressor"
maintainer="Orphaned <orphan@voidlinux.org>"
license="bzip2-1.0.6"
homepage="https://sourceware.org/bzip2/"
changelog="https://sourceware.org/bzip2/CHANGES"
distfiles="https://sourceware.org/pub/bzip2/bzip2-${version}.tar.gz"
checksum=ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269
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"
}
}