summaryrefslogtreecommitdiffstats
path: root/abs/core/bzip2/PKGBUILD
blob: bd3b1c26bfb843b03675c60703b570708451447d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# $Id: PKGBUILD 7561 2008-08-02 22:14:50Z jgc $
# Maintainer: Judd <jvinet@zeroflux.org>

pkgname=bzip2
pkgver=1.0.5
pkgrel=12
pkgdesc="A high-quality data compression program"
arch=(i686 x86_64)
license=('custom')
url="http://sources.redhat.com/bzip2"
groups=('base')
depends=('glibc')
source=(http://www.bzip.org/$pkgver/bzip2-$pkgver.tar.gz)

build() {
  cd $startdir/src/$pkgname-$pkgver
  mkdir -p $startdir/pkg/bin $startdir/pkg/usr/share/man/man1
  mkdir -p $startdir/pkg/usr/include $startdir/pkg/usr/lib
  mkdir -p $startdir/pkg/lib
  # add large-file support
  sed -e 's/^CFLAGS=\(.*\)$/CFLAGS=\1 \$(BIGFILES)/' -i ./Makefile-libbz2_so
  make -f Makefile-libbz2_so || return 1
  make bzip2recover libbz2.a || return 1
  ln -s libbz2.so.1.0.4 libbz2.so
  ln -s libbz2.so.1.0.4 libbz2.so.1
  cp bzip2-shared $startdir/pkg/bin/bzip2
  cp bzip2recover $startdir/pkg/bin
  cp bzip2.1 $startdir/pkg/usr/share/man/man1
  mkdir -p $startdir/pkg/usr/include
  cp bzlib.h $startdir/pkg/usr/include
  cp -a libbz2.so* $startdir/pkg/lib
  rm -f $startdir/pkg/usr/lib/libbz2.a
  cp libbz2.a $startdir/pkg/usr/lib
  cd $startdir/pkg/usr/lib
  ln -sf ../../lib/libbz2.so
  cd $startdir/pkg/bin
  ln -sf bzip2 bunzip2
  ln -sf bzip2 bzcat
  cd $startdir/pkg/usr/share/man/man1
  ln -sf bzip2.1 bunzip2.1
  ln -sf bzip2.1 bzcat.1
  ln -sf bzip2.1 bzip2recover.1

  mkdir -p ${startdir}/pkg/usr/share/licenses/${pkgname}
  install -m644 ${startdir}/src/${pkgname}-${pkgver}/LICENSE ${startdir}/pkg/usr/share/licenses/${pkgname}/LICENSE
}
md5sums=('3c15a0c8d1d3ee1c46a1634d00617b1a')