summaryrefslogtreecommitdiff
path: root/graphics/raw-thumbnailer/raw-thumbnailer.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/raw-thumbnailer/raw-thumbnailer.SlackBuild')
-rw-r--r--graphics/raw-thumbnailer/raw-thumbnailer.SlackBuild54
1 files changed, 33 insertions, 21 deletions
diff --git a/graphics/raw-thumbnailer/raw-thumbnailer.SlackBuild b/graphics/raw-thumbnailer/raw-thumbnailer.SlackBuild
index eb7477aaa4..cda4309671 100644
--- a/graphics/raw-thumbnailer/raw-thumbnailer.SlackBuild
+++ b/graphics/raw-thumbnailer/raw-thumbnailer.SlackBuild
@@ -2,6 +2,7 @@
# Slackware build script for raw-thumbnailer
# Copyright 2007-2011 Michiel van Wessem, Manchester, United Kingdom
+# Copyright 2019 B. Watson
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -23,14 +24,28 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# Now maintained by B. Watson <yalhcru@gmail.com>.
+
+# 20191231 bkw:
+# - take over maintenance
+# - update for v3.0.0
+# - i486 => i586
+# - don't install INSTALL or empty files in doc dir
+# - support both .gz and .bz2 tarballs, so we can still build v0.2.1
+# - add doinst.sh with update-mime-database
+# - fix slack-desc and README
+
+# Note to self: there's a bunch of sample images in various camera formats
+# here: https://www.rawsamples.ch/index.php/en/
+
PRGNAM=raw-thumbnailer
-VERSION=${VERSION:-0.2.1}
+VERSION=${VERSION:-3.0.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -41,15 +56,15 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
@@ -61,14 +76,11 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz
+tar xvf $CWD/$PRGNAM-$VERSION.tar.?z*
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 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -84,15 +96,15 @@ CXXFLAGS="$SLKCFLAGS" \
make
make install-strip DESTDIR=$PKG
-find $PKG | xargs file | grep -e "executable" -e "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 COPYING INSTALL ChangeLog NEWS README $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+DOCDIR=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $DOCDIR
+cp -a AUTHORS COPYING ChangeLog NEWS README $DOCDIR
+find $DOCDIR -type f -a -empty -a -exec rm {} \+
+cat $CWD/$PRGNAM.SlackBuild > $DOCDIR/$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.${PKGTYPE:-tgz}