summaryrefslogtreecommitdiffstats
path: root/source/l/librsvg/librsvg.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/l/librsvg/librsvg.SlackBuild')
-rwxr-xr-xsource/l/librsvg/librsvg.SlackBuild27
1 files changed, 19 insertions, 8 deletions
diff --git a/source/l/librsvg/librsvg.SlackBuild b/source/l/librsvg/librsvg.SlackBuild
index a01f69191..8e4dd0ad6 100755
--- a/source/l/librsvg/librsvg.SlackBuild
+++ b/source/l/librsvg/librsvg.SlackBuild
@@ -1,6 +1,5 @@
-#!/bin/sh
-
-# Copyright 2008, 2009, 2010, 2016 Patrick Volkerding, Sebeka, MN, USA
+#!/bin/bash
+# Copyright 2008, 2009, 2010, 2016, 2018 Patrick Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -20,9 +19,10 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=librsvg
-VERSION=${VERSION:-$(echo librsvg-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+VERSION=${VERSION:-$(echo librsvg-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
@@ -35,6 +35,14 @@ if [ -z "$ARCH" ]; then
esac
fi
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
NUMJOBS=${NUMJOBS:-" -j7 "}
if [ "$ARCH" = "i586" ]; then
@@ -51,7 +59,6 @@ else
LIBDIRSUFFIX=""
fi
-CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-librsvg
@@ -60,8 +67,8 @@ mkdir -p $TMP $PKG
cd $TMP
rm -rf librsvg-$VERSION
-tar xvf $CWD/librsvg-$VERSION.tar.?z* || exit 1
-cd librsvg-$VERSION
+tar xvf $CWD/librsvg-$VERSION.tar.?z || exit 1
+cd librsvg-$VERSION || exit 1
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -76,12 +83,16 @@ CFLAGS="$SLKCFLAGS" \
--sysconfdir=/etc \
--localstatedir=/var/lib \
--mandir=/usr/man \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
--enable-static=no \
--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
+
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
@@ -104,7 +115,7 @@ mkdir -p $PKG/usr/doc/librsvg-$VERSION
cp -a \
AUTHORS COPYING* NEWS README* TODO \
$PKG/usr/doc/librsvg-$VERSION
-( cd $PKG/usr/doc/librsvg-$VERSION ; ln -s /usr/share/gtk-doc/html/rsvg html )
+( cd $PKG/usr/doc/librsvg-$VERSION ; ln -s /usr/share/gtk-doc/html/rsvg-2.0/ html )
# 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: