summaryrefslogtreecommitdiff
path: root/source/l/dbus-python/dbus-python.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/l/dbus-python/dbus-python.SlackBuild')
-rwxr-xr-xsource/l/dbus-python/dbus-python.SlackBuild43
1 files changed, 37 insertions, 6 deletions
diff --git a/source/l/dbus-python/dbus-python.SlackBuild b/source/l/dbus-python/dbus-python.SlackBuild
index 6139ae23..d4ea42fc 100755
--- a/source/l/dbus-python/dbus-python.SlackBuild
+++ b/source/l/dbus-python/dbus-python.SlackBuild
@@ -1,7 +1,7 @@
-#!/bin/sh
+#!/bin/bash
# Copyright 2008 Robby Workman, Northport, Alabama, USA
-# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2008, 2009, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,9 +23,11 @@
# http://dbus.freedesktop.org/releases/dbus-python/
+cd $(dirname $0) ; CWD=$(pwd)
+
PKGNAM=dbus-python
-VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-2}
NUMJOBS=${NUMJOBS:-" -j7 "}
@@ -39,7 +41,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
@@ -61,7 +70,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP || exit 1
rm -rf $PKGNAM-$VERSION
-tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1
cd $PKGNAM-$VERSION || exit 1
chown -R root:root .
find . \
@@ -70,6 +79,27 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+PYTHON_VERSION=3 \
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --disable-html-docs \
+ --enable-shared=yes \
+ --enable-static=no \
+ --build=$ARCH-slackware-linux \
+ --host=$ARCH-slackware-linux \
+ || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+make clean
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@@ -78,6 +108,7 @@ CXXFLAGS="$SLKCFLAGS" \
--sysconfdir=/etc \
--localstatedir=/var \
--docdir=/usr/doc/$PKGNAM-$VERSION \
+ --disable-html-docs \
--enable-shared=yes \
--enable-static=no \
--build=$ARCH-slackware-linux \