diff options
Diffstat (limited to 'source/l/librsvg/librsvg.SlackBuild')
-rwxr-xr-x | source/l/librsvg/librsvg.SlackBuild | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/source/l/librsvg/librsvg.SlackBuild b/source/l/librsvg/librsvg.SlackBuild index 556a54cf..bd22ff82 100755 --- a/source/l/librsvg/librsvg.SlackBuild +++ b/source/l/librsvg/librsvg.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2008, 2009 Patrick Volkerding, Sebeka, MN, USA +# Copyright 2008, 2009, 2010 Patrick Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,9 +23,18 @@ # Slackware build script for librsvg -VERSION=2.26.0 -ARCH=${ARCH:-x86_64} -BUILD=${BUILD:-2} +VERSION=${VERSION:-$(echo librsvg-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +BUILD=${BUILD:-3} + +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) export ARCH=i486 ;; + arm*) export ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$( uname -m ) ;; + esac +fi NUMJOBS=${NUMJOBS:-" -j7 "} @@ -38,6 +47,9 @@ elif [ "$ARCH" = "s390" ]; then elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" fi CWD=$(pwd) @@ -49,7 +61,7 @@ mkdir -p $TMP $PKG cd $TMP rm -rf librsvg-$VERSION -tar xvf $CWD/librsvg-$VERSION.tar.bz2 || exit 1 +tar xvf $CWD/librsvg-$VERSION.tar.?z* || exit 1 cd librsvg-$VERSION chown -R root:root . find . \ @@ -89,6 +101,14 @@ cp -a \ $PKG/usr/doc/librsvg-$VERSION ( cd $PKG/usr/doc/librsvg-$VERSION ; ln -s /usr/share/gtk-doc/html/rsvg 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: +if [ -r ChangeLog ]; then + DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION) + cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog + touch -r ChangeLog $DOCSDIR/ChangeLog +fi + mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc |