games/defendguin: Updated for version 0.0.13.

Signed-off-by: B. Watson <urchlay@slackware.uk>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2023-08-19 16:15:59 -04:00 committed by Willy Sudiarto Raharjo
parent 9c8a8ef30c
commit 3aa4e9b890
No known key found for this signature in database
GPG key ID: 3F617144D7238786
13 changed files with 48 additions and 76 deletions

View file

@ -6,6 +6,7 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
# 20230819 bkw: update for v0.0.13, use better icon.
# 20230107 bkw: BUILD=2: # 20230107 bkw: BUILD=2:
# - fix man page permission. # - fix man page permission.
# - remove useless INSTALL from doc dir. # - remove useless INSTALL from doc dir.
@ -13,8 +14,8 @@
cd $(dirname $0) ; CWD=$(pwd) cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=defendguin PRGNAM=defendguin
VERSION=${VERSION:-0.0.12} VERSION=${VERSION:-0.0.13}
BUILD=${BUILD:-2} BUILD=${BUILD:-1}
TAG=${TAG:-_SBo} TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz} PKGTYPE=${PKGTYPE:-tgz}
@ -52,20 +53,33 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION cd $PRGNAM-$VERSION
chown -R root:root . chown -R root:root .
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
patch -p1 < $CWD/install_paths.diff
patch -p1 < $CWD/man.diff
make COPT="$SLKCFLAGS"
make install DESTDIR=$PKG
chmod 644 $PKG/usr/man/man?/*.gz
# Cruft removal: # Cruft removal:
rm -f \ rm -f data/images/{l2r.sh,loader/loading-orig.bmp.gz,*/*.sh}
$PKG/usr/share/$PRGNAM/images/l2r.sh \
$PKG/usr/share/$PRGNAM/images/loader/loading-orig.bmp.gz # Fix path to data files in man page.
patch -p1 < $CWD/man.diff
# 20230819 bkw: use our flags, and don't install data +x.
sed -i -e "s,-Wall,& $SLKCFLAGS," \
-e '/chmod /d' \
Makefile
# 20230819 bkw: 'make install' should create these, but doesn't:
mkdir -p $PKG/usr/games $PKG/usr/share/games/$PRGNAM
# 20230819 bkw: N.B. DATA_PREFIX needs the trailing / here!
make DATA_PREFIX=/usr/share/games/$PRGNAM/
strip $PRGNAM
make install \
PREFIX=$PKG/usr \
BIN_PREFIX=$PKG/usr/games \
DATA_PREFIX=$PKG/usr/share/games/$PRGNAM/ \
MAN_PREFIX=$PKG/usr
gzip -9 $PKG/usr/man/man?/*
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
rm -f docs/INSTALL.txt rm -f docs/INSTALL.txt
@ -75,8 +89,16 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/usr/share/applications mkdir -p $PKG/usr/share/applications
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
# 20230819 bkw: icon is a modified data/images/boss/boss01.bmp
for i in $CWD/icons/*.png; do
px="$( basename "$i" .png )"
sz=${px}x${px}
dir=$PKG/usr/share/icons/hicolor/$sz/apps
mkdir -p $dir
cat "$i" > $dir/$PRGNAM.png
done
mkdir -p $PKG/usr/share/pixmaps mkdir -p $PKG/usr/share/pixmaps
cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
mkdir -p $PKG/install mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/slack-desc > $PKG/install/slack-desc

View file

@ -1,6 +1,6 @@
[Desktop Entry] [Desktop Entry]
Name=Defendguin Name=Defendguin
Exec=defendguin Exec=/usr/games/defendguin
Type=Application Type=Application
Icon=defendguin Icon=defendguin
Categories=Game; Categories=Game;

View file

@ -1,8 +1,8 @@
PRGNAM="defendguin" PRGNAM="defendguin"
VERSION="0.0.12" VERSION="0.0.13"
HOMEPAGE="http://www.newbreedsoftware.com/defendguin/" HOMEPAGE="http://www.newbreedsoftware.com/defendguin/"
DOWNLOAD="ftp://ftp.tuxpaint.org/unix/x/defendguin/src/defendguin-0.0.12.tar.gz" DOWNLOAD="ftp://ftp.tuxpaint.org/unix/x/defendguin/src/defendguin-0.0.13.tar.gz"
MD5SUM="a543e3f5f4e935546116384c6f20d782" MD5SUM="11ffbe135c26f579359cd5bd396c1462"
DOWNLOAD_x86_64="" DOWNLOAD_x86_64=""
MD5SUM_x86_64="" MD5SUM_x86_64=""
REQUIRES="" REQUIRES=""

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

View file

@ -1,5 +1,9 @@
if [ -x /usr/bin/update-desktop-database ]; then if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database usr/share/applications >/dev/null 2>&1 /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi fi
if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
if [ -x /usr/bin/gtk-update-icon-cache ]; then
/usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
fi
fi

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

View file

@ -1,54 +0,0 @@
diff -Naur defendguin-0.0.12/Makefile defendguin-0.0.12.patched/Makefile
--- defendguin-0.0.12/Makefile 2009-11-05 16:21:34.000000000 -0500
+++ defendguin-0.0.12.patched/Makefile 2013-06-11 21:46:07.000000000 -0400
@@ -9,11 +9,12 @@
# User-definable stuff:
-CFLAGS=-Wall -O2
+DESTDIR=
+COPT=
#DATA_PREFIX=$(PWD)/data/
-PREFIX=/usr/local
+PREFIX=/usr
MAN_PREFIX=$(PREFIX)
-BIN_PREFIX=$(PREFIX)/bin
+BIN_PREFIX=$(PREFIX)/games
DATA_PREFIX=$(PREFIX)/share/defendguin/
JOY=YES
@@ -24,7 +25,7 @@
SDL_LDFLAGS := $(shell sdl-config --libs) -L/usr/X11R6/lib
MIXER=-lSDL_mixer
NOSOUNDFLAG=__SOUND
-CFLAGS=-Wall $(SDL_CFLAGS) -DDATA_PREFIX=\"$(DATA_PREFIX)\" -D$(NOSOUNDFLAG) \
+CFLAGS=-Wall $(COPT) $(SDL_CFLAGS) -DDATA_PREFIX=\"$(DATA_PREFIX)\" -D$(NOSOUNDFLAG) \
-DJOY_$(JOY)
SDL_LIB=$(SDL_LDFLAGS) $(MIXER)
@@ -37,14 +38,17 @@
make defendguin MIXER= NOSOUNDFLAG=NOSOUND
install: defendguin
- install -d $(DATA_PREFIX)
- cp -R data/* $(DATA_PREFIX)
- chmod -R a+rX,g-w,o-w $(DATA_PREFIX)
- cp defendguin $(BIN_PREFIX)/
- chmod a+rx,g-w,o-w $(BIN_PREFIX)/defendguin
- -mkdir -p $(MAN_PREFIX)/man/man6/
- cp src/defendguin.6 $(MAN_PREFIX)/man/man6/
- chmod a+rx,g-w,o-w $(MAN_PREFIX)/man/man6/defendguin.6
+ install -d $(DESTDIR)$(DATA_PREFIX)
+ install -d $(DESTDIR)$(MAN_PREFIX)/man/man6/
+ install -d $(DESTDIR)$(BIN_PREFIX)
+ cp -R data/* $(DESTDIR)$(DATA_PREFIX)
+ chmod -R a+rX,g-w,o-w $(DESTDIR)$(DATA_PREFIX)
+ strip defendguin
+ cp defendguin $(DESTDIR)$(BIN_PREFIX)/
+ chmod a+rx,g-w,o-w $(DESTDIR)$(BIN_PREFIX)/defendguin
+ cp src/defendguin.6 $(DESTDIR)$(MAN_PREFIX)/man/man6/
+ chmod a+rx,g-w,o-w $(DESTDIR)$(MAN_PREFIX)/man/man6/defendguin.6
+ gzip -9 $(DESTDIR)$(MAN_PREFIX)/man/man6/defendguin.6
uninstall:
-rm -r $(DATA_PREFIX)

View file

@ -6,7 +6,7 @@ diff -Naur defendguin-0.0.11/src/defendguin.6 defendguin-0.0.11.patched/src/defe
Displays acceptable command\-line options. Displays acceptable command\-line options.
.SH "FILES" .SH "FILES"
-\fI/usr/local/share/defendguin/\fP \- Sound, music and graphics data. -\fI/usr/local/share/defendguin/\fP \- Sound, music and graphics data.
+\fI/usr/share/defendguin/\fP \- Sound, music and graphics data. +\fI/usr/share/games/defendguin/\fP \- Sound, music and graphics data.
+.LP +.LP
+\fI~/.defendguinrc\fP \- Per\-user settings +\fI~/.defendguinrc\fP \- Per\-user settings
.LP .LP