diff options
author | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2013-12-08 11:39:15 -0500 |
---|---|---|
committer | Erik Hanson <erik@slackbuilds.org> | 2013-12-14 10:52:14 -0600 |
commit | 28232feebadc51a2ead0b71343ab4cd715382c54 (patch) | |
tree | 73f4f0644bee08d78fa13d0e78f0bb2b1753a283 /libraries/lensfun/lensfun.SlackBuild | |
parent | 361d205921d9596fea5c4efa8f93d09b1ef0e37c (diff) |
libraries/lensfun: Switching to cmake, New maintainer.
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'libraries/lensfun/lensfun.SlackBuild')
-rw-r--r-- | libraries/lensfun/lensfun.SlackBuild | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/libraries/lensfun/lensfun.SlackBuild b/libraries/lensfun/lensfun.SlackBuild index ebc6b3c1eb697..fa141a61a4946 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 |