summaryrefslogtreecommitdiff
path: root/testing/flex
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-07-23 00:01:51 +0000
committerroot <root@rshg054.dnsready.net>2012-07-23 00:01:51 +0000
commit59475c73370c37becae97edfb8eb2fe4d56ef87f (patch)
tree74197d2d4fb263937551ef47d3becb39585e8991 /testing/flex
parente4d2743138eaca146b1a01a7815facdb3d271d88 (diff)
Mon Jul 23 00:01:51 UTC 2012
Diffstat (limited to 'testing/flex')
-rw-r--r--testing/flex/PKGBUILD44
-rw-r--r--testing/flex/flex.install22
-rw-r--r--testing/flex/lex.sh3
3 files changed, 69 insertions, 0 deletions
diff --git a/testing/flex/PKGBUILD b/testing/flex/PKGBUILD
new file mode 100644
index 000000000..d51091dc7
--- /dev/null
+++ b/testing/flex/PKGBUILD
@@ -0,0 +1,44 @@
+# $Id: PKGBUILD 163839 2012-07-21 10:43:39Z allan $
+# Maintainer: Allan McRae <allan@archlinux.org>
+# Contributor: judd <jvinet@zeroflux.org>
+
+pkgname=flex
+pkgver=2.5.36
+pkgrel=1
+pkgdesc="A tool for generating text-scanning programs"
+arch=('i686' 'x86_64')
+url="http://flex.sourceforge.net"
+license=('custom')
+groups=('base-devel')
+depends=('glibc' 'm4' 'sh')
+install=flex.install
+source=(http://downloads.sourceforge.net/sourceforge/flex/flex-$pkgver.tar.bz2
+ lex.sh)
+md5sums=('5e637290609fd3c2f1f2e75ac2bce1c5'
+ 'f725259ec23a9e87ee29e2ef82eda9a5')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ ./configure --prefix=/usr
+ make
+}
+
+check() {
+ cd $srcdir/$pkgname-$pkgver
+
+ # these tests used features removed in bison-2.6
+ sed -i -e '/test-bison-yylloc/d' -e '/test-bison-yylval/d' tests/Makefile.in
+
+ make check
+}
+
+package() {
+ cd $srcdir/$pkgname-$pkgver
+
+ make DESTDIR=$pkgdir install
+ install -Dm755 $srcdir/lex.sh $pkgdir/usr/bin/lex
+
+ install -Dm644 COPYING \
+ $pkgdir/usr/share/licenses/$pkgname/license.txt
+}
+
diff --git a/testing/flex/flex.install b/testing/flex/flex.install
new file mode 100644
index 000000000..5b328c722
--- /dev/null
+++ b/testing/flex/flex.install
@@ -0,0 +1,22 @@
+infodir=/usr/share/info
+filelist=(flex.info{,-1,-2})
+
+post_install() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info $infodir/$file.gz $infodir/dir 2> /dev/null
+ done
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null
+ done
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/testing/flex/lex.sh b/testing/flex/lex.sh
new file mode 100644
index 000000000..13e7de692
--- /dev/null
+++ b/testing/flex/lex.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec /usr/bin/flex -l "$@"