mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-18 22:06:04 +01:00
8caf0c2350
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
61 lines
1.4 KiB
Bash
61 lines
1.4 KiB
Bash
#!/bin/sh
|
|
|
|
# Slackware build script for freedoom
|
|
|
|
# Written by B. Watson (yalhcru@gmail.com)
|
|
|
|
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
|
|
|
|
PRGNAM=freedoom
|
|
VERSION=${VERSION:-0.8}
|
|
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
|
|
mkdir -p $PRGNAM-$VERSION
|
|
cd $TMP/$PRGNAM-$VERSION
|
|
|
|
mkdir -p $PKG/usr/share/games/doom $PKG/usr/doc/$PRGNAM-$VERSION
|
|
|
|
for zipfile in $PRGNAM-iwad $PRGNAM-ultimate freedm; do
|
|
unzip $CWD/$zipfile-v$VERSION.zip
|
|
cd $zipfile-v$VERSION
|
|
chown -R root:root .
|
|
chmod 644 *
|
|
cp *.wad $PKG/usr/share/games/doom
|
|
cd -
|
|
done
|
|
|
|
# The docs are identical in all 3 zipfiles, only keep one set.
|
|
cd $PRGNAM-iwad-v$VERSION
|
|
cp COPYING CREDITS *.html $PKG/usr/doc/$PRGNAM-$VERSION
|
|
cd -
|
|
|
|
# Rename to avoid conflicts with id software's doom.wad and doom2.wad.
|
|
# zdoom will correctly find the files with these names, according to
|
|
# http://remilia.zdoom.org/wiki/IWAD
|
|
|
|
cd $PKG/usr/share/games/doom
|
|
mv doom.wad freedoomu.wad
|
|
mv doom2.wad freedoom.wad
|
|
|
|
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
|
cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README
|
|
|
|
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}
|