summaryrefslogtreecommitdiff
path: root/testing/gawk
diff options
context:
space:
mode:
authorroot <root@rshg047.dnsready.net>2011-07-06 23:10:44 +0000
committerroot <root@rshg047.dnsready.net>2011-07-06 23:10:44 +0000
commitb215b5e985b9310dff8d992510f12a87141fe7cb (patch)
treebc81c9c0c02ab9a4d6ee15e553850141b8d46f94 /testing/gawk
parent9d2caacbc33de06407311a5da87e5d22e0266435 (diff)
Wed Jul 6 23:10:44 UTC 2011
Diffstat (limited to 'testing/gawk')
-rw-r--r--testing/gawk/PKGBUILD41
-rw-r--r--testing/gawk/gawk.install22
2 files changed, 63 insertions, 0 deletions
diff --git a/testing/gawk/PKGBUILD b/testing/gawk/PKGBUILD
new file mode 100644
index 000000000..a61f089c0
--- /dev/null
+++ b/testing/gawk/PKGBUILD
@@ -0,0 +1,41 @@
+# $Id: PKGBUILD 130241 2011-07-04 15:07:06Z allan $
+# Maintainer:
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+
+pkgname=gawk
+pkgver=4.0.0
+pkgrel=1
+pkgdesc="GNU version of awk"
+arch=('i686' 'x86_64')
+url="http://www.gnu.org/directory/GNU/gawk.html"
+license=('GPL')
+groups=('base')
+depends=('sh' 'glibc')
+provides=('awk')
+install=gawk.install
+source=(ftp://ftp.gnu.org/pub/gnu/${pkgname}/${pkgname}-${pkgver}.tar.gz)
+md5sums=('51e417b71287629940051e6f652c6492')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ ./configure --prefix=/usr --libexecdir=/usr/lib
+ make
+}
+
+check() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ make -j1 check
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ make DESTDIR=${pkgdir} install
+
+ install -dm755 ${pkgdir}/bin
+ mv ${pkgdir}/usr/bin/gawk* ${pkgdir}/bin/
+ ln -sf gawk ${pkgdir}/bin/awk
+ ln -sf /bin/gawk ${pkgdir}/usr/bin/
+}
diff --git a/testing/gawk/gawk.install b/testing/gawk/gawk.install
new file mode 100644
index 000000000..3f7f24cfe
--- /dev/null
+++ b/testing/gawk/gawk.install
@@ -0,0 +1,22 @@
+infodir=usr/share/info
+filelist=(gawk.info.gz gawkinet.info.gz)
+
+post_install() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info $infodir/$file $infodir/dir 2> /dev/null
+ done
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info --delete $infodir/$file $infodir/dir 2> /dev/null
+ done
+}
+
+# vim:set ts=2 sw=2 et: