archrelease: copy trunk to staging-x86_64
[arch-packages.git] / bzip2 / trunk / PKGBUILD
blob2fc7dae642e5c4aea2f694394b4773bb8ee0cedf
1 # Maintainer: Ronald van Haren <ronald.archlinux.org>
2 # Contributor: Judd <jvinet@zeroflux.org>
4 pkgname=bzip2
5 pkgver=1.0.8
6 pkgrel=5
7 pkgdesc="A high-quality data compression program"
8 arch=('x86_64')
9 license=('BSD')
10 url="https://sourceware.org/bzip2/"
11 depends=('glibc' 'sh')
12 provides=('libbz2.so')
13 source=(https://sourceware.org/pub/bzip2/$pkgname-$pkgver.tar.gz{,.sig}
14         bzip2.pc)
15 sha256sums=('ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269'
16             'SKIP'
17             'eca9d8cd6376df1fb5442667c603032023fb21d8d183684550da0b96ade39654')
18 validpgpkeys=('EC3CFE88F6CA0788774F5C1D1AA44BE649DE760A') # Mark Wielaard <mark@klomp.org>
20 prepare() {
21   cd $pkgname-$pkgver
22   cp ../bzip2.pc bzip2.pc
23   sed "s|@VERSION@|$pkgver|" -i bzip2.pc
26 build() {
27   cd $pkgname-$pkgver
29   make -f Makefile-libbz2_so CC="gcc $CFLAGS $CPPFLAGS $LDFLAGS"
30   make bzip2 bzip2recover CC="gcc $CFLAGS $CPPFLAGS $LDFLAGS"
33 check() {
34   cd $pkgname-$pkgver
35   make test
38 package() {
39   cd $pkgname-$pkgver
41   install -dm755 "$pkgdir"/usr/{bin,lib,include,share/man/man1}
43   install -m755 bzip2-shared "$pkgdir"/usr/bin/bzip2
44   install -m755 bzip2recover bzdiff bzgrep bzmore "$pkgdir"/usr/bin
45   ln -sf bzip2 "$pkgdir"/usr/bin/bunzip2
46   ln -sf bzip2 "$pkgdir"/usr/bin/bzcat
48   cp -a libbz2.so* "$pkgdir"/usr/lib
49   ln -s libbz2.so.$pkgver "$pkgdir"/usr/lib/libbz2.so
50   ln -s libbz2.so.$pkgver "$pkgdir"/usr/lib/libbz2.so.1 # For compatibility with some other distros
52   install -m644 bzlib.h "$pkgdir"/usr/include/
54   install -m644 bzip2.1 "$pkgdir"/usr/share/man/man1/
55   ln -sf bzip2.1 "$pkgdir"/usr/share/man/man1/bunzip2.1
56   ln -sf bzip2.1 "$pkgdir"/usr/share/man/man1/bzcat.1
57   ln -sf bzip2.1 "$pkgdir"/usr/share/man/man1/bzip2recover.1
59   install -Dm644 bzip2.pc -t "$pkgdir"/usr/lib/pkgconfig
60   install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/${pkgname}/LICENSE