games/ggmud: Updated for version 0.9.4.

Signed-off-by: B. Watson <yalhcru@gmail.com>
This commit is contained in:
B. Watson 2022-02-20 14:57:59 -05:00 committed by Robby Workman
parent d163408d55
commit 4e0cd39294
4 changed files with 35 additions and 20 deletions

View file

@ -0,0 +1,8 @@
#!/bin/sh
# wrapper script for ggmud, part of SlackBuilds.org ggmud build.
# written by B. Watson, licensed under the WTFPL.
# this script is needed because ggmud segfaults if it's started
# from anywhere but its install directory.
cd @OPT@/ggmud && exec ./ggmud "$@"

View file

@ -22,10 +22,22 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# 20220220 bkw: Modified by SlackBuilds.org:
# - fix build on 15.0.
# - updated for v0.9.4.
# - add wrapper script.
# - don't install useless xpm files in /usr/share/pixmaps.
# - fix .desktop file.
# In case you're wondering why so many of the icons inside the app
# show up as the red X (meaning 'missing icon'), it's nothing to do
# with the removed .xpm files. I don't actually care what causes it
# right this minute. When submissions are open again, the maintainer
# can figure it out. Meanwhile, the application at least builds and runs.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=ggmud
VERSION=${VERSION:-0.9.3}
VERSION=${VERSION:-0.9.4}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -38,9 +50,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
@ -74,19 +83,21 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar -xzvf $CWD/$PRGNAM-$VERSION-src.tgz
tar -xzvf $CWD/$PRGNAM-$VERSION-src.tgz || tar xvf $CWD/GGMud-src.tar.gz
cd $PRGNAM-$VERSION
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 {} \+
# Apply patch so everything will link correctly.
#cp $CWD/ggmud-link.diff $TMP/$PRGNAM-$VERSION
patch -p0 < $CWD/ggmud-link.diff
SLKCFLAGS+=" -fcommon"
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
@ -101,18 +112,14 @@ mkdir build && cd build
# and to keep from cluttering up /usr/bin with non binaries.
mkdir -p $PKG/$OPT/$PRGNAM
cp $TMP/$PRGNAM-$VERSION/build/$PRGNAM $PKG/$OPT/$PRGNAM
strip $PKG/$OPT/$PRGNAM/$PRGNAM
cp $TMP/$PRGNAM-$VERSION/gg_help.txt $PKG/$OPT/$PRGNAM
cp $TMP/$PRGNAM-$VERSION/leu/* $PKG/$OPT/$PRGNAM
cd -
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
cd $PKG/usr/bin
ln -s /opt/ggmud/ggmud .
)
mkdir -p $PKG/usr/games
sed "s,@OPT@,$OPT,g" < $CWD/$PRGNAM-wrapper.sh > $PKG/usr/games/$PRGNAM
chmod 0755 $PKG/usr/games/$PRGNAM
mkdir -p $PKG/usr/share/{applications,pixmaps}
cp $CWD/$PRGNAM.png $PKG/usr/share/pixmaps/

View file

@ -1,10 +1,10 @@
[Desktop Entry]
Comment=a MUD/MOO/MUSH terminal client
Comment[fr_FR]=un terminal client de MUD/MOO/MUSH
Exec=ggmud
Exec=/usr/games/ggmud
GenericName=MUD terminal client
GenericName[fr_FR]=terminal client de MUD
Icon=ggmud
Icon=/usr/share/pixmaps/ggmud.png
Name=ggmud
StartupNotify=true
Terminal=false

View file

@ -1,8 +1,8 @@
PRGNAM="ggmud"
VERSION="0.9.3"
VERSION="0.9.4"
HOMEPAGE="http://www.ggsoft.org/ggmud/index.html"
DOWNLOAD="http://downloads.sourceforge.net/ggmud/ggmud-0.9.3-src.tgz"
MD5SUM="b07b984f2286ff76def2bdd6016eabb5"
DOWNLOAD="https://downloads.sourceforge.net/project/ggmud/ggmud/0.9.4/GGMud-src.tar.gz"
MD5SUM="653a1cb6177b1d0419ee50597540b9e0"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""