diff options
Diffstat (limited to 'desktop/kbfx/kbfx.SlackBuild')
-rw-r--r-- | desktop/kbfx/kbfx.SlackBuild | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/desktop/kbfx/kbfx.SlackBuild b/desktop/kbfx/kbfx.SlackBuild new file mode 100644 index 0000000000000..fa4e7d2bf7dab --- /dev/null +++ b/desktop/kbfx/kbfx.SlackBuild @@ -0,0 +1,63 @@ +#!/bin/sh + +# Slackware build script for kbfx + +# Written by core (eroc@linuxmail.org) + +set -e + +PRGNAM=kbfx +VERSION=0.4.9.3.1 +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +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 +rm -rf $PRGNAM-$VERSION +tar -jxvf $CWD/$PRGNAM-$VERSION.tar.bz2 +cd $PRGNAM-$VERSION +chown -R root:root . +chmod -R u+w,go+r-w,a-s . + +KDEPREF=$(kde-config --prefix) || true + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +cmake -DCMAKE_INSTALL_PREFIX=$KDEPREF + +make +make install DESTDIR=$PKG + +( 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 +) + +# Correct the permisions for the libs +find $PKG/usr/lib/ -type f -exec chmod 755 {} \; + +# The documentation (HTML/ and $PRGNAM-$VERSION/ dirs) is +# under $PKG/usr/share/doc so just lets move $PRGNAM-$VERSION +# to the right place. +mkdir -p $PKG/usr/doc +mv $PKG/usr/share/doc/$PRGNAM-$VERSION $PKG/usr/doc +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz |