jobcore/bzip2/PKGBUILD
2022-03-20 14:19:37 +02:00

70 lines
2.3 KiB
Bash

#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/attr"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=bzip2
pkgver=1.0.8
pkgrel=04
pkgdesc="A high-quality data compression program"
arch=('x86_64')
url="https://sourceware.org/bzip2/"
depends=('glibc' 'sh')
provides=('libbz2.so')
source=(https://sourceware.org/pub/bzip2/$pkgname-$pkgver.tar.gz{,.sig}
bzip2.pc)
prepare() {
cd $pkgname-$pkgver
cp ../bzip2.pc bzip2.pc
sed "s|@VERSION@|$pkgver|" -i bzip2.pc
}
build() {
cd $pkgname-$pkgver
make -f Makefile-libbz2_so CC="gcc $CFLAGS $CPPFLAGS $LDFLAGS"
make bzip2 bzip2recover CC="gcc $CFLAGS $CPPFLAGS $LDFLAGS"
}
check() {
cd $pkgname-$pkgver
make test
}
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
install -Dm644 bzip2.pc -t "$pkgdir"/usr/lib/pkgconfig
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/${pkgname}/LICENSE
}
#---- license gpg-key sha512sums ----
validpgpkeys=('EC3CFE88F6CA0788774F5C1D1AA44BE649DE760A') # Mark Wielaard <mark@klomp.org>
license=('BSD')
sha512sums=(
'083f5e675d73f3233c7930ebe20425a533feedeaaa9d8cc86831312a6581cefbe6ed0d08d2fa89be81082f2a5abdabca8b3c080bf97218a1bd59dc118a30b9f3' # bzip2-1.0.8.tar.gz
'4a4a3fa0ec1c10a704b9870e8e629fd007cca55184423c6bfc3049a702fb41e4aeb73bfe9ca7442c27d32d278f1f34f27523a6be67d35b37896acdded12bf40d' # bzip2-1.0.8.tar.gz.sig
'e17c6f8f88a89d38667a68cd1397c863663c7996a9f18481f3f6ed35902044220c01e5fe19f114159fceac068a4dd32c2ddc903f0d0901cdf722c841dd9f2b93') # bzip2.pc