summaryrefslogtreecommitdiff
path: root/games/srb2/srb2.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/srb2/srb2.SlackBuild')
-rw-r--r--games/srb2/srb2.SlackBuild48
1 files changed, 26 insertions, 22 deletions
diff --git a/games/srb2/srb2.SlackBuild b/games/srb2/srb2.SlackBuild
index 26fb5abb25..356c8bfb5c 100644
--- a/games/srb2/srb2.SlackBuild
+++ b/games/srb2/srb2.SlackBuild
@@ -7,7 +7,7 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
PRGNAM=srb2
-VERSION=${VERSION:-2.1.21}
+VERSION=${VERSION:-2.2.8}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -61,23 +61,24 @@ 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 {} \+
-# Assets (actually WAD files) aren't found in the source, have to download
-# them separately. The build actually checks for them & refuses to compile
-# if they're missing, which is kinda unfair since it doesn't ship with
-# the damn things... To save 208MB of space in $TMP, we symlink the files.
-# Can't just touch them, since the md5sums of the files get hardcoded
-# into the binary (and it'll refuse to run if they don't match).
-DATAFILES="srb2.srb zones.dta player.dta rings.dta music.dta patch.dta"
-for i in $DATAFILES; do
- ln -s $CWD/$i assets/$i
-done
+# Assets (actually WAD and pk3 aka zip files) aren't found in the
+# source, have to download them separately. The build actually checks
+# for them & refuses to compile if they're missing, which is kinda
+# unfair since it doesn't ship with the damn things... so we have to
+# extract them from the 'full' zip file. Can't just touch them, since
+# the md5sums of the files get hardcoded into the binary (and it'll
+# refuse to run if they don't match).
+( cd assets
+ mkdir installer
+ cd installer
+ unzip $CWD/SRB2-v$VERSION-Full.zip '*.dta' '*.pk3'
+)
# As shipped, the path /usr/games/SRB2 is hardcoded in various places
# in the source (no cmake variable to change it). It should be in
# /usr/share/games, not /usr/games, so sed-fest:
sed -i 's,usr/games,usr/share/games,g' \
- src/sdl/i_system.c src/sdl/i_ttf.c \
- src/sdl12/i_system.c src/sdl12/i_ttf.c
+ src/sdl/i_system.c src/sdl/i_ttf.c
mkdir -p build
cd build
@@ -96,21 +97,24 @@ cd ..
mkdir -p $PKG/usr/games $PKG/usr/share/games/SRB2 \
$PKG/usr/share/pixmaps $PKG/usr/share/applications \
$PKG/usr/doc/$PRGNAM-$VERSION
-install -s -m0755 build/bin/$PRGNAM-$VERSION $PKG/usr/games
-ln -s $PRGNAM-$VERSION $PKG/usr/games/$PRGNAM
+# as of 2.2.8 the binary's name changed.
+install -s -m0755 build/bin/lsdl$PRGNAM-$VERSION $PKG/usr/games
+ln -s lsdl$PRGNAM-$VERSION $PKG/usr/games/lsdl$PRGNAM
+ln -s lsdl$PRGNAM-$VERSION $PKG/usr/games/$PRGNAM
install -m0644 assets/LICENSE* assets/README* $PKG/usr/doc/$PRGNAM-$VERSION
install -m0644 $PRGNAM.png $PKG/usr/share/pixmaps
-# Install data files from $CWD, not the symlinks in assets/
echo -n "Copying data files: "
-for i in $DATAFILES; do
- echo -n "$i "
- cat $CWD/$i > $PKG/usr/share/games/SRB2/$i
-done
+( cd assets/installer
+ for i in *; do
+ echo -n "$i "
+ cat $i > $PKG/usr/share/games/SRB2/$i
+ done
+)
echo
-# desktop file is a modified version of debian/srb2.desktop. I took out
-# the absolute paths.
+# desktop file is a modified version of debian/srb2.desktop. I fixed
+# the absolute paths and got it to validate.
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
# dev and modding docs in doc/, config files for cwiid and various doom