summaryrefslogtreecommitdiff
path: root/extra/nawk/PKGBUILD
blob: d2c2125af6b139a991af95f53e354781bdf2d99a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# $Id: PKGBUILD 142711 2011-11-13 14:58:31Z dreisner $
# Maintainer: Dave Reisner <dreisner@archlinux.org>

pkgname=nawk
pkgver=20110810
pkgrel=3
pkgdesc="The one, true implementation of AWK"
url="http://cm.bell-labs.com/who/bwk/"
license=('MIT')
arch=('i686' 'x86_64')
options=('!makeflags')
depends=('glibc')
source=("http://www.cs.princeton.edu/~bwk/btl.mirror/awk.tar.gz"
        'manpage-naming.patch')
md5sums=('a7062ecade93dc4cb39190e48db9a51d'
         '8486d387a51fe3b3c9875c4151ad92b4')

build() {
  patch -Np1 < manpage-naming.patch
  sed -n '/Copyright/,/THIS SOFTWARE\./p' README > LICENSE

  make "CPPFLAGS=-DHAS_ISBLANK" "LDFLAGS=$LDFLAGS" "CFLAGS=$CFLAGS"
}

package() {
  install -Dm755 a.out "$pkgdir/usr/bin/nawk"
  install -Dm644 awk.1 "$pkgdir/usr/share/man/man1/nawk.1"
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/nawk/LICENSE"
}