summaryrefslogtreecommitdiff
path: root/games/redeclipse/redeclipse.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/redeclipse/redeclipse.SlackBuild')
-rw-r--r--games/redeclipse/redeclipse.SlackBuild51
1 files changed, 31 insertions, 20 deletions
diff --git a/games/redeclipse/redeclipse.SlackBuild b/games/redeclipse/redeclipse.SlackBuild
index a606ed8ce4..5507472d5f 100644
--- a/games/redeclipse/redeclipse.SlackBuild
+++ b/games/redeclipse/redeclipse.SlackBuild
@@ -2,6 +2,7 @@
# Slackware build script for Red Eclipse
+# Copyright 2017 Jeremy Hansen <jebrhansen+SBo -at- gmail.com>
# Copyright 2015 Erik Falor USA
# All rights reserved.
#
@@ -23,14 +24,14 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=redeclipse
-VERSION=${VERSION:-1.5.1}
+VERSION=${VERSION:-1.5.8}
SRCNAM=base
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -41,8 +42,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"
@@ -63,6 +64,15 @@ cd $TMP
rm -rf $SRCNAM-$VERSION
tar xvf $CWD/${SRCNAM}-${VERSION}.tar.gz
cd $SRCNAM-$VERSION
+
+# Unpack the submodules
+for SUBMODULE in `cat $CWD/submodules-list`; do
+ rm -r data/$SUBMODULE
+ tar xvf $CWD/${SUBMODULE}-${VERSION}.tar.gz
+ mv ${SUBMODULE}-${VERSION} data/${SUBMODULE}
+ rm data/${SUBMODULE}/.gitmodules
+done
+
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -70,27 +80,28 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-# remove the pre-built binaries
-rm -rf bin/*
-
-# Compile the application using custom SLKCFLAGS
-(
- cd src
- cp ../doc/man/cube2font.1 install/nix
+# Compile the application and install it into the $PKG directory
+export CXXFLAGS="$SLKCFLAGS"
+make -C src/ client server cube2font
+make -C src/ \
+ DESTDIR=$PKG \
+ prefix=/usr \
+ libexecdir=$PKG/usr/libexec \
+ mandir=$PKG/usr/man \
+ system-install system-install-cube2font
- make EXTRA_CXXFLAGS="$SLKCFLAGS" all cube2font
- make DESTDIR=$PKG system-install system-install-cube2font
-)
+# Strip binaries and libraries
+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
-mv $PKG/usr/local/* $PKG/usr/
-mv $PKG/usr/share/man/ $PKG/usr
-rm -rf $PKG/usr/local
+# Compress man pages
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
# Copy program documentation into the package
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a doc/all-licenses.txt doc/cc-by-sa.txt doc/changelog.txt doc/cube2font.txt \
- doc/license.txt doc/trademark.txt \
- $PKG/usr/doc/$PRGNAM-$VERSION
+cp doc/*.txt $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
# Copy slack-desc and doinst.sh into ./install
mkdir -p $PKG/install