PKGBUILDs/community/selinux-flex/PKGBUILD

38 lines
1,011 B
Bash
Raw Normal View History

2009-10-10 02:15:33 +00:00
# $Id: PKGBUILD 82 2009-07-17 19:56:55Z aaron $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# needed to build checkpolicy tool. current flex have some problems...
pkgname=selinux-flex
pkgver=2.5.4a
pkgrel=2
pkgdesc="A tool for generating text-scanning programs"
arch=(i686 x86_64)
url="http://flex.sourceforge.net"
license=('custom')
depends=('glibc' 'bash')
conflicts=(flex)
provides=(flex)
source=(ftp://ftp.gnu.org/non-gnu/flex/flex-$pkgver.tar.gz \
flex-arch.patch.gz)
md5sums=('bd8753d0b22e1f4ec87a553a73021adf'
'03f577be43792ff3df9c3ce5215b8e92')
build() {
cd $startdir/src/flex-2.5.4
patch -Np1 <../flex-arch.patch
./configure --prefix=/usr
make || return 1
make prefix=$startdir/pkg/usr install
cat > $startdir/pkg/usr/bin/lex << "EOF"
#!/bin/sh
# Begin /usr/bin/lex
exec /usr/bin/flex -l "$@"
# End /usr/bin/lex
EOF
chmod 755 $startdir/pkg/usr/bin/lex
# install license
install -D -m644 COPYING $startdir/pkg/usr/share/licenses/$pkgname/license.txt
}