summaryrefslogtreecommitdiffstats
path: root/source/a/dbus/dbus.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/dbus/dbus.SlackBuild')
-rwxr-xr-xsource/a/dbus/dbus.SlackBuild32
1 files changed, 22 insertions, 10 deletions
diff --git a/source/a/dbus/dbus.SlackBuild b/source/a/dbus/dbus.SlackBuild
index 734c134c2..4f923ef16 100755
--- a/source/a/dbus/dbus.SlackBuild
+++ b/source/a/dbus/dbus.SlackBuild
@@ -1,7 +1,7 @@
-#!/bin/sh
+#!/bin/bash
# Copyright 2007-2010 Robby Workman, Northport, Alabama, USA
-# Copyright 2007-2015 Patrick Volkerding, Sebeka, MN, USA
+# Copyright 2007-2018 Patrick Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,8 +21,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=dbus
-VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | cut -d - -f 2 | rev | cut -f 3- -d . | rev)}
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | cut -d - -f 2 | rev | cut -f 3- -d . | rev)}
BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:-" -j7 "}
@@ -37,7 +39,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# 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
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
@@ -59,7 +68,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
rm -rf $PKGNAM-$VERSION
-tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1
cd $PKGNAM-$VERSION || exit 1
chown -R root:root .
find . \
@@ -68,7 +77,7 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-zcat $CWD/dbus-1.10.x-allow_root_globally.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/dbus-1.12.x-allow_root_globally.diff.gz | patch -p1 --verbose || exit 1
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -77,6 +86,7 @@ CXXFLAGS="$SLKCFLAGS" \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
+ --runstatedir=/var/run \
--mandir=/usr/man \
--infodir=/usr/info \
--docdir=/usr/doc/$PKGNAM-$VERSION \
@@ -88,11 +98,13 @@ CXXFLAGS="$SLKCFLAGS" \
--with-system-pid-file=/var/run/dbus/dbus.pid \
--with-system-socket=/var/run/dbus/system_bus_socket \
--with-console-auth-dir=/var/run/console \
- --with-init-scripts=slackware \
- --build=$ARCH-slackware-linux
+ --build=$ARCH-slackware-linux || exit 1
make $NUMJOBS || make || exit 1
-make install DESTDIR=$PKG
+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
@@ -113,7 +125,7 @@ if [ -d $PKG/usr/man ]; then
fi
# Install a custom init script for dbus - the included one is not good for us
-rm $PKG/etc/rc.d/*
+mkdir -p $PKG/etc/rc.d
zcat $CWD/rc.messagebus.gz > $PKG/etc/rc.d/rc.messagebus.new
chmod 0755 $PKG/etc/rc.d/rc.messagebus.new