diff options
Diffstat (limited to 'games/crossfire-client/crossfire-client.SlackBuild')
-rw-r--r-- | games/crossfire-client/crossfire-client.SlackBuild | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/games/crossfire-client/crossfire-client.SlackBuild b/games/crossfire-client/crossfire-client.SlackBuild index 45aab1334d..3831085573 100644 --- a/games/crossfire-client/crossfire-client.SlackBuild +++ b/games/crossfire-client/crossfire-client.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for crossfire-client -# Copyright 2014-2016 Dimitris Zlatanidis Orestiada, Greece +# Copyright 2014-2017 Dimitris Zlatanidis Orestiada, Greece # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,7 +23,8 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=crossfire-client -VERSION=${VERSION:-1.71.0} +SRCSOUNDS=$(printf $PRGNAM | cut -c1-9) +VERSION=${VERSION:-1.72.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -62,6 +63,7 @@ cd $TMP rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 cd $PRGNAM-$VERSION +tar xvf $CWD/$SRCSOUNDS-sounds-$VERSION.tar.bz2 chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -69,36 +71,35 @@ 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 {} \; -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ -./configure \ - --prefix=/usr \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --mandir=/usr/man \ - --docdir=/usr/doc/$PRGNAM-$VERSION \ - --datadir=/usr/share/games \ - --with-sound-dir=/usr/share/games/$PRGNAM \ - --build=$ARCH-slackware-linux - -make -make install DESTDIR=$PKG +mkdir -p build +cd build + cmake \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIB_SUFFIX=${LIBDIRSUFFIX} \ + -DMAN_INSTALL_DIR=/usr/man \ + -DSOUND=ON \ + -DLUA=ON \ + -DCMAKE_BUILD_TYPE=Release .. + make + make install DESTDIR=$PKG +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/share/$PRGNAM +cp -rf $SRCSOUNDS-sounds-$VERSION/* $PKG/usr/share/$PRGNAM + mkdir -p $PKG/usr/share/applications install -D -m644 $CWD/$PRGNAM.desktop $PKG/usr/share/applications/$PRGNAM.desktop mkdir -p $PKG/usr/share/pixmaps/ install -D -m644 pixmaps/48x48.png $PKG/usr/share/pixmaps/$PRGNAM.png -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 - mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a AUTHORS COPYING ChangeLog NEWS README TODO $PKG/usr/doc/$PRGNAM-$VERSION +cp -a AUTHORS COPYING ChangeLog README.rst TODO $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install |