pkgs/bzip2/PKGBUILD

42 lines
1.3 KiB
Text
Raw Normal View History

2023-12-05 04:47:04 +00:00
# Maintainer: Daryl Ronningen <relms@relms.dev>
pkgname=bzip2
pkgver=1.0.8
pkgrel=1
pkgdesc="A high-quality data compression program"
arch=('x86_64')
license=('BSD')
url="https://sourceware.org/bzip2/"
source=(https://sourceware.org/pub/bzip2/$pkgname-$pkgver.tar.gz)
sha256sums=('ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269')
build() {
cd $pkgname-$pkgver
make -f Makefile-libbz2_so CC="gcc $CFLAGS $CPPFLAGS $LDFLAGS"
make bzip2 bzip2recover CC="gcc $CFLAGS $CPPFLAGS $LDFLAGS"
}
package() {
cd $pkgname-$pkgver
install -dm755 "$pkgdir"/usr/{bin,lib,include,share/man/man1}
install -m755 bzip2-shared "$pkgdir"/usr/bin/bzip2
install -m755 bzip2recover bzdiff bzgrep bzmore "$pkgdir"/usr/bin
ln -sf bzip2 "$pkgdir"/usr/bin/bunzip2
ln -sf bzip2 "$pkgdir"/usr/bin/bzcat
cp -a libbz2.so* "$pkgdir"/usr/lib
ln -s libbz2.so.$pkgver "$pkgdir"/usr/lib/libbz2.so
ln -s libbz2.so.$pkgver "$pkgdir"/usr/lib/libbz2.so.1 # For compatibility with some other distros
install -m644 bzlib.h "$pkgdir"/usr/include/
install -m644 bzip2.1 "$pkgdir"/usr/share/man/man1/
ln -sf bzip2.1 "$pkgdir"/usr/share/man/man1/bunzip2.1
ln -sf bzip2.1 "$pkgdir"/usr/share/man/man1/bzcat.1
ln -sf bzip2.1 "$pkgdir"/usr/share/man/man1/bzip2recover.1
}