diff options
Diffstat (limited to 'source/l/exiv2/exiv2.SlackBuild')
-rwxr-xr-x | source/l/exiv2/exiv2.SlackBuild | 78 |
1 files changed, 40 insertions, 38 deletions
diff --git a/source/l/exiv2/exiv2.SlackBuild b/source/l/exiv2/exiv2.SlackBuild index c317a709..6d49c690 100755 --- a/source/l/exiv2/exiv2.SlackBuild +++ b/source/l/exiv2/exiv2.SlackBuild @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 2007 Frank Caraballo <fecaraballo{at}gmail{dot}com> -# Copyright 2008, 2009, 2011, 2015, 2017, 2018 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2008, 2009, 2011, 2015, 2017, 2018, 2019, 2020 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -26,9 +26,8 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=exiv2 -#VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -VERSION=${VERSION:-$(echo $PKGNAM-*-trunk.tar.xz | rev | cut -f 3- -d . | cut -f 2 -d - | rev)} -BUILD=${BUILD:-3} +VERSION=${VERSION:-$(echo $PKGNAM-*-Source.tar.?z | rev | cut -f 3- -d . | cut -f 2 -d - | rev)} +BUILD=${BUILD:-1} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then @@ -49,7 +48,7 @@ if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then fi TMP=${TMP:-/tmp} -PKG=$TMP/package-exiv2 +PKG=$TMP/package-$PKGNAM NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "} if [ "$ARCH" = "i586" ]; then @@ -69,12 +68,10 @@ fi rm -rf $PKG mkdir -p $TMP $PKG cd $TMP -rm -rf exiv2-$VERSION exiv2-trunk +rm -rf $PKGNAM-$VERSION-Source -#tar xvf $CWD/exiv2-$VERSION.tar.?z* || exit 1 -#cd exiv2-$VERSION || exit 1 -tar xvf $CWD/$PKGNAM-$VERSION-trunk.tar.xz || exit 1 -cd exiv2-trunk || exit 1 +tar xvf $CWD/$PKGNAM-$VERSION-Source.tar.?z || exit 1 +cd $PKGNAM-$VERSION-Source || exit 1 chown -R root:root . find . \ @@ -83,26 +80,26 @@ find . \ \( -perm 666 -o -perm 664 -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} \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --mandir=/usr/man \ - --enable-shared=yes \ - --enable-static=no \ - --enable-xmp \ - --enable-video \ - --enable-webready \ - --build=$ARCH-slackware-linux || exit 1 - -make $NUMJOBS || make || exit 1 -make install DESTDIR=$PKG || exit 1 - -# Don't ship .la files: -rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la +# Configure, build, and install: +mkdir cmake-build +cd cmake-build + cmake \ + -DCMAKE_C_FLAGS="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIB_SUFFIX="$LIBDIRSUFFIX" \ + -DMAN_INSTALL_DIR=/usr/man \ + -DBUILD_SHARED_LIBS=ON \ + -DEXIV2_ENABLE_CURL=ON \ + -DEXIV2_ENABLE_VIDEO=ON \ + -DEXIV2_ENABLE_WEBREADY==ON \ + -DEXIV2_ENABLE_XMP=ON \ + -DEXIV2_BUILD_SAMPLES=OFF \ + -DEXIV2_ENABLE_NLS=ON \ + .. || exit 1 + make $NUMJOBS || make || exit 1 + make install DESTDIR=$PKG || exit 1 +cd .. # Make sure shared libraries are executable: chmod 755 $PKG/usr/lib${LIBDIRSUFFIX}/lib*.so.* @@ -110,16 +107,21 @@ chmod 755 $PKG/usr/lib${LIBDIRSUFFIX}/lib*.so.* find $PKG | xargs file | grep -e "executable" -e "shared object" \ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -( 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 -) +# Move manpage directory: +mv $PKG/usr/share/man $PKG/usr -mkdir -p $PKG/usr/doc/exiv2-$VERSION +# Compress manual pages: +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 + +mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION cp -a \ - COPYING* README* \ + AUTHORS* CODING_GUIDELINES* CONTRIBUTING* COPYING* README* \ doc/{COPYING-XMPSDK,README-XMP,cmd.txt,cmdxmp.txt} \ - $PKG/usr/doc/exiv2-$VERSION + $PKG/usr/doc/$PKGNAM-$VERSION # If there's a ChangeLog, installing at least part of the recent history # is useful, but don't let it get totally out of control: @@ -133,5 +135,5 @@ mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG -/sbin/makepkg -l y -c n $TMP/exiv2-$VERSION-$ARCH-$BUILD.txz +/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz |