summaryrefslogtreecommitdiff
path: root/office/kdissert/kdissert.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'office/kdissert/kdissert.SlackBuild')
-rw-r--r--office/kdissert/kdissert.SlackBuild65
1 files changed, 65 insertions, 0 deletions
diff --git a/office/kdissert/kdissert.SlackBuild b/office/kdissert/kdissert.SlackBuild
new file mode 100644
index 0000000000..fe289c94b8
--- /dev/null
+++ b/office/kdissert/kdissert.SlackBuild
@@ -0,0 +1,65 @@
+#!/bin/sh
+
+# Slackware build script for: kdissert
+# Written by: Michiel van Wessem (BP{k}) <michiel@slackbuilds.org>
+# Modified by the SlackBuilds.org project
+
+set -e
+
+PRGNAM=kdissert
+VERSION=1.0.7
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+CWD=`pwd`
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+DOCFILES="AUTHORS COPYING INSTALL README ROADMAP"
+
+# Reset the WAF build System dir to something more saner.
+WAF_HOME=$TMP/$PRGNAM-$VERSION/waf-build
+export WAF_HOME
+
+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 $TMP/$PRGNAM-$VERSION
+tar -xjvf $CWD/$PRGNAM-$VERSION.tar.bz2
+cd $PRGNAM-$VERSION
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./waf configure \
+ --prefix=/opt/kde \
+ --destdir=$PKG
+
+./waf build
+./waf install --destdir=$PKG
+
+# Clean up the WAF_HOME variable now we don't need it.
+unset WAF_HOME
+
+( 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/usr/doc/$PRGNAM-$VERSION
+cp -a $DOCFILES $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \;
+
+mkdir $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz