summaryrefslogtreecommitdiffstats
path: root/libraries/lensfun/lensfun.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/lensfun/lensfun.SlackBuild')
-rw-r--r--libraries/lensfun/lensfun.SlackBuild43
1 files changed, 23 insertions, 20 deletions
diff --git a/libraries/lensfun/lensfun.SlackBuild b/libraries/lensfun/lensfun.SlackBuild
index ebc6b3c1eb..fa141a61a4 100644
--- a/libraries/lensfun/lensfun.SlackBuild
+++ b/libraries/lensfun/lensfun.SlackBuild
@@ -3,6 +3,7 @@
# Slackware build script of lensfun
# Copyright 2009 Ricardson Williams <ricardsonwilliams at yahoo.com.br>
+# Copyright 2013 Willy Sudiarto Raharjo <willysr@slackbuilds.org>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,7 +25,7 @@
PRGNAM=lensfun
VERSION=${VERSION:-0.2.8}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -54,36 +55,38 @@ else
LIBDIRSUFFIX=""
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 -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
- ./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
- || exit 1
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-make install DESTDIR=$PKG || exit 1
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DCMAKE_BUILD_TYPE=Release ..
+ 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
+find $PKG -print0 | xargs -0 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
-)
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a README docs/*.txt $PKG/usr/doc/$PRGNAM-$VERSION
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc