2021-07-04 01:48:15 +08:00
|
|
|
#!/bin/bash
|
2012-01-16 13:44:18 +08:00
|
|
|
|
|
|
|
# Slackware build script for heretic_shareware_data
|
|
|
|
|
|
|
|
# Written by B. Watson (yalhcru@gmail.com)
|
|
|
|
|
2013-01-02 09:31:47 +08:00
|
|
|
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
|
|
|
|
|
2021-10-21 01:28:21 +08:00
|
|
|
# 20211020 bkw: BUILD=2
|
|
|
|
# - only extract the files we actually install
|
|
|
|
# - don't create *.1 *.2 files, saves almost 3MB in $TMP.
|
|
|
|
# - include readme and license docs.
|
|
|
|
|
2021-07-04 17:41:06 +08:00
|
|
|
cd $(dirname $0) ; CWD=$(pwd)
|
|
|
|
|
2012-01-16 13:44:18 +08:00
|
|
|
PRGNAM=heretic_shareware_data
|
|
|
|
VERSION=${VERSION:-1.2}
|
2021-10-21 01:28:21 +08:00
|
|
|
BUILD=${BUILD:-2}
|
2012-01-16 13:44:18 +08:00
|
|
|
TAG=${TAG:-_SBo}
|
2021-07-04 18:23:38 +08:00
|
|
|
PKGTYPE=${PKGTYPE:-tgz}
|
2012-01-16 13:44:18 +08:00
|
|
|
|
|
|
|
ARCH=noarch
|
|
|
|
|
2021-07-04 18:23:38 +08:00
|
|
|
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
|
|
|
|
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2012-01-16 13:44:18 +08:00
|
|
|
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
|
|
|
|
mkdir -p $PRGNAM-$VERSION
|
|
|
|
cd $PRGNAM-$VERSION
|
2021-10-21 01:28:21 +08:00
|
|
|
unzip -p $CWD/htic_v12.zip '*.1' '*.2' > htic.zip
|
|
|
|
unzip -a -L htic.zip '*.wad' readme.txt license.doc
|
|
|
|
mv license.doc license.doc.txt
|
2012-01-16 13:44:18 +08:00
|
|
|
|
|
|
|
mkdir -p $PKG/usr/share/games/doom
|
2021-10-21 01:28:21 +08:00
|
|
|
install -m0644 -oroot -groot heretic1.wad $PKG/usr/share/games/doom/
|
2012-01-16 13:44:18 +08:00
|
|
|
|
2021-10-21 01:28:21 +08:00
|
|
|
PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
|
|
|
|
mkdir -p $PKGDOC
|
|
|
|
install -m0644 -oroot -groot *.txt $PKGDOC
|
|
|
|
cat $CWD/README > $PKGDOC/README
|
|
|
|
cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
|
2012-01-16 13:44:18 +08:00
|
|
|
|
|
|
|
mkdir -p $PKG/install
|
|
|
|
cat $CWD/slack-desc > $PKG/install/slack-desc
|
|
|
|
|
|
|
|
cd $PKG
|
2021-07-04 18:23:38 +08:00
|
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
|