From 59475c73370c37becae97edfb8eb2fe4d56ef87f Mon Sep 17 00:00:00 2001 From: root Date: Mon, 23 Jul 2012 00:01:51 +0000 Subject: Mon Jul 23 00:01:51 UTC 2012 --- testing/flex/PKGBUILD | 44 ++++++++++++++++++++++++++++++++++++++++++++ testing/flex/flex.install | 22 ++++++++++++++++++++++ testing/flex/lex.sh | 3 +++ 3 files changed, 69 insertions(+) create mode 100644 testing/flex/PKGBUILD create mode 100644 testing/flex/flex.install create mode 100644 testing/flex/lex.sh (limited to 'testing/flex') 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 +# Contributor: judd + +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 "$@" -- cgit v1.2.3-54-g00ecf