summaryrefslogtreecommitdiff
path: root/graphics/kipi-plugins/kipi-plugins.SlackBuild
diff options
context:
space:
mode:
authorFrank Caraballo <fecaraballo{at}gmail{dot}com>2010-05-13 00:28:02 +0200
committerMichiel van Wessem <michiel@slackbuilds.org>2010-05-13 00:28:02 +0200
commit3db1ea440a61bb6db6013c34a9aa360bce4d005a (patch)
treea8391ac109e02ca34f516294d41d2e4bb16b2772 /graphics/kipi-plugins/kipi-plugins.SlackBuild
parentbe7f0f78881b770542523b0fb1b898f3c29bbe78 (diff)
downloadslackbuilds-3db1ea440a61bb6db6013c34a9aa360bce4d005a.tar.gz
graphics/kipi-plugins: Updated for version 1.0.0
Diffstat (limited to 'graphics/kipi-plugins/kipi-plugins.SlackBuild')
-rw-r--r--graphics/kipi-plugins/kipi-plugins.SlackBuild55
1 files changed, 32 insertions, 23 deletions
diff --git a/graphics/kipi-plugins/kipi-plugins.SlackBuild b/graphics/kipi-plugins/kipi-plugins.SlackBuild
index 60148be143..913edad2a3 100644
--- a/graphics/kipi-plugins/kipi-plugins.SlackBuild
+++ b/graphics/kipi-plugins/kipi-plugins.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for Kipi Plugins
-# Copyright 2007-2009 Frank Caraballo <fecaraballo{at}gmail{dot}com>
+# Copyright 2007-2010 Frank Caraballo <fecaraballo{at}gmail{dot}com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=kipi-plugins
-VERSION=${VERSION:-0.1.7}
+VERSION=${VERSION:-1.0.0}
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -35,18 +35,23 @@ 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"
fi
+set -e
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
-cd $TMP || exit 1
+cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.?z* || exit 1
-cd $PRGNAM-$VERSION || exit 1
+tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
+cd $PRGNAM-$VERSION
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -54,33 +59,37 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-KDEPREF=$(kde-config --prefix) || exit 1
-
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=$KDEPREF \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=$KDEPREF/man \
- --build=$ARCH-slackware-linux \
- || exit 1
+# Patch kipi-plugins so it compiles on KDE 4.2.x
+# http://www.digikam.org/drupal/node/492
+patch -p1 < $CWD/$PRGNAM-kde4.2.patch
-make || exit 1
-make install-strip DESTDIR=$PKG || exit 1
+mkdir build && cd build
+ cmake \
+ -DCMAKE_C_FLAGS="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
+ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DLIB_INSTALL_DIR:PATH=/usr/lib${LIBDIRSUFFIX} \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ ..
+ make
+ make install DESTDIR=$PKG
+cd -
-( cd $PKG/$KDEPREF/man
- find . -type f -exec gzip -9 {} \;
- for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
)
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS ChangeLog COPYING INSTALL NEWS PACKAGING README RELEASE.rev TODO \
+cp -a AUTHORS ChangeLog COPYING* HACKING INSTALL NEWS README tips 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.tgz
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}