lib32/lib32-flex/PKGBUILD
2014-03-02 18:28:55 +01:00

56 lines
1.5 KiB
Bash

# Lib32 Packages for Chakra, part of chakra-project.org
#
# Maintainer: AlmAck <almack@chakra-project.org>
_pkgbasename=flex
pkgname=lib32-$_pkgbasename
pkgver=2.5.37
pkgrel=2
pkgdesc="A tool for generating text-scanning programs"
arch=('x86_64')
url="http://flex.sourceforge.net"
license=('custom')
groups=('base-devel')
depends=('lib32-glibc' 'm4' 'sh' $_pkgbasename=$pkgver)
options=('libtool' 'staticlibs')
source=(http://downloads.sourceforge.net/sourceforge/flex/flex-$pkgver.tar.bz2
flex-2.5.37-no-bison.patch
lex.sh)
sha256sums=('17aa7b4ebf19a13bc2dff4115b416365c95f090061539a932a68092349ac052a'
'5ee23f97533c991b82e2aadc06d4682d7d05d99ee2abaf1ef9a82225ba9d0858'
'9d03016a7c4ae1adb051f50f94407b3d7dee9d55924b5c1904261c9f0c1f86f6')
build() {
export CC="gcc -m32"
export CXX="g++ -m32"
export LD="ld -m32"
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
cd $srcdir/$_pkgbasename-$pkgver
patch -Np1 -i $srcdir/flex-2.5.37-no-bison.patch
./configure --prefix=/usr --libdir=/usr/lib32 \
--mandir=/usr/share/man --infodir=/usr/share/info
make
}
check() {
cd $srcdir/$_pkgbasename-$pkgver
make check
}
package() {
cd $srcdir/$_pkgbasename-$pkgver
make prefix=$pkgdir/usr \
mandir=$pkgdir/usr/share/man \
infodir=$pkgdir/usr/share/info \
libdir=$pkgdir/usr/lib32 \
install
rm -rf "${pkgdir}"/usr/{include,share,bin}
mkdir -p $pkgdir/usr/share/licenses
ln -s $_pkgbasename "$pkgdir/usr/share/licenses/$pkgname"
}