diff options
author | B. Watson <yalhcru@gmail.com> | 2021-10-31 17:44:49 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2021-12-04 10:08:52 +0700 |
commit | a652a390609b4d4b91e4fc0faac6d01113c18542 (patch) | |
tree | 6e1d48db8bda5ae51478ae40dcf00e425a87c9ff /games | |
parent | 3e1f96eb3bfc8f7560365b6a3cc30695e44306f1 (diff) | |
download | slackbuilds-a652a390609b4d4b91e4fc0faac6d01113c18542.tar.gz |
games/liquidwar6: Fix -current build, include extra maps.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games')
-rw-r--r-- | games/liquidwar6/README | 11 | ||||
-rw-r--r-- | games/liquidwar6/doinst.sh | 9 | ||||
-rw-r--r-- | games/liquidwar6/douninst.sh | 7 | ||||
-rw-r--r-- | games/liquidwar6/liquidwar6.SlackBuild | 75 | ||||
-rw-r--r-- | games/liquidwar6/liquidwar6.desktop | 6 | ||||
-rw-r--r-- | games/liquidwar6/liquidwar6.info | 10 | ||||
-rw-r--r-- | games/liquidwar6/liquidwar6.png | bin | 1198 -> 0 bytes | |||
-rw-r--r-- | games/liquidwar6/slack-desc | 2 |
8 files changed, 72 insertions, 48 deletions
diff --git a/games/liquidwar6/README b/games/liquidwar6/README index 409b7eb380..0b5348a7bb 100644 --- a/games/liquidwar6/README +++ b/games/liquidwar6/README @@ -1,3 +1,5 @@ +liquidwar6 (multiplayer war game) + Liquid War 6 is a unique multiplayer wargame. Your army is a blob of liquid and you have to try and eat your opponents. Rules are very simple yet original, they have been invented by Thomas Colcombet. It @@ -5,13 +7,8 @@ is possible to play alone against the computer but the game is really designed to be played with friends, on a single computer, on a LAN, or on Internet. -If you'd like this package to include -some extra game maps, get them from: -http://download.savannah.gnu.org/releases/liquidwar6/0.0.13beta/liquidwar6-extra-maps-0.0.13beta.tar.gz - -Place the liquidwar6-extra-maps-0.0.6beta.tar.gz file in the same -directory with liquidwar6.SlackBuild before building the package. - The documentation for liquidwar6 is installed as info pages, use "info liquidwar6" to read. The liquidwar v5 docs might also be useful: http://www.ufoot.org/liquidwar/v5/doc + +The package includes the extra game maps, version 0.0.13beta. diff --git a/games/liquidwar6/doinst.sh b/games/liquidwar6/doinst.sh index 4e8ba7071d..4eef1366a2 100644 --- a/games/liquidwar6/doinst.sh +++ b/games/liquidwar6/doinst.sh @@ -2,3 +2,12 @@ if [ -x /usr/bin/update-desktop-database ]; then /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 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 usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi + +if [ -x /usr/bin/install-info ]; then + /usr/bin/install-info usr/info/liquidwar6.info.gz usr/info/dir +fi diff --git a/games/liquidwar6/douninst.sh b/games/liquidwar6/douninst.sh new file mode 100644 index 0000000000..1f6dd55f77 --- /dev/null +++ b/games/liquidwar6/douninst.sh @@ -0,0 +1,7 @@ +# since our info file ends up in the 'Miscellaneous' section, we won't +# worry about removing the section if it's empty (because it won't be, +# because various Slackware packages use the same section). + +if [ -e usr/info/dir ]; then + sed -i '/^\* Liquid War 6:/d' usr/info/dir +fi diff --git a/games/liquidwar6/liquidwar6.SlackBuild b/games/liquidwar6/liquidwar6.SlackBuild index 14b78e0112..2a7b2b58a0 100644 --- a/games/liquidwar6/liquidwar6.SlackBuild +++ b/games/liquidwar6/liquidwar6.SlackBuild @@ -6,16 +6,25 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20211031 bkw: BUILD=3 +# - fix build on -current again. +# - use upstream's icon and .desktop. +# - install/remove info file in doinst/douninst. +# - new-style icons. +# - always include the extra game maps. they don't take up much space, +# and it's one less hoop to make people jump through. + # 20170621 bkw: fix build on -current cd $(dirname $0) ; CWD=$(pwd) PRGNAM=liquidwar6 VERSION=${VERSION:-0.6.3902} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} +MAPVER=${MAPVER:-0.0.13beta} SHORTNAM=${PRGNAM/[0-9]*/} if [ -z "$ARCH" ]; then @@ -26,9 +35,6 @@ if [ -z "$ARCH" ]; then esac fi -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -60,21 +66,28 @@ cd $TMP rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-extra-maps-$MAPVER.tar.gz 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 \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ # -current needs this: sed -i 's,-Werror,,' configure +# 20211031 bkw: it looks like we ought to be able to force the +# guile-config binary by setting GUILE_CONFIG in the env, but later +# on the configure script uses the hard-coded name "guile-config" (the +# one we want is "guile-config1.8"). So: +mkdir -p fakebin +ln -s /usr/bin/guile-config1.8 fakebin/guile-config +export PATH=$(pwd)/fakebin:$PATH + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --bindir=/usr/games \ + --datadir=/usr/share/games \ --sysconfdir=/etc \ --localstatedir=/var \ --libdir=/usr/lib${LIBDIRSUFFIX} \ @@ -87,17 +100,31 @@ CXXFLAGS="$SLKCFLAGS" \ make make install-strip DESTDIR=$PKG +DIRVER="$( echo $VERSION | cut -d. -f1,2 )" +EXTRADIR=$PKG/usr/share/games/$PRGNAM-$DIRVER/map/extra +mkdir -p $EXTRADIR +cp -r $PRGNAM-extra-maps-$MAPVER/map/* $EXTRADIR + +# the .desktop and icon should be installed in --datarootdir, not +# --datadir. Sigh. +mv $PKG/usr/share/games/applications $PKG/usr/share/applications +sed -i 's,Exec=,&/usr/games/,' $PKG/usr/share/applications/$PRGNAM.desktop +mv $PKG/usr/share/games/pixmaps $PKG/usr/share/pixmaps +rm -f $PKG/usr/share/pixmaps/$PRGNAM.png +# pixmaps still contains upstream's 48x48 xpm icon. + +for px in 16 32 48 64 128; do + size=${px}x${px} + dir=$PKG/usr/share/icons/hicolor/$size/apps + mkdir -p $dir + convert -resize $size data/icon/$PRGNAM.png $dir/$PRGNAM.png +done + gzip $PKG/usr/man/man6/$PRGNAM.6 ( cd $PKG/usr/man/man6 ; ln -s $PRGNAM.6.gz $SHORTNAM.6.gz ) ( cd $PKG/usr/games ; ln -s $PRGNAM $SHORTNAM ) -# PNG icon converted from data/net/htdocs/favicon.ico -mkdir -p $PKG/usr/share/pixmaps -cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png - -mkdir -p $PKG/usr/share/applications -cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop - +# see doinst.sh and douninst.sh, for how to install/remove info files. rm -f $PKG/usr/info/dir gzip -9 $PKG/usr/info/* @@ -110,21 +137,9 @@ cp -a README NEWS ChangeLog COPYING AUTHORS $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install -cat $CWD/slack-desc > $PKG/install/slack-desc +sed "s,@MAPVER@,$MAPVER," $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh - -# If the extra-maps source is found, install it -# (do this last so we can edit the slack-desc in place) -if [ -r $CWD/$PRGNAM-extra-maps-$VERSION.tar.gz ]; then - ( cd $TMP - tar xvf $CWD/$PRGNAM-extra-maps-$VERSION.tar.gz - mkdir -p $PKG/usr/share/$PRGNAM-$VERSION/map/extra - cp -r $PRGNAM-extra-maps-$VERSION/map/* \ - $PKG/usr/share/$PRGNAM-$VERSION/map/extra - ) - sed -i -e '18s/:/: This package includes the extra game maps./' \ - $PKG/install/slack-desc -fi +cat $CWD/douninst.sh > $PKG/install/douninst.sh cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/games/liquidwar6/liquidwar6.desktop b/games/liquidwar6/liquidwar6.desktop deleted file mode 100644 index 9d3b2dd5e7..0000000000 --- a/games/liquidwar6/liquidwar6.desktop +++ /dev/null @@ -1,6 +0,0 @@ -[Desktop Entry] -Name=Liquid War 6 -Exec=liquidwar6 -Type=Application -Icon=liquidwar6 -Categories=Game;StrategyGame; diff --git a/games/liquidwar6/liquidwar6.info b/games/liquidwar6/liquidwar6.info index aeb771ecbf..9ecb3bbb7a 100644 --- a/games/liquidwar6/liquidwar6.info +++ b/games/liquidwar6/liquidwar6.info @@ -1,10 +1,12 @@ PRGNAM="liquidwar6" VERSION="0.6.3902" -HOMEPAGE="http://www.gnu.org/software/liquidwar6/" -DOWNLOAD="http://ftp.gnu.org/gnu/liquidwar6/liquidwar6-0.6.3902.tar.gz" -MD5SUM="e83e4eb4ebd655d61c09e30a9aae3a0c" +HOMEPAGE="https://www.gnu.org/software/liquidwar6/" +DOWNLOAD="https://ftp.gnu.org/gnu/liquidwar6/liquidwar6-0.6.3902.tar.gz \ + https://download.savannah.gnu.org/releases/liquidwar6/0.0.13beta/liquidwar6-extra-maps-0.0.13beta.tar.gz" +MD5SUM="e83e4eb4ebd655d61c09e30a9aae3a0c \ + cd104827e9cb96384ab8e2583dfa05c9" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="" +REQUIRES="guile1.8" MAINTAINER="B. Watson" EMAIL="yalhcru@gmail.com" diff --git a/games/liquidwar6/liquidwar6.png b/games/liquidwar6/liquidwar6.png Binary files differdeleted file mode 100644 index b7885181ba..0000000000 --- a/games/liquidwar6/liquidwar6.png +++ /dev/null diff --git a/games/liquidwar6/slack-desc b/games/liquidwar6/slack-desc index 38ccb9537e..e9a18bf2f9 100644 --- a/games/liquidwar6/slack-desc +++ b/games/liquidwar6/slack-desc @@ -15,5 +15,5 @@ liquidwar6: is possible to play alone against the computer but the game is reall liquidwar6: designed to be played with friends, on a single computer, on a LAN, liquidwar6: or on the Internet. liquidwar6: -liquidwar6: +liquidwar6: This package includes the extra game maps, version @MAPVER@. liquidwar6: |