summaryrefslogtreecommitdiff
path: root/games/ksudoku/ksudoku.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/ksudoku/ksudoku.SlackBuild')
-rw-r--r--games/ksudoku/ksudoku.SlackBuild59
1 files changed, 23 insertions, 36 deletions
diff --git a/games/ksudoku/ksudoku.SlackBuild b/games/ksudoku/ksudoku.SlackBuild
index b96673983e..6bead1f9ff 100644
--- a/games/ksudoku/ksudoku.SlackBuild
+++ b/games/ksudoku/ksudoku.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for ksudoku
-# Copyright 2006 Halim Issa <yallaone@gmail.com>
+# Copyright 2007 Christophe Nguyen <cnguyenminhtan@free.fr>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,65 +22,52 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# Slightly ammended by the slackbuilds.org project.
+
PRGNAM=ksudoku
-VERSION=0.3
+VERSION=0.4
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-CWD=`pwd`
+CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-DOCS="AUTHORS COPYING ChangeLog* INSTALL NEWS README TODO VERSION"
+DOCS="AUTHORS COPYING ChangeLog INSTALL README TODO VERSION"
-case "$ARCH" in
- i486) SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- ;;
- i686) SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- ;;
- s390) SLKCFLAGS="-O2"
- ;;
- powerpc) SLKCFLAGS="-O2"
- ;;
- x86_64) SLKCFLAGS="-O2 -fPIC"
- SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"
- ;;
- athlon-xp) SLKCFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer"
- ;;
-esac
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+fi
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP || exit 1
rm -rf $PRGNAM-$VERSION
-tar -xvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1
cd $PRGNAM-$VERSION || exit 1
chown -R root:root .
chmod -R a-s,u+w,go-w+r .
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/opt/kde \
- --localstatedir=/var \
- --sysconfdir=/etc \
- --disable-debug \
- || exit 1
+cmake \
+ -DCMAKE_C_FLAGS:STRING="${SLKCFLAGS}" \
+ -DCMAKE_CXX_FLAGS:STRING="${SLKCFLAGS}" \
+ -DCMAKE_INSTALL_PREFIX=/usr . || exit 1
-make || exit 1
-make install-strip DESTDIR=$PKG || exit 1
+make VERBOSE=1
+make install VERBOSE=1 DESTDIR=$PKG || exit 1
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
chmod -R 0644 $PKG/usr/doc/$PRGNAM-$VERSION/*
-if [ -d $PKG/opt/kde/share/man ]; then
- ( cd $PKG/opt/kde/share/man
- find . -type f -exec gzip -9 {} \;
- for i in `find . -type l` ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
- )
-fi
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+)
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc