summaryrefslogtreecommitdiff
path: root/extra/nawk
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2011-11-13 23:14:59 +0000
committerroot <root@rshg054.dnsready.net>2011-11-13 23:14:59 +0000
commit600d5378dadf22b8517d52ac19500594bce4b66d (patch)
tree0bd8bd6283e1aa90b77ad8dba0aa0f258e41a957 /extra/nawk
parent559f8739357af66f22f2259e84b21c76b3a66205 (diff)
Sun Nov 13 23:14:59 UTC 2011
Diffstat (limited to 'extra/nawk')
-rw-r--r--extra/nawk/PKGBUILD30
-rw-r--r--extra/nawk/manpage-naming.patch46
2 files changed, 76 insertions, 0 deletions
diff --git a/extra/nawk/PKGBUILD b/extra/nawk/PKGBUILD
new file mode 100644
index 000000000..f930b1800
--- /dev/null
+++ b/extra/nawk/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD 142698 2011-11-13 02:24:31Z dreisner $
+# Maintainer: Dave Reisner <dreisner@archlinux.org>
+
+pkgname=nawk
+pkgver=20110810
+pkgrel=2
+pkgdesc="The one, true implementation of the AWK"
+url="http://cm.bell-labs.com/who/bwk/"
+license=('MIT')
+arch=('i686' 'x86_64')
+options=('!makeflags')
+depends=('glibc')
+provides=('awk')
+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"
+}
diff --git a/extra/nawk/manpage-naming.patch b/extra/nawk/manpage-naming.patch
new file mode 100644
index 000000000..782f5e427
--- /dev/null
+++ b/extra/nawk/manpage-naming.patch
@@ -0,0 +1,46 @@
+diff -uNr ./nawk-20100523.orig/awk.1 nawk-20100523/awk.1
+--- ./nawk-20100523.orig/awk.1 2007-03-31 16:56:19.000000000 -0400
++++ nawk-20100523/awk.1 2010-09-20 21:49:16.840069318 -0400
+@@ -7,13 +7,11 @@
+ .fi
+ .ft 1
+ ..
+-awk
+-.TH AWK 1
+-.CT 1 files prog_other
++.TH NAWK 1
+ .SH NAME
+-awk \- pattern-directed scanning and processing language
++nawk \- pattern-directed scanning and processing language
+ .SH SYNOPSIS
+-.B awk
++.B nawk
+ [
+ .BI \-F
+ .I fs
+@@ -32,7 +30,7 @@
+ .I file ...
+ ]
+ .SH DESCRIPTION
+-.I Awk
++.I Nawk
+ scans each input
+ .I file
+ for lines that match any of a set of patterns specified literally in
+@@ -198,7 +196,6 @@
+ .BR atan2
+ are built in.
+ Other built-in functions:
+-.TF length
+ .TP
+ .B length
+ the length of its argument
+@@ -407,7 +404,6 @@
+ do not combine with other patterns.
+ .PP
+ Variable names with special meanings:
+-.TF FILENAME
+ .TP
+ .B CONVFMT
+ conversion format used when converting numbers
+