summaryrefslogtreecommitdiffstats
path: root/games/ggmud/ggmud.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/ggmud/ggmud.SlackBuild')
-rw-r--r--games/ggmud/ggmud.SlackBuild37
1 files changed, 22 insertions, 15 deletions
diff --git a/games/ggmud/ggmud.SlackBuild b/games/ggmud/ggmud.SlackBuild
index 6750a1ce21..2f746f1b22 100644
--- a/games/ggmud/ggmud.SlackBuild
+++ b/games/ggmud/ggmud.SlackBuild
@@ -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/