archrelease: copy trunk to extra-x86_64
[arch-packages.git] / flex / trunk / PKGBUILD
blob51721b525caac486420e51a85b95fef118259cb6
1 # Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
2 # Contributor: Allan McRae <allan@archlinux.org>
3 # Contributor: judd <jvinet@zeroflux.org>
5 pkgname=flex
6 pkgver=2.6.4
7 pkgrel=3
8 pkgdesc="A tool for generating text-scanning programs"
9 arch=('x86_64')
10 url="https://github.com/westes/flex"
11 license=('custom')
12 groups=('base-devel')
13 depends=('glibc' 'm4' 'sh')
14 makedepends=('help2man')
15 source=("https://github.com/westes/flex/releases/download/v$pkgver/flex-$pkgver.tar.gz"{,.sig}
16         "flex-pie.patch")
17 md5sums=('2882e3179748cc9f9c23ec593d6adc8d'
18          'SKIP'
19          '0a8e8242b37c57b0bc0c6f673bceb5b7')
20 validpgpkeys=('56C67868E93390AA1039AD1CE4B29C8D64885307') # Will Estes
22 prepare() {
23   cd "$pkgname-$pkgver"
24   patch -p1 -i "$srcdir"/flex-pie.patch
25   autoreconf
28 build() {
29   cd "$pkgname-$pkgver"
30   ./configure --prefix=/usr
31   make
34 check() {
35   cd "$pkgname-$pkgver"
37   # cxx_restart fails - https://github.com/westes/flex/issues/98
38   make -k check || true
41 package() {
42   cd "$pkgname-$pkgver"
44   make DESTDIR="$pkgdir" install
45   ln -s flex "${pkgdir}/usr/bin/lex"
47   install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/license.txt"