aboutsummaryrefslogtreecommitdiff
path: root/graphics/darktable/darktable.SlackBuild
diff options
context:
space:
mode:
authorDavid Spencer <baildon.research@googlemail.com>2010-09-12 11:17:26 -0500
committerRobby Workman <rworkman@slackbuilds.org>2010-09-12 23:08:54 -0500
commit959b26fabdc770a2454b560eb1f908693cdfea7d (patch)
tree46087b27cbc341b785b9a2ed1a45a8f89f88a85e /graphics/darktable/darktable.SlackBuild
parent37ec4c776304763b0c3fb65b1b9773c873bca38d (diff)
graphics/darktable: Added (digital photography application)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'graphics/darktable/darktable.SlackBuild')
-rw-r--r--graphics/darktable/darktable.SlackBuild100
1 files changed, 100 insertions, 0 deletions
diff --git a/graphics/darktable/darktable.SlackBuild b/graphics/darktable/darktable.SlackBuild
new file mode 100644
index 0000000000000..6450cf0dcdbbf
--- /dev/null
+++ b/graphics/darktable/darktable.SlackBuild
@@ -0,0 +1,100 @@
+#!/bin/sh
+
+# Slackware build script for darktable
+# Written by David Spencer <baildon.research@googlemail.com>
+# This script is dedicated to the public domain
+
+PRGNAM=darktable
+VERSION=${VERSION:-0.6}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+if [ ${GKEYRING:-no} = "yes" ]; then
+ WITHGKEYRING="--enable-gkeyring"
+else
+ WITHGKEYRING="--disable-gkeyring"
+fi
+
+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 .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Suppress warning from gconf
+sed -i -e '/gettext_domain/d' darktable.schemas.in
+
+# Fix --disable-gnome-keyring
+# http://sourceforge.net/mailarchive/forum.php?thread_name=4C7B76FF.6010503%40gmail.com&forum_name=darktable-devel
+patch -p1 <$CWD/darktable-0.6-gkeyring.patch
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --disable-static \
+ --build=$ARCH-slackware-linux \
+ $WITHGKEYRING
+
+make
+make install DESTDIR=$PKG
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+# configure --docdir is ignored, so fix the wrongly installed docs
+mv $PKG/usr/share/doc $PKG/usr
+mv $PKG/usr/doc/$PRGNAM $PKG/usr/doc/$PRGNAM-$VERSION
+# Add a few missed docs
+cp -a ChangeLog NEWS TODO $PKG/usr/doc/$PRGNAM-$VERSION
+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.${PKGTYPE:-tgz}