summaryrefslogtreecommitdiffstats
path: root/games/starfighter/starfighter.SlackBuild
diff options
context:
space:
mode:
author Willy Sudiarto Raharjo <willysr@slackbuilds.org>2016-10-16 09:08:23 +0700
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2016-10-16 09:08:23 +0700
commit77ebdec548cc50ae46d265d40f9609898be35660 (patch)
tree3f82c87f70304f4452de5f842983e5ab9e4fca35 /games/starfighter/starfighter.SlackBuild
parentb1add597aed06dc8ed87a1eb8a898eb9edf1f611 (diff)
downloadslackbuilds-77ebdec548cc50ae46d265d40f9609898be35660.tar.gz
slackbuilds-77ebdec548cc50ae46d265d40f9609898be35660.tar.xz
games/starfighter: Updated for version 2.0.2.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/starfighter/starfighter.SlackBuild')
-rw-r--r--games/starfighter/starfighter.SlackBuild50
1 files changed, 20 insertions, 30 deletions
diff --git a/games/starfighter/starfighter.SlackBuild b/games/starfighter/starfighter.SlackBuild
index 2b90f7e198..badb241470 100644
--- a/games/starfighter/starfighter.SlackBuild
+++ b/games/starfighter/starfighter.SlackBuild
@@ -3,14 +3,21 @@
# Written by Tim Dickson dickson.tim at googlemail.com
+# changelog
+
+# updated 15/10/2016 for v1.6
+# make file now supports destdir and project comes with desktop file and icon
+# so separate one not needed.
+# doc location still changed to support slackware prefered location
+
PRGNAM=starfighter
-VERSION=${VERSION:-1.4}
+VERSION=${VERSION:-1.6}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -21,8 +28,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -36,11 +43,10 @@ else
fi
set -e
-
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
+rm -rf $PRGNAM-$VERSION-src
tar xvf $CWD/$PRGNAM-$VERSION-src.tar.gz
cd $PRGNAM-$VERSION-src
chown -R root:root .
@@ -49,35 +55,19 @@ find -L . \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-
-# The makefile doesn't support DESTDIR, but that's okay :)
-mkdir -p $PKG/usr/games $PKG/usr/doc/$PRGNAM-$VERSION
+# make file now supports DESTDIR
+# we just change the doc dir to the slackware standard.
+sed -i 's_share/doc/\$(PROG)_doc/\$(PROG)-\$(VERSION)_g' Makefile
make \
- CFLAGS="$SLKCFLAGS $(sdl-config --cflags) -Wall -DLINUX" \
- BINDIR=/usr/games/ \
- DOCDIR=/usr/doc/$PRGNAM-$VERSION/ \
- DATADIR=/usr/share/games/parallelrealities/
+ CFLAGS="$SLKCFLAGS $(pkg-config --cflags sdl2 SDL2_image SDL2_mixer) -Wall -DLINUX " \
+ CXXFLAGS="$SLKCFLAGS $(pkg-config --cflags sdl2 SDL2_image SDL2_mixer) -Wall -g "
make install \
- BINDIR=$PKG/usr/games/ \
- DOCDIR=$PKG/usr/doc/$PRGNAM-$VERSION/ \
- DATADIR=$PKG/usr/share/games/parallelrealities/
+ CFLAGS="$SLKCFLAGS $(pkg-config --cflags sdl2 SDL2_image SDL2_mixer) -Wall -DLINUX " \
+ CXXFLAGS="$SLKCFLAGS $(pkg-config --cflags sdl2 SDL2_image SDL2_mixer) -Wall -g " \
+ DESTDIR=$PKG
# Fixup ownership (no need for games group ownership of anything)
chown -R root:root $PKG
-
-mkdir -p $PKG/usr/share/applications
-cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
-
-mkdir -p $PKG/usr/share/icons/hicolor/{16x16,32x32,48x48,64x64}/apps
-cat $CWD/icons/$PRGNAM-16px.png > \
- $PKG/usr/share/icons/hicolor/16x16/apps/$PRGNAM.png
-cat $CWD/icons/$PRGNAM-32px.png > \
- $PKG/usr/share/icons/hicolor/32x32/apps/$PRGNAM.png
-cat $CWD/icons/$PRGNAM-48px.png > \
- $PKG/usr/share/icons/hicolor/48x48/apps/$PRGNAM.png
-cat $CWD/icons/$PRGNAM-64px.png > \
- $PKG/usr/share/icons/hicolor/64x64/apps/$PRGNAM.png
-
# Add the build script to the package docs and fixup doc permissions
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
find $PKG/usr/doc -type f -exec chmod 0644 {} \;