PKGBUILD 1.86 KB
Newer Older
Manuel Tortosa's avatar
Manuel Tortosa committed
1 2 3 4 5 6 7 8
#
# Core Packages for Chakra, part of chakra-project.org
#
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>

# include global config
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf 
Jan Mette's avatar
Jan Mette committed
9 10

pkgname=bzip2
philm's avatar
philm committed
11
pkgver=1.0.6
12
pkgrel=3
Jan Mette's avatar
Jan Mette committed
13 14 15 16 17 18 19
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)
philm's avatar
philm committed
20
md5sums=('00b516f4704d4a7cb50a1d97e6e8e15b')
Jan Mette's avatar
Jan Mette committed
21 22 23

build() {
  cd $srcdir/$pkgname-$pkgver
24

Jan Mette's avatar
Jan Mette committed
25 26
  # add large-file support
  sed -e 's/^CFLAGS=\(.*\)$/CFLAGS=\1 \$(BIGFILES)/' -i ./Makefile-libbz2_so
27

Jan Mette's avatar
Jan Mette committed
28 29 30
  # use our optimization
  sed -i "s|-O2|${CFLAGS}|g" Makefile
  sed -i "s|-O2|${CFLAGS}|g" Makefile-libbz2_so
31 32 33

  make -f Makefile-libbz2_so
  make bzip2recover libbz2.a
Jan Mette's avatar
Jan Mette committed
34 35 36 37 38 39 40 41 42 43

  install -dm755 $pkgdir/bin
  install -m755 bzip2-shared $pkgdir/bin/bzip2
  install -m755 bzip2recover $pkgdir/bin
  ln -sf bzip2 $pkgdir/bin/bunzip2
  ln -sf bzip2 $pkgdir/bin/bzcat

  install -dm755 $pkgdir/usr/bin
  install -m755 bzdiff bzgrep bzmore $pkgdir/usr/bin

philm's avatar
philm committed
44
  install -Dm755 libbz2.so.1.0.6 $pkgdir/lib/libbz2.so.1.0.6
45 46 47 48
  ln -s libbz2.so.1.0.6 $pkgdir/lib/libbz2.so
  ln -s libbz2.so.1.0.6 $pkgdir/lib/libbz2.so.1
  ln -s libbz2.so.1.0.6 $pkgdir/lib/libbz2.so.1.0

Jan Mette's avatar
Jan Mette committed
49 50 51
  install -Dm644 libbz2.a ${pkgdir}/usr/lib/libbz2.a
  ln -sf ../../lib/libbz2.so ${pkgdir}/usr/lib/libbz2.so

52
  install -Dm644 bzlib.h $pkgdir/usr/include/bzlib.h
Jan Mette's avatar
Jan Mette committed
53 54 55 56 57 58 59 60 61 62

  install -Dm644 bzip2.1 $pkgdir/usr/share/man/man1/bzip2.1
  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 $srcdir/${pkgname}-${pkgver}/LICENSE \
                 $pkgdir/usr/share/licenses/${pkgname}/LICENSE
}