summaryrefslogtreecommitdiffstats
path: root/source/d/pkg-config/pkg-config.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/d/pkg-config/pkg-config.SlackBuild')
-rwxr-xr-xsource/d/pkg-config/pkg-config.SlackBuild27
1 files changed, 22 insertions, 5 deletions
diff --git a/source/d/pkg-config/pkg-config.SlackBuild b/source/d/pkg-config/pkg-config.SlackBuild
index 595e97594..b1b05903a 100755
--- a/source/d/pkg-config/pkg-config.SlackBuild
+++ b/source/d/pkg-config/pkg-config.SlackBuild
@@ -1,6 +1,6 @@
-#!/bin/sh
+#!/bin/bash
-# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2008, 2009, 2010, 2017, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -20,6 +20,8 @@
# 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=pkg-config
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
BUILD=${BUILD:-2}
@@ -34,9 +36,16 @@ 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 "}
-CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-pkg-config
rm -rf $PKG
@@ -79,7 +88,7 @@ CFLAGS="$SLKCFLAGS" \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--mandir=/usr/man \
--docdir=/usr/doc/pkg-config-$VERSION \
- --build=${ARCH}-slackware-linux
+ --build=${ARCH}-slackware-linux || exit 1
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
@@ -99,9 +108,17 @@ gzip -9 $PKG/usr/man/man?/*.?
mkdir -p $PKG/usr/doc/pkg-config-$VERSION
cp -a \
- AUTHORS COPYING NEWS README \
+ AUTHORS* COPYING* NEWS* README* \
$PKG/usr/doc/pkg-config-$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:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
mkdir -p $PKG/install
zcat $CWD/doinst.sh.gz | sed -e "s#/lib/#/lib${LIBDIRSUFFIX}/#g" \
> $PKG/install/doinst.sh