db-move: moved gnome-clocks from [testing] to [extra] (x86_64)
[arch-packages.git] / flex / trunk / PKGBUILD
blob3fc6dc656ca2ae3aed0a36acf00635713383f2a5
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=5
8 pkgdesc="A tool for generating text-scanning programs"
9 arch=('x86_64')
10 url="https://github.com/westes/flex"
11 license=('custom')
12 depends=('glibc' 'm4' 'sh')
13 makedepends=('help2man')
14 source=(
15   "https://github.com/westes/flex/releases/download/v$pkgver/flex-$pkgver.tar.gz"{,.sig}
16   "flex-pie.patch"
18 sha256sums=('e87aae032bf07c26f85ac0ed3250998c37621d95f8bd748b31f15b33c45ee995'
19             'SKIP'
20             '20f3cce6b0ea6ab67a902a46b89c292b959994dedcbe6ee5d187f9bba1408b0e')
21 validpgpkeys=('56C67868E93390AA1039AD1CE4B29C8D64885307') # Will Estes
23 prepare() {
24   cd "$pkgname-$pkgver"
25   patch -p1 -i "$srcdir"/flex-pie.patch
26   autoreconf -fiv
29 build() {
30   cd "$pkgname-$pkgver"
31   ./configure --prefix=/usr
32   # prevent excessive overlinking due to libtool
33   sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
34   make
37 check() {
38   make -k check -C $pkgname-$pkgver
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"