summaryrefslogtreecommitdiffstats
path: root/games/yamagi-quake2/yamagi-quake2.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/yamagi-quake2/yamagi-quake2.SlackBuild')
-rw-r--r--games/yamagi-quake2/yamagi-quake2.SlackBuild76
1 files changed, 50 insertions, 26 deletions
diff --git a/games/yamagi-quake2/yamagi-quake2.SlackBuild b/games/yamagi-quake2/yamagi-quake2.SlackBuild
index 62dd32cb31..c9fb85b741 100644
--- a/games/yamagi-quake2/yamagi-quake2.SlackBuild
+++ b/games/yamagi-quake2/yamagi-quake2.SlackBuild
@@ -25,19 +25,17 @@
# Includes components from the Arch Linux AUR builds.
PRGNAM=yamagi-quake2
-VERSION=${VERSION:-5.32}
+VERSION=${VERSION:-5.34}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-CTFVER=${CTFVER:-1.03}
-XATRIXVER=${XATRIXVER:-2.03}
-ROGUEVER=${ROGUEVER:-2.02}
-
-WITH_OPENAL=${WITH_OPENAL:-no}
+CTFVER=${CTFVER:-1.04}
+XATRIXVER=${XATRIXVER:-2.04}
+ROGUEVER=${ROGUEVER:-2.03}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -48,8 +46,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -80,12 +78,18 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-make WITH_OPENAL=$WITH_OPENAL
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make
+cd ..
mkdir -p $PKG/usr/{bin,share/quake2/{ctf,xatrix,rogue}}
-cp -r release/* $PKG/usr/share/quake2
+cp -r build/release/* $PKG/usr/share/quake2
mkdir -p $PKG/usr/share/quake2/baseq2
cp stuff/yq2.cfg $PKG/usr/share/quake2/baseq2
mkdir -p $PKG/usr/share/pixmaps
@@ -107,10 +111,16 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
- make
-cp -r release/* $PKG/usr/share/quake2/ctf
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make
+ cp -r Release/* $PKG/usr/share/quake2/ctf
+cd ..
install -D -m 755 $CWD/ctf.sh $PKG/usr/bin/ctf
# Mission Pack 1 support
@@ -126,10 +136,17 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
- make
-cp -r release/* $PKG/usr/share/quake2/xatrix
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make
+ cp -r Release/* $PKG/usr/share/quake2/xatrix
+cd ..
+
install -D -m 755 $CWD/xatrix.sh $PKG/usr/bin/xatrix
# Mission Pack 2 support
@@ -145,10 +162,17 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
- make
-cp -r release/* $PKG/usr/share/quake2/rogue
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make
+ cp -r Release/* $PKG/usr/share/quake2/rogue
+cd ..
+
install -D -m 755 $CWD/rogue.sh $PKG/usr/bin/rogue
find $PKG/usr/share/quake2 -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
@@ -161,7 +185,7 @@ mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/{ctf-$CTFVER,quake2-xatrix-$XATRIXVER,qua
cd $TMP
cp -a \
- quake2-$VERSION/{CHANGELOG,CONTRIBUTE,LICENSE,README,stuff/yq2.cfg} \
+ quake2-$VERSION/{CHANGELOG,CONTRIBUTE,LICENSE,README.md,stuff/yq2.cfg} \
$PKG/usr/doc/$PRGNAM-$VERSION
cp -a \