updated on Wed Jan 11 00:07:16 UTC 2012
[aur-mirror.git] / selinux-flex / PKGBUILD
bloba6c7a433e9eb1c3c4ead7659834c3b63844dd727
1 # Maintainer: Nicky726 (Nicky726 <at> gmail <dot> com)
2 # Contributor: Sergej Pupykin (pupykin <dot> s+arch <at> gmail <dot> com)
4 # needed to build checkpolicy tool. current flex have some problems...
6 pkgname=selinux-flex
7 _origname=flex
8 pkgver=2.5.4a
9 pkgrel=6
10 pkgdesc="A tool for generating text-scanning programs"
11 groups=('selinux' 'selinux-system-utilities')
12 arch=('i686' 'x86_64')
13 url="http://flex.sourceforge.net"
14 license=('custom')
15 depends=('glibc' 'bash' 'bison')
16 conflicts=("${_origname}")
17 provides=("${_origname}=2.5.4")
18 options=(!makeflags)
19 source=(http://downloads.sourceforge.net/sourceforge/${_origname}/${_origname}-${pkgver}.tar.bz2 \
20         ${_origname}-arch.patch.gz)
21 md5sums=('c0b8e3dd63bce3f4a6543d845e17ce9a'
22          '03f577be43792ff3df9c3ce5215b8e92')
24 build() {
25   cd "${srcdir}/${_origname}-2.5.4"
26   patch -Np1 <../${_origname}-arch.patch
27   ./configure --prefix=/usr
28   make
31 package() {
32   cd "${srcdir}/${_origname}-2.5.4"
33   make prefix=${pkgdir}/usr install
34   cat > ${pkgdir}/usr/bin/lex << "EOF"
35 #!/bin/sh
36 # Begin /usr/bin/lex
38 exec /usr/bin/flex -l "$@"
39 # End /usr/bin/lex
40 EOF
41   chmod 755 "${pkgdir}/usr/bin/lex"
42   # install license
43   install -D -m644 COPYING "${pkgdir}/usr/share/licenses/$pkgname/license.txt"