slackbuilds_ponce/games/fortune-starwars/fortune-starwars.SlackBuild
B. Watson 1d2e55de58
games/fortune-starwars: Added (Star Wars fortune file).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
2018-08-04 08:40:02 +07:00

50 lines
1.1 KiB
Bash

#!/bin/sh
# Slackware build script for fortune-starwars
# Written by B. Watson (yalhcru@gmail.com)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
# VERSION is the timestamp on the tarball.
PRGNAM=fortune-starwars
VERSION=${VERSION:-20051125}
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
tar xvf $CWD/$PRGNAM.tgz
cd $PRGNAM
chown -R root:root .
chmod 644 *
# Don't trust shipped .dat file, it's easy enough to generate our own anyway.
rm -f starwars.dat
strfile starwars
mkdir -p $PKG/usr/share/games/fortunes
cp -a starwars starwars.dat $PKG/usr/share/games/fortunes
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a README $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README.SBo
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}