diff options
Diffstat (limited to 'graphics/digikam/digikam.SlackBuild')
-rw-r--r-- | graphics/digikam/digikam.SlackBuild | 52 |
1 files changed, 30 insertions, 22 deletions
diff --git a/graphics/digikam/digikam.SlackBuild b/graphics/digikam/digikam.SlackBuild index 1f9a22d80489..52ea22c4df4a 100644 --- a/graphics/digikam/digikam.SlackBuild +++ b/graphics/digikam/digikam.SlackBuild @@ -24,11 +24,20 @@ # Modified by Niklas 'Nille' Åkerström for slackware64 and to use cmake. PRGNAM=digikam -VERSION=${VERSION:-1.0.0} -ARCH=${ARCH:-i486} +VERSION=${VERSION:-1.2.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) export ARCH=i486 ;; + arm*) export ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$( uname -m ) ;; + esac +fi + CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM @@ -40,6 +49,8 @@ elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" +else + SLKCFLAGS="-O2" fi set -e @@ -61,34 +72,31 @@ KDEPREF=kde4-config mkdir -p build cd build -cmake ..\ - -DCMAKE_C_FLAGS:STRING="${SLKCFLAGS}" \ - -DCMAKE_CXX_FLAGS:STRING="${SLKCFLAGS}" \ - -DCMAKE_INSTALL_PREFIX=$($KDEPREF --prefix) \ - -DLIB_SUFFIX=/usr/lib$($KDEPREF --libsuffix) \ - -DMAN_INSTALL_DIR=/usr/man \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_VERBOSE_MAKEFILE:BOOL="TRUE" - -make -make install DESTDIR=$PKG + cmake ..\ + -DCMAKE_C_FLAGS:STRING="${SLKCFLAGS}" \ + -DCMAKE_CXX_FLAGS:STRING="${SLKCFLAGS}" \ + -DCMAKE_INSTALL_PREFIX=$($KDEPREF --prefix) \ + -DLIB_SUFFIX=/usr/lib$($KDEPREF --libsuffix) \ + -DMAN_INSTALL_DIR=/usr/man \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_VERBOSE_MAKEFILE:BOOL="TRUE" + + make + make install DESTDIR=$PKG +cd .. find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true -( cd $PKG/usr/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 .. - +find $PKG/usr/man -type f -exec gzip -9 {} \; +find $PKG -type d -depth -exec rmdir {} \; 2>/dev/null || true + mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a AUTHORS ChangeLog COPYING* DESIGN HACKING INSTALL NEWS README tips TODO \ +cp -a \ + AUTHORS ChangeLog COPYING* DESIGN HACKING INSTALL NEWS README tips TODO \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild -find $PKG -type d -depth -exec rmdir {} \; 2>/dev/null - mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh |