aboutsummaryrefslogtreecommitdiff
path: root/games/openlierox
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2022-03-01 05:08:17 -0500
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-03-01 19:35:43 +0700
commita84a2399d7ec5c4aa3f587bcfc037bfd4a38d4d0 (patch)
tree48871860611869018566c41b77d8de655c5f4678 /games/openlierox
parent5e4a18289f64a0a3b26a29ad6395d5e5a1902029 (diff)
games/openlierox: Updated for version 20200424_d316c14.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/openlierox')
-rw-r--r--games/openlierox/doinst.sh6
-rw-r--r--games/openlierox/git2tarxz.sh52
-rw-r--r--games/openlierox/openlierox.SlackBuild55
-rw-r--r--games/openlierox/openlierox.info8
4 files changed, 100 insertions, 21 deletions
diff --git a/games/openlierox/doinst.sh b/games/openlierox/doinst.sh
index 5fb28930db0b9..3e5691a052b5b 100644
--- a/games/openlierox/doinst.sh
+++ b/games/openlierox/doinst.sh
@@ -1,3 +1,9 @@
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
diff --git a/games/openlierox/git2tarxz.sh b/games/openlierox/git2tarxz.sh
new file mode 100644
index 0000000000000..cdf33056a1574
--- /dev/null
+++ b/games/openlierox/git2tarxz.sh
@@ -0,0 +1,52 @@
+#!/bin/sh
+
+# Create source tarball from git repo, with generated version
+# number.
+
+# Note that this script doesn't need to be run as root. It does
+# need to be able to write to the current directory it's run from.
+
+# Takes one optional argument, which is the commit or tag to create
+# a tarball of. With no arg, HEAD is used.
+
+# If you're using this as a template for another script, beware it
+# has openlierox-specific code! A bunch of windows/osx/ios specific
+# directories get deleted.
+
+PRGNAM=openlierox
+CLONE_URL=https://github.com/albertz/openlierox
+
+set -e
+
+GITDIR=$( mktemp -dt $PRGNAM.git.XXXXXX )
+rm -rf $GITDIR
+git clone --depth 1 $CLONE_URL $GITDIR
+
+CWD="$( pwd )"
+cd $GITDIR
+
+if [ "$1" != "" ]; then
+ git reset --hard "$1" || exit 1
+fi
+
+GIT_SHA=$( git rev-parse --short HEAD )
+
+DATE=$( git log --date=format:%Y%m%d --format=%cd | head -1 )
+
+VERSION=${DATE}_${GIT_SHA}
+
+rm -rf .git
+find . -name .gitignore -print0 | xargs -0 rm -f
+
+# 20220301 bkw: remove the stuff we don't need.
+rm -rf build libs/breakpad/src/*/{windows,mac,ios} tools/*/build \
+ tools/OLXDedServerWindowsService
+
+cd "$CWD"
+rm -rf $PRGNAM-$VERSION $PRGNAM-$VERSION.tar.xz
+mv $GITDIR $PRGNAM-$VERSION
+tar cvfJ $PRGNAM-$VERSION.tar.xz $PRGNAM-$VERSION
+
+echo
+echo "Created tarball: $PRGNAM-$VERSION.tar.xz"
+echo "VERSION=$VERSION"
diff --git a/games/openlierox/openlierox.SlackBuild b/games/openlierox/openlierox.SlackBuild
index 2aaea0ba5f65d..9d6f96de32fe3 100644
--- a/games/openlierox/openlierox.SlackBuild
+++ b/games/openlierox/openlierox.SlackBuild
@@ -22,10 +22,18 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220222 bkw: Modified by SlackBuilds.org:
+# - update for v20200424_d316c14a8 (old version won't build on 15.0).
+# - new-style icons.
+# - binary in /usr/games.
+# - put man page in right place (/usr/man/man6).
+# - remove HawkNL dependency: it's bundled in the source and built
+# statically by default. freealut really is required though.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=openlierox
-VERSION=${VERSION:-20170313_3825306}
+VERSION=${VERSION:-20200424_d316c14}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -38,9 +46,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
@@ -70,42 +75,58 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.?z
+tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
cd $PRGNAM-$VERSION
+rm -f ./libs/breakpad/autotools/compile # broken symlink
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 {} \+
+# 20220301 bkw: disable BFD. it breaks the build, and it's only used
+# for backtraces if the game crashes.
mkdir -p build
cd build
cmake . \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
- -DBREAKPAD=off \
+ -DBREAKPAD=OFF \
+ -DHASBFD=OFF \
-DCMAKE_BUILD_TYPE=Release ..
- make
+ make VERBOSE=1
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 \
+mkdir -p $PKG/usr/games \
$PKG/usr/share/games/OpenLieroX
cp -rf share/gamedir/* $PKG/usr/share/games/OpenLieroX
-install -D -m0755 build/bin/openlierox $PKG/usr/bin/openlierox
+install -D -s -m0755 build/bin/openlierox $PKG/usr/games/openlierox
mkdir -p $PKG/usr/share/applications
-install -D -m644 share/$PRGNAM-$PRGNAM.desktop $PKG/usr/share/applications/$PRGNAM-$PRGNAM.desktop
+sed -e '/Exec=/s,=,=/usr/games/,' \
+ -e "/^Icon=/s,=.*,=$PRGNAM," \
+ < share/$PRGNAM-$PRGNAM.desktop \
+ > $PKG/usr/share/applications/$PRGNAM.desktop
+
+for i in share/*.png; do
+ px="$( echo $i | cut -d. -f2 )"
+ size=${px}x${px}
+ dir=$PKG/usr/share/icons/hicolor/$size/apps
+ mkdir -p $dir
+ cp -a $i $dir/$PRGNAM.png
+done
mkdir -p $PKG/usr/share/pixmaps
-install -D -m644 share/OpenLieroX.svg $PKG/usr/share/pixmaps/OpenLieroX.svg
+ln -s ../icons/hicolor/32x32/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
+
+mkdir -p $PKG/usr/man/man6
+gzip -9c < doc/$PRGNAM.6 > $PKG/usr/man/man6/$PRGNAM.6.gz
+rm -f doc/$PRGNAM.6
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a COPYING.LIB VERSION doc/* $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a README.md COPYING.LIB VERSION doc/* $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
diff --git a/games/openlierox/openlierox.info b/games/openlierox/openlierox.info
index f3115748bd0b0..86a6897bb34f0 100644
--- a/games/openlierox/openlierox.info
+++ b/games/openlierox/openlierox.info
@@ -1,10 +1,10 @@
PRGNAM="openlierox"
-VERSION="20170313_3825306"
+VERSION="20200424_d316c14"
HOMEPAGE="http://www.openlierox.net/"
-DOWNLOAD="http://ponce.cc/slackware/sources/repo/openlierox-20170313_3825306.tar.xz"
-MD5SUM="7540eab45506561ccae1e75cf42a8fdd"
+DOWNLOAD="https://slackware.uk/~urchlay/src/openlierox-20200424_d316c14.tar.xz"
+MD5SUM="c1559d7f041fe2a94b41c62dff1d81d7"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="HawkNL freealut"
+REQUIRES="freealut"
MAINTAINER="Dimitris Zlatanidis"
EMAIL="d.zlatanidis@gmail.com"