summaryrefslogtreecommitdiffstats
path: root/source/l/djvulibre/djvulibre.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/l/djvulibre/djvulibre.SlackBuild')
-rwxr-xr-xsource/l/djvulibre/djvulibre.SlackBuild33
1 files changed, 14 insertions, 19 deletions
diff --git a/source/l/djvulibre/djvulibre.SlackBuild b/source/l/djvulibre/djvulibre.SlackBuild
index 4bcaa4489..fcab81ad9 100755
--- a/source/l/djvulibre/djvulibre.SlackBuild
+++ b/source/l/djvulibre/djvulibre.SlackBuild
@@ -1,7 +1,7 @@
#!/bin/bash
# Copyright 2008 Robby Workman, Northport, Alabama, USA
-# Copyright 2009, 2010, 2011, 2018 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2009, 2010, 2011, 2018, 2020 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,8 +24,8 @@
cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=djvulibre
-VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -66,8 +66,9 @@ rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP || exit 1
rm -rf $PKGNAM-$VERSION || rm -rf $PKGNAM-$(echo $VERSION | rev | cut -f 2- -d . | rev)
-tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1
cd $PKGNAM-$VERSION || cd $PKGNAM-$(echo $VERSION | rev | cut -f 2- -d . | rev) || exit 1
+
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -75,6 +76,14 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
+if [ ! -r configure ]; then
+ if [ -x ./autogen.sh ]; then
+ NOCONFIGURE=1 ./autogen.sh
+ else
+ autoreconf -vif
+ fi
+fi
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@@ -94,22 +103,8 @@ make install DESTDIR=$PKG || exit 1
# Don't ship .la files:
rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
-# This plugin *should* work with Mozilla-based browsers
-if [ -d $PKG/usr/lib${LIBDIRSUFFIX}/netscape ]; then
- mv $PKG/usr/lib${LIBDIRSUFFIX}/{netscape,mozilla}
-fi
-
mkdir -p $PKG/usr/share/mime/packages
-cp $PKG/usr/share/djvu/osi/desktop/djvulibre-mime.xml \
- $PKG/usr/share/mime/packages
-
-if [ -x $PKG/usr/bin/djview3 ]; then
- mkdir -p $PKG/usr/share/{applications,pixmaps}
- cp $PKG/usr/share/djvu/djview3/desktop/*.desktop \
- $PKG/usr/share/applications
- cp $PKG/usr/share/djvu/djview3/desktop/hi32-djview3.png \
- $PKG/usr/share/pixmaps/djvulibre-djview3.png
-fi
+cp desktopfiles/djvulibre-mime.xml $PKG/usr/share/mime/packages
find $PKG | xargs file | grep -e "executable" -e "shared object" \
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null