diff options
author | B. Watson <yalhcru@gmail.com> | 2018-06-19 23:50:55 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2018-06-23 08:44:01 +0700 |
commit | fdd50477c43f720d7350ef242680d54423412721 (patch) | |
tree | 48bf3917424e4cae4a3b291ba20a4652371621b4 /development/mawk/mawk.SlackBuild | |
parent | 2181cffe17aacf2ced13ef7c6f106cb0b8b5ce71 (diff) | |
download | slackbuilds-fdd50477c43f720d7350ef242680d54423412721.tar.gz |
development/mawk: Added (fast awk implementation).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'development/mawk/mawk.SlackBuild')
-rw-r--r-- | development/mawk/mawk.SlackBuild | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/development/mawk/mawk.SlackBuild b/development/mawk/mawk.SlackBuild new file mode 100644 index 0000000000..36196827ac --- /dev/null +++ b/development/mawk/mawk.SlackBuild @@ -0,0 +1,82 @@ +#!/bin/sh + +# Slackware build script for mawk + +# Written by B. Watson (yalhcru@gmail.com) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +PRGNAM=mawk +VERSION=${VERSION:-1.3.4} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tgz +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \+ -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+ + + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --build=$ARCH-slackware-linux + +make +make install DESTDIR=$PKG + +strip $PKG/usr/bin/$PRGNAM +gzip -9 $PKG/usr/man/man1/$PRGNAM.1 + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a ACKNOWLEDGMENT CHANGES COPYING MANIFEST README \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |