updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / lib32-flex / PKGBUILD
blob2fb610f6377767133d78762d6672d165b0009d2f
1 # Maintainer: Bill Fraser <wfraser@codewise.org>
3 # From flex's PKGBUILD:
4 #   Maintainer: Allan McRae <allan@archlinux.org>
5 #   Contributor: judd <jvinet@zeroflux.org>
7 _pkgbasename=flex
8 pkgname=lib32-flex
9 pkgver=2.5.35
10 pkgrel=4
11 pkgdesc="A tool for generating text-scanning programs"
12 arch=('x86_64')
13 url="http://flex.sourceforge.net"
14 license=('custom')
15 groups=('base-devel')
16 depends=('lib32-glibc' 'm4' 'sh' $_pkgbasename)
17 source=(http://downloads.sourceforge.net/sourceforge/flex/flex-$pkgver.tar.bz2 
18         flex-2.5.35-gcc44.patch
19         flex-2.5.35-hardening.patch
20         flex-2.5.35-missing-prototypes.patch
21         flex-2.5.35-sign.patch
22         lex.sh)
23 md5sums=('10714e50cea54dc7a227e3eddcd44d57'
24          'e4444ef5c07db71a43280be74139bdea'
25          'de952b3ed7cc074bc8c3e6ab73634048'
26          '6b83f56b1b654c6a321cdc530a3ec68d'
27          'd87fd9e9762ba7e230d516bdcf1c8c6f'
28          'f725259ec23a9e87ee29e2ef82eda9a5')
30 build() {
31   export CC="gcc -m32"
32   export CXX="g++ -m32"
33   export LD="ld -m32"
34   export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
36   cd $srcdir/$_pkgbasename-$pkgver
38   patch -Np1 -i $srcdir/flex-2.5.35-gcc44.patch
39   patch -Np1 -i $srcdir/flex-2.5.35-hardening.patch
40   patch -Np1 -i $srcdir/flex-2.5.35-missing-prototypes.patch
41   patch -Np1 -i $srcdir/flex-2.5.35-sign.patch
43   ./configure --prefix=/usr --libdir=/usr/lib32 \
44     --mandir=/usr/share/man --infodir=/usr/share/info
45   make
48 check() {
49   cd $srcdir/$_pkgbasename-$pkgver
50   make check
53 package() {
54   cd $srcdir/$_pkgbasename-$pkgver
56   make prefix=$pkgdir/usr \
57     mandir=$pkgdir/usr/share/man \
58     infodir=$pkgdir/usr/share/info \
59     libdir=$pkgdir/usr/lib32 \
60     install
62   rm -rf "${pkgdir}"/usr/{include,share,bin}
64   mkdir -p $pkgdir/usr/share/licenses
65   ln -s $_pkgbasename "$pkgdir/usr/share/licenses/$pkgname"