From f48f6c82e23a3bacb8a0952c2d2cf9af1e6bf42d Mon Sep 17 00:00:00 2001 From: root Date: Wed, 21 Nov 2012 01:32:11 -0800 Subject: Wed Nov 21 01:32:09 PST 2012 --- pcr/bison++/PKGBUILD | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 pcr/bison++/PKGBUILD (limited to 'pcr/bison++/PKGBUILD') diff --git a/pcr/bison++/PKGBUILD b/pcr/bison++/PKGBUILD new file mode 100644 index 000000000..947c41df4 --- /dev/null +++ b/pcr/bison++/PKGBUILD @@ -0,0 +1,51 @@ +# Contributor: Antonio Garcia-Dominguez +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres + +pkgname=bison++ +pkgver=1.21.11 +pkgrel=1 +pkgdesc="Parser generator in C or C++ from BNF notation" +arch=('i686' 'x86_64') +url="http://packages.debian.org/bison++" +license=('GPL') +source=('http://ftp.de.debian.org/debian/pool/main/b/bison++/bison++_1.21.11.orig.tar.gz' 'http://ftp.de.debian.org/debian/pool/main/b/bison++/bison++_1.21.11-3.diff.gz') + +build() { + cd "$srcdir/$pkgname-$pkgver" + + # Apply the Debian patch + patch -p1 < ../*.diff + + # Fix the broken Makefile.am script + sed -e ' + s/datadir/DESTDIR\)\$(datadir/ + s/bindir/DESTDIR\)\$(bindir/ + /^pkgdata_DATA/s/ Example$// + /install\-exec\-hook/i\install-data-hook:\ +\tcp -r $(srcdir)/Example $(DESTDIR)$(pkgdatadir)\ +' -i Makefile.am + + # Bootstrap the autotools and compile + aclocal + automake --add-missing + autoreconf + ./configure --prefix=/usr + make +} + +check() { + cd "$srcdir/$pkgname-$pkgver" + make -k check +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir/" install + + # Remove or rename files that could conflict with regular Bison + rm "$pkgdir/usr/bin/bison" + mv "$pkgdir/usr/share/info/"{bison,bison++}.info + rm "$pkgdir/usr/share/man/man1/bison.1" +} + +# vim:set ts=2 sw=2 et: -- cgit v1.2.3-54-g00ecf