summaryrefslogtreecommitdiff
path: root/games/megaglest/megaglest.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/megaglest/megaglest.SlackBuild')
-rw-r--r--games/megaglest/megaglest.SlackBuild25
1 files changed, 12 insertions, 13 deletions
diff --git a/games/megaglest/megaglest.SlackBuild b/games/megaglest/megaglest.SlackBuild
index b7c36a3853..4e58f2f3b6 100644
--- a/games/megaglest/megaglest.SlackBuild
+++ b/games/megaglest/megaglest.SlackBuild
@@ -23,8 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=megaglest
-VERSION=${VERSION:-3.9.0.4}
-DATAVERSION=${DATAVERSION:-3.9.0}
+VERSION=${VERSION:-3.9.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -41,10 +40,6 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-# Directory names don't always follow the $PRGNAM-$VERSION convention.
-SRCDIR=$(tar -tf $CWD/$PRGNAM-source-$VERSION.tar.xz | head -1)
-DATADIR=$(tar -tf $CWD/$PRGNAM-data-$DATAVERSION.tar.xz | head -1)
-
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
@@ -64,11 +59,12 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $SRCDIR
+rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-source-$VERSION.tar.xz
-tar xvf $CWD/$PRGNAM-source-embedded-$DATAVERSION.tar.xz
-tar xvf $CWD/$PRGNAM-data-$DATAVERSION.tar.xz -C $SRCDIR
-cd $SRCDIR
+tar xvf $CWD/$PRGNAM-source-embedded-$VERSION.tar.xz
+tar xvf $CWD/$PRGNAM-data-$VERSION.tar.xz -C $PRGNAM-$VERSION
+cd $PRGNAM-$VERSION
+find . -type l -exec rm -f '{}' \;
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -82,6 +78,9 @@ install -D -m 0755 $CWD/xvfb-run $TMP/$SRCDIR/bin/xvfb-run
export PATH="$PATH:$TMP/$SRCDIR/bin"
patch -p1 < $CWD/megaglest-3.9.0-help2man.patch
+# Fix file location in CMakeLists.txt
+sed -i 's|data/glest_game/||' source/glest_game/CMakeLists.txt
+
mkdir build
cd build
cmake -G "Unix Makefiles" \
@@ -94,11 +93,11 @@ cd build
-DCMAKE_BUILD_TYPE=Release ..
make VERBOSE=1
- make -j1 install DESTDIR=$PKG
+ make install DESTDIR=$PKG
cd -
# Now install the game data
-cd $DATADIR
+cd $PRGNAM-$VERSION
cmake -G "Unix Makefiles" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release .
@@ -113,7 +112,7 @@ find $PKG/usr/man -type f -exec gzip -9 '{}' \;
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
- AUTHORS* CHANGELOG.txt COPYRIGHT* gnu_gpl_3.0.txt README{,.compiling-linux}.txt \
+ docs/* $PRGNAM-$VERSION/docs/{AUTHORS*,LICENSE*,README.data*,cc*}.txt \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild