diff options
Diffstat (limited to 'games/assaultcube/assaultcube.SlackBuild')
-rw-r--r-- | games/assaultcube/assaultcube.SlackBuild | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/games/assaultcube/assaultcube.SlackBuild b/games/assaultcube/assaultcube.SlackBuild index 778eb97be1..9444fd2ff4 100644 --- a/games/assaultcube/assaultcube.SlackBuild +++ b/games/assaultcube/assaultcube.SlackBuild @@ -6,16 +6,14 @@ SRCNAM=AssaultCube PRGNAM=assaultcube -VERSION=${VERSION:-1.0.4} -BUILD=${BUILD:-1} +VERSION=1.0.4 +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} -# Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i486 ;; arm*) ARCH=arm ;; - # Unless $ARCH is already set, use uname -m for all other archs: *) ARCH=$( uname -m ) ;; esac fi @@ -31,6 +29,8 @@ elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" +else + SLKCFLAGS="-O2" fi set -e @@ -38,10 +38,9 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf ${SRCNAM}_v1.0.2 -tar xvf $CWD/${SRCNAM}_v1.0.2.tar.bz2 -cd ${SRCNAM}_v1.0.2 -tar xvf $CWD/${SRCNAM}_v${VERSION}-Update.tar.bz2 +rm -rf ${SRCNAM}_v${VERSION} +tar xvf $CWD/${SRCNAM}_v${VERSION}.tar.bz2 +cd ${SRCNAM}_v${VERSION} chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ @@ -52,9 +51,10 @@ find . \ # We need to change the order of the enet libs and includes. Enet libs and include # directories need to be declared first as compile will fail if enet is already # installed on the system and the Makefile uses system files instead. Also, use -# custom SLKCFLAGS. +# custom SLKCFLAGS and remove precompiled binaries. patch -p1 < $CWD/Makefile.patch sed -i "s|-O2|$SLKCFLAGS|" source/enet/configure +rm -f bin_unix/* CXXOPTFLAGS="$SLKCFLAGS -fomit-frame-pointer" \ make -C source/src @@ -72,14 +72,17 @@ cp -ar \ find $PKG | xargs 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/share/{applications,pixmaps} +mkdir -p $PKG/usr/share/applications install -m 0644 $CWD/$PRGNAM.desktop $PKG/usr/share/applications -convert icon.ico $PRGNAM.png -install -m 0644 $PRGNAM-0.png $PKG/usr/share/pixmaps/$PRGNAM.png +for i in 16 32 64 96 128; do + convert icon.ico -resize ${i}x${i}! $PRGNAM-$i.png + install -D -m 0644 $PRGNAM-$i-0.png \ + $PKG/usr/share/icons/hicolor/${i}x${i}/apps/$PRGNAM.png +done mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a \ - source/*.txt source/src/*.txt docs \ + source/*.txt source/src/*.txt docs README.html \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild |