summaryrefslogtreecommitdiff
path: root/desktop/desklaunch/desklaunch.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/desklaunch/desklaunch.SlackBuild')
-rw-r--r--desktop/desklaunch/desklaunch.SlackBuild66
1 files changed, 66 insertions, 0 deletions
diff --git a/desktop/desklaunch/desklaunch.SlackBuild b/desktop/desklaunch/desklaunch.SlackBuild
new file mode 100644
index 0000000000..0b6bc1b978
--- /dev/null
+++ b/desktop/desklaunch/desklaunch.SlackBuild
@@ -0,0 +1,66 @@
+#!/bin/sh
+
+######################################
+# Slackware Build Script #
+######################################
+# BUILDS: Desklaunch #
+# HOME: http://www.oroborus.org #
+# AUTHOR: Lehman Black #
+# CONTACT: bzqwerty[at]gmail[dot]com #
+######################################
+
+# Modified by the SlackBuilds.org project
+
+PRGNAM=desklaunch
+VERSION=1.1.5
+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" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+fi
+
+rm -rf $PKG $PRGNAM-$VERSION
+mkdir -p $TMP $PKG/usr/bin $OUTPUT
+cd $TMP
+tar xvf $CWD/${PRGNAM}_$VERSION.tar.gz || exit 1
+cd $PRGNAM-$VERSION
+chown -R root:root .
+chmod -R a-s,u+w,go+r-w .
+
+# Modify the Makefile so it will use custom CFLAGS if needed
+sed -i 's%CFLAGS =%CFLAGS +=%g' Makefile
+
+CFLAGS="$SLKCFLAGS" make || exit 1
+
+# Rather than use the install target in the Makefile, let's just install the
+# binary manually into the package directory - this avoids having to remove
+# directories that are unnecessarily created by the install target
+install -D -m 0755 desklaunch $PKG/usr/bin/desklaunch
+
+strip --strip-unneeded $PKG/usr/bin/desklaunch
+
+# Install the example desklaunchrc file provided by Debian :)
+cat debian/example_rc > $PKG/usr/doc/$PRGNAM-$VERSION/desklaunchrc.example
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a README LICENSE $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/usr/man/man1
+cat debian/desklaunch.1 | gzip -9 > $PKG/usr/man/man1/desklaunch.1.gz
+
+mkdir -p $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