diff options
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | PKGBUILD | 43 | ||||
-rw-r--r-- | flex.install | 22 |
3 files changed, 83 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..4bf9a9a8117c --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,18 @@ +pkgbase = flex-android + pkgdesc = Flex for building Android. 2.6 doesn't play well when building. + pkgver = android + pkgrel = 1 + url = http://flex.sourceforge.net + install = flex.install + arch = any + license = custom + depends = glibc + depends = m4 + depends = sh + provides = flex + conflicts = flex + source = http://downloads.sourceforge.net/sourceforge/flex/flex-2.5.39.tar.xz + md5sums = 477679c37ff8b28248a9b05f1da29a82 + +pkgname = flex-android + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..57c513dabd21 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,43 @@ +# $Id$ +# Maintainer: Jason Edson <jaysonedson@gmail.com> +# Contributor: judd <jvinet@zeroflux.org> + +pkgname=flex +pkgver=android +pkgrel=1 +pkgdesc="Flex for building Android. 2.6 doesn't play well when building." +arch=('i686' 'x86_64') +url="http://flex.sourceforge.net" +license=('custom') +depends=('glibc' 'm4' 'sh') +provides=(flex) +conflicts=(flex) +install=flex.install +source=(http://downloads.sourceforge.net/sourceforge/flex/flex-2.5.39.tar.xz) +md5sums=('477679c37ff8b28248a9b05f1da29a82') + +build() { + cd $srcdir/$pkgname-$pkgver + ./configure --prefix=/usr + make +} + +check() { + cd $srcdir/$pkgname-$pkgver + + # these tests are incompatible with latest bison + 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 + ln -s flex ${pkgdir}/usr/bin/lex + + install -Dm644 COPYING \ + $pkgdir/usr/share/licenses/$pkgname/license.txt +} + diff --git a/flex.install b/flex.install new file mode 100644 index 000000000000..5b328c722360 --- /dev/null +++ b/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: |