diff options
Diffstat (limited to 'games/solarus-quest-editor/solarus-quest-editor.SlackBuild')
-rw-r--r-- | games/solarus-quest-editor/solarus-quest-editor.SlackBuild | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/games/solarus-quest-editor/solarus-quest-editor.SlackBuild b/games/solarus-quest-editor/solarus-quest-editor.SlackBuild index b332f2260a..2947201d76 100644 --- a/games/solarus-quest-editor/solarus-quest-editor.SlackBuild +++ b/games/solarus-quest-editor/solarus-quest-editor.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for solarus-quest-editor -# Copyright 2015 Hunter Sezen California, USA +# Copyright 2015-2016 Hunter Sezen California, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,13 +23,13 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=solarus-quest-editor -VERSION=${VERSION:-1.4.5} +VERSION=${VERSION:-1.5.0} 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 @@ -40,8 +40,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" @@ -60,7 +60,7 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || tar xvf $CWD/v$VERSION.tar.gz +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION chown -R root:root . find -L . \ @@ -69,15 +69,21 @@ 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 {} \; +# Add DSOLARUS_INSTALL_BINDIR and DSOLARUS_INSTALL_DATADIR +# https://github.com/solarus-games/solarus-quest-editor/commit/286fa0823c78e38f8fef128ca7f86e85dcf1ab3f +zcat $CWD/cmake.diff.gz | patch -p1 + mkdir -p build cd build cmake \ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_INSTALL_PREFIX=/usr \ + -DSOLARUS_INSTALL_BINDIR:PATH=games \ + -DSOLARUS_INSTALL_DATADIR:PATH=share/games/$PRGNAM \ -DCMAKE_BUILD_TYPE=Release .. make - install -Dm0755 $PRGNAM $PKG/usr/bin/$PRGNAM + make install DESTDIR=$PKG cd .. install -Dm0644 images/logo/sqe-logo.png $PKG/usr/share/pixmaps/sqe-logo.png @@ -87,16 +93,15 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true # Add missing icons to package -for size in $(find /usr/share/icons/hicolor -type d -mindepth 1 -maxdepth 1 -exec basename {} \; | cut -f1 -d"x"); do - if ls images/icon/*${size}* 1>/dev/null 2>/dev/null; then - mkdir -p $PKG/usr/share/icons/hicolor/${size}x${size}/apps - cp -a images/icon/*${size}*.png \ - $PKG/usr/share/icons/hicolor/${size}x${size}/apps - fi +for pngicon in images/icon/*.png ; do + if [ -f $pngicon ]; then + size=$(basename $pngicon .png | tr -dc 0-9) + install -Dm0644 $pngicon $PKG/usr/share/icons/hicolor/${size}x${size}/apps/$PRGNAM.png + fi done mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a ChangeLog README.md license*.txt $PKG/usr/doc/$PRGNAM-$VERSION +cp -a changelog.txt license*.txt README.md $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install |