summaryrefslogtreecommitdiffstats
path: root/games/SpaceZero
diff options
context:
space:
mode:
Diffstat (limited to 'games/SpaceZero')
-rw-r--r--games/SpaceZero/SpaceZero.SlackBuild39
-rw-r--r--games/SpaceZero/SpaceZero.desktop5
-rw-r--r--games/SpaceZero/SpaceZero.info2
3 files changed, 33 insertions, 13 deletions
diff --git a/games/SpaceZero/SpaceZero.SlackBuild b/games/SpaceZero/SpaceZero.SlackBuild
index dfa404461a..4b6a5483d8 100644
--- a/games/SpaceZero/SpaceZero.SlackBuild
+++ b/games/SpaceZero/SpaceZero.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for SpaceZero
@@ -22,11 +22,24 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220407 bkw: Modified by SlackBuilds.org, BUILD=3: fix doc permisssions.
+
+# 20220231 bkw: Modified by SlackBuilds.org, BUILD=2:
+# - strip the binary.
+# - binary in /usr/games.
+# - absolute paths in .desktop
+# - install the PNG icon as spacezero.png (why was it .svg?)
+
+# 20220222 bkw: Modified by SlackBuilds.org: fix build on 15.0.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=SpaceZero
SRCNAM=spacezero
VERSION=${VERSION:-0.86.00}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -36,7 +49,11 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -66,31 +83,35 @@ cd $SRCNAM
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
+ -o -perm 511 \) -exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
patch -p1 < $CWD/Makefile.patch
+# 20220222 bkw: SLKCFLAGS weren't even being used.
+sed -i "s,-O3,$SLKCFLAGS -fcommon," Makefile
+
make
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-mkdir -p $PKG/usr/bin \
+mkdir -p $PKG/usr/games \
$PKG/usr/share/games/$PRGNAM/{locales,sounds}
install -D -m0644 dat/locales/* $PKG/usr/share/games/$PRGNAM/locales
install -D -m0644 dat/sounds/* $PKG/usr/share/games/$PRGNAM/sounds
-install -D -m0755 bin/$SRCNAM $PKG/usr/bin/$SRCNAM
+install -s -D -m0755 bin/$SRCNAM $PKG/usr/games/$SRCNAM
mkdir -p $PKG/usr/share/applications
install -D -m644 $CWD/$PRGNAM.desktop $PKG/usr/share/applications/$PRGNAM.desktop
mkdir -p $PKG/usr/share/pixmaps/
-install -D -m644 $CWD/$SRCNAM.png $PKG/usr/share/pixmaps/$SRCNAM.svg
+install -D -m644 $CWD/$SRCNAM.png $PKG/usr/share/pixmaps/$SRCNAM.png
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+find html -type f -exec chmod 0644 {} \+
cp -a html/* $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -99,4 +120,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/games/SpaceZero/SpaceZero.desktop b/games/SpaceZero/SpaceZero.desktop
index 44c7130a95..3854d9e1e9 100644
--- a/games/SpaceZero/SpaceZero.desktop
+++ b/games/SpaceZero/SpaceZero.desktop
@@ -1,9 +1,8 @@
[Desktop Entry]
Name=SpaceZero
-Name[he]=SpaceZero
Comment=A 2D Real Time Strategy space combat game
-Exec=spacezero
-Icon=spacezero
+Exec=/usr/games/spacezero
+Icon=/usr/share/pixmaps/spacezero.png
Terminal=false
Type=Application
Categories=Game;StrategyGame;
diff --git a/games/SpaceZero/SpaceZero.info b/games/SpaceZero/SpaceZero.info
index dd7da2363c..ce02782696 100644
--- a/games/SpaceZero/SpaceZero.info
+++ b/games/SpaceZero/SpaceZero.info
@@ -1,7 +1,7 @@
PRGNAM="SpaceZero"
VERSION="0.86.00"
HOMEPAGE="http://spacezero.sourceforge.net/"
-DOWNLOAD="http://downloads.sourceforge.net/project/spacezero/spacezero%200.86/spacezero-0.86.00.tar.gz"
+DOWNLOAD="http://distcache.FreeBSD.org/ports-distfiles/spacezero-0.86.00.tar.gz"
MD5SUM="4fe4e3c95ba08198751c382fdaa106e2"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""