summaryrefslogtreecommitdiff
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.SlackBuild46
1 files changed, 31 insertions, 15 deletions
diff --git a/source/a/dbus/dbus.SlackBuild b/source/a/dbus/dbus.SlackBuild
index c761ce54..533ccd89 100755
--- a/source/a/dbus/dbus.SlackBuild
+++ b/source/a/dbus/dbus.SlackBuild
@@ -1,6 +1,7 @@
#!/bin/sh
-# Copyright 2007, 2008 Robby Workman <http://rlworkman.net>
-# Copyright 2007, 2008, 2009 Patrick Volkerding, Sebeka, MN, USA
+
+# Copyright 2007-2010 Robby Workman, Northport, Alabama, USA
+# Copyright 2007-2010 Patrick Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -20,16 +21,25 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-PRGNAM=dbus
-VERSION=1.2.14
-ARCH=${ARCH:-x86_64}
-BUILD=${BUILD:-1}
+PKGNAM=dbus
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | cut -d - -f 2 | rev | cut -f 3- -d . | rev)}
+BUILD=${BUILD:-2}
NUMJOBS=${NUMJOBS:-" -j7 "}
+# 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
+
CWD=$(pwd)
TMP=${TMP:-/tmp}
-PKG=$TMP/package-$PRGNAM
+PKG=$TMP/package-$PKGNAM
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
@@ -40,14 +50,17 @@ elif [ "$ARCH" = "s390" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.xz || exit 1
-cd $PRGNAM-$VERSION || exit 1
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1
+cd $PKGNAM-$VERSION || exit 1
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -55,6 +68,8 @@ 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.2.x-allow_root_globally.diff.gz | patch -p1 --verbose || exit 1
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@@ -64,9 +79,10 @@ CXXFLAGS="$SLKCFLAGS" \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
--enable-shared=yes \
--enable-static=no \
+ --enable-inotify \
--with-system-pid-file=/var/run/dbus/dbus.pid \
--with-system-socket=/var/run/dbus/system_bus_socket \
--with-init-scripts=slackware \
@@ -96,16 +112,16 @@ mv $PKG/etc/dbus-1/system.conf $PKG/etc/dbus-1/system.conf.new
chown messagebus $PKG/var/lib/dbus
# Add documentation
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
cp -a \
AUTHORS COPYING HACKING INSTALL NEWS README doc/*.{txt,html,dtd} \
- $PKG/usr/doc/$PRGNAM-$VERSION
-find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \;
+ $PKG/usr/doc/$PKGNAM-$VERSION
+find $PKG/usr/doc/$PKGNAM-$VERSION -type f -exec chmod 644 {} \;
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $TMP/$PRGNAM-$VERSION-$ARCH-$BUILD.txz
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz