summaryrefslogtreecommitdiff
path: root/graphics/qcomicbook/qcomicbook.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/qcomicbook/qcomicbook.SlackBuild')
-rw-r--r--graphics/qcomicbook/qcomicbook.SlackBuild56
1 files changed, 56 insertions, 0 deletions
diff --git a/graphics/qcomicbook/qcomicbook.SlackBuild b/graphics/qcomicbook/qcomicbook.SlackBuild
new file mode 100644
index 0000000000..445943c2ac
--- /dev/null
+++ b/graphics/qcomicbook/qcomicbook.SlackBuild
@@ -0,0 +1,56 @@
+#!/bin/sh
+
+# Slackware build script for QComicBook
+
+# Written by Amiralul (tanaselia@gmail.com)
+
+PRGNAM=qcomicbook
+VERSION=0.3.4
+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
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man
+
+make
+make install DESTDIR=$PKG
+
+gzip -9 $PKG/usr/man/man1/$PRGNAM.1
+
+( 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
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz