diff options
author | B. Watson <yalhcru@gmail.com> | 2020-01-12 14:39:06 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2020-01-12 14:39:06 +0700 |
commit | be01de1b8c79f58582324102b51509b2c25a1353 (patch) | |
tree | b8641b656f0248089aaee7349b792a6533004176 /games/fortune-slackware/fortune-slackware.SlackBuild | |
parent | 98a19da48bd2cc955d335c14fc5aa3fb3e7cb74f (diff) | |
download | slackbuilds-be01de1b8c79f58582324102b51509b2c25a1353.tar.gz |
games/fortune-slackware: Added (Slackware quotes for fortune).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/fortune-slackware/fortune-slackware.SlackBuild')
-rw-r--r-- | games/fortune-slackware/fortune-slackware.SlackBuild | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/games/fortune-slackware/fortune-slackware.SlackBuild b/games/fortune-slackware/fortune-slackware.SlackBuild new file mode 100644 index 0000000000..ba5c4367f8 --- /dev/null +++ b/games/fortune-slackware/fortune-slackware.SlackBuild @@ -0,0 +1,59 @@ +#!/bin/sh + +# Slackware build script for fortune-slackware + +# Written by B. Watson (yalhcru@gmail.com) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +PRGNAM=fortune-slackware +VERSION=${VERSION:-1.15} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +ARCH=noarch + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +# Package is named like all the other fortune-* ones for consistency. +SRCNAM=slack-fortunes-all + +# Where the fortune end up installing to. +FDIR=$PKG/usr/share/games/fortunes + +set -e + +rm -rf $PKG +mkdir -p $TMP $FDIR $OUTPUT +cd $TMP +# no top-level dir in the tarball! +rm -rf $PRGNAM-$VERSION +mkdir -p $PRGNAM-$VERSION +cd $PRGNAM-$VERSION +tar xvf $CWD/$SRCNAM-$VERSION.tgz +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 15 fortune files in the source, combine them all into one. + +# Patch fixes the mess caused by some files starting with a % line, +# some having blank line(s) after the last % line, some having two % +# lines in a row, and the last file should NOT have a % line at the end. +patch -p1 < $CWD/formatting.diff + +cat slack-fortunes-vol-? slack-fortunes-vol-?? > $FDIR/slackware +strfile $FDIR/slackware + +DOCDIR=$PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $DOCDIR +cat $CWD/README > $DOCDIR/README +cat $CWD/$PRGNAM.SlackBuild > $DOCDIR/$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} |