aboutsummaryrefslogtreecommitdiff
path: root/misc/txt2regex/txt2regex.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'misc/txt2regex/txt2regex.SlackBuild')
-rw-r--r--misc/txt2regex/txt2regex.SlackBuild49
1 files changed, 49 insertions, 0 deletions
diff --git a/misc/txt2regex/txt2regex.SlackBuild b/misc/txt2regex/txt2regex.SlackBuild
new file mode 100644
index 000000000000..4592cda5b4b0
--- /dev/null
+++ b/misc/txt2regex/txt2regex.SlackBuild
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+# Slackware build script for txt2regex
+
+# Written by B. Watson (yalhcru@gmail.com)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+PRGNAM=txt2regex
+VERSION=${VERSION:-0.9}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+ARCH=noarch
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+
+# There's a MANDIR in the Makefile, but nothing uses it. Have to
+# install the man page, er, manually.
+
+make install DESTDIR=$PKG
+mkdir -p $PKG/usr/man/man1
+gzip -9c < man/$PRGNAM.man > $PKG/usr/man/man1/$PRGNAM.1.gz
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+chmod -x tests/regex-tester.sh # no +x files in the doc dir!
+gzip -9 tests/regex-tester.txt # 116KB => 10KB
+cp -a *.md COPYRIGHT TODO tests man/*.html $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}