summaryrefslogtreecommitdiffstats
path: root/source/n/bluez
diff options
context:
space:
mode:
Diffstat (limited to 'source/n/bluez')
-rw-r--r--source/n/bluez/bluez-4.99.tar.sign17
-rw-r--r--source/n/bluez/bluez-5.30-obexd_without_systemd-1.patch61
-rw-r--r--source/n/bluez/bluez-run_udev_helper.patch14
-rwxr-xr-xsource/n/bluez/bluez.SlackBuild120
-rw-r--r--source/n/bluez/bluez.enable.audio.socket.diff12
-rw-r--r--source/n/bluez/btusb.conf (renamed from source/n/bluez/config/bluetooth.modprobe)0
-rw-r--r--source/n/bluez/config/bluetooth.sh7
-rw-r--r--source/n/bluez/config/defaultconfig9
-rw-r--r--source/n/bluez/config/rc.bluetooth67
-rw-r--r--source/n/bluez/config/uart.conf6
-rw-r--r--source/n/bluez/doinst.sh7
11 files changed, 177 insertions, 143 deletions
diff --git a/source/n/bluez/bluez-4.99.tar.sign b/source/n/bluez/bluez-4.99.tar.sign
deleted file mode 100644
index a9a039be3..000000000
--- a/source/n/bluez/bluez-4.99.tar.sign
+++ /dev/null
@@ -1,17 +0,0 @@
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.12 (GNU/Linux)
-
-iQIcBAABAgAGBQJPVkejAAoJEAbKn10dzyZZ0rEP/1BvYxUAoYf0cP2pQIqDwzkV
-l9PSVsxKq/n3rNwKEWBufo3heHYxVAG5prlPiY8yHj4Q0tFNiCSPL+zLObG++iDy
-3x+wxmaNaqbYurXQolHOqmH1L4OeMqT3mdzlb7xN48RLHLiS0XwTUMu2VBcM00me
-nd03q+7gV6c1v3bXrDalUJuQQYHeubSLT6YMDKmMj/7PiLfA8hEoOE1uWefcBcas
-B9xi5IBY208Cdq5odL6ae8ybvvG/PTDSFAOZNCzqIjJMYEwBosh1TbPN1AvUu1z2
-bzbgAa3oaRXnGZNDJ07pwa+2A+jAAtDRNO2R6z5lovpT568nwY6bmDIvbcIHuMHj
-xhrhbUvPnhIcn+no+WkAtYjNe8ydcdH8BkeA7o1oauRAYJlGoTIVugobu2a608NN
-7bGChWnhTPaKty8p0NGuE5gFvMwwLeE3W3d50+JH6icNBZbZOYK+88q1OI9hTHSW
-fUm/tydzqRwPDuqgt6CiYxT49AuwQ+MjfED0fwvlfta8A+tYUDkgaOkpUcJvq8v/
-Bnd0mUkT7l2fiymw7hfzJEh9EXBWmXJBs77zkYPBmzv/YDSCpMWZuEHI7gvcBu4j
-BN/+pJfYwo/kPRS0nXc/Xt438H806SUdvD926MmRwmg5jYmBRVJSemYtPHfkC03L
-MO/geWyy5aH5w/+THCgN
-=BIdO
------END PGP SIGNATURE-----
diff --git a/source/n/bluez/bluez-5.30-obexd_without_systemd-1.patch b/source/n/bluez/bluez-5.30-obexd_without_systemd-1.patch
new file mode 100644
index 000000000..749787c5b
--- /dev/null
+++ b/source/n/bluez/bluez-5.30-obexd_without_systemd-1.patch
@@ -0,0 +1,61 @@
+Submitted By: Armin K. <krejzi at email dot com>
+Date: 2013-04-29
+Initial Package Version: 5.17
+Upstream Status: unknown
+Origin: Arch Linux (Giovanni Campagna)
+Description: Allow using obexd without systemd in the user session
+
+Not all sessions run systemd --user (actually, the majority
+doesn't), so the dbus daemon must be able to spawn obexd
+directly, and to do so it needs the full path of the daemon.
+---
+ Makefile.obexd | 4 ++--
+ obexd/src/org.bluez.obex.service | 4 ----
+ obexd/src/org.bluez.obex.service.in | 4 ++++
+ 3 files changed, 6 insertions(+), 6 deletions(-)
+ delete mode 100644 obexd/src/org.bluez.obex.service
+ create mode 100644 obexd/src/org.bluez.obex.service.in
+
+diff --git a/Makefile.obexd b/Makefile.obexd
+index 3760867..142e7c3 100644
+--- a/Makefile.obexd
++++ b/Makefile.obexd
+@@ -2,12 +2,12 @@
+ if SYSTEMD
+ systemduserunitdir = @SYSTEMD_USERUNITDIR@
+ systemduserunit_DATA = obexd/src/obex.service
++endif
+
+ dbussessionbusdir = @DBUS_SESSIONBUSDIR@
+ dbussessionbus_DATA = obexd/src/org.bluez.obex.service
+-endif
+
+-EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service
++EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service.in
+
+ obex_plugindir = $(libdir)/obex/plugins
+
+diff --git a/obexd/src/org.bluez.obex.service b/obexd/src/org.bluez.obex.service
+deleted file mode 100644
+index a538088..0000000
+--- a/obexd/src/org.bluez.obex.service
++++ /dev/null
+@@ -1,4 +0,0 @@
+-[D-BUS Service]
+-Name=org.bluez.obex
+-Exec=/bin/false
+-SystemdService=dbus-org.bluez.obex.service
+diff --git a/obexd/src/org.bluez.obex.service.in b/obexd/src/org.bluez.obex.service.in
+new file mode 100644
+index 0000000..9c815f2
+--- /dev/null
++++ b/obexd/src/org.bluez.obex.service.in
+@@ -0,0 +1,4 @@
++[D-BUS Service]
++Name=org.bluez.obex
++Exec=@libexecdir@/obexd
++SystemdService=dbus-org.bluez.obex.service
+--
+1.8.3.1
+
+
diff --git a/source/n/bluez/bluez-run_udev_helper.patch b/source/n/bluez/bluez-run_udev_helper.patch
deleted file mode 100644
index a3a71e6df..000000000
--- a/source/n/bluez/bluez-run_udev_helper.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Instead of automatically starting the bluetooth subsystem when devices
-are added, let's invoke a wrapper script in /lib/udev and have that
-wrapper check whether /etc/rc.d/rc.bluetooth is executable first.
-
-diff -Nur bluez-4.99/scripts/bluetooth.rules.in bluez-4.99.orig/scripts/bluetooth.rules.in
---- bluez-4.99.orig/scripts/bluetooth.rules.in 2010-10-02 18:25:27.000000000 -0500
-+++ bluez-4.99/scripts/bluetooth.rules.in 2013-06-27 22:05:55.572332197 -0500
-@@ -1,4 +1,4 @@
- # Run helper every time a Bluetooth device appears
- # On remove actions, bluetoothd should go away by itself
--ACTION=="add", SUBSYSTEM=="bluetooth", RUN+="@prefix@/sbin/bluetoothd --udev"
--ACTION=="change", SUBSYSTEM=="bluetooth", RUN+="@prefix@/sbin/bluetoothd --udev"
-+ACTION=="add", SUBSYSTEM=="bluetooth", RUN+="/lib/udev/bluetooth.sh"
-+ACTION=="change", SUBSYSTEM=="bluetooth", RUN+="/lib/udev/bluetooth.sh"
diff --git a/source/n/bluez/bluez.SlackBuild b/source/n/bluez/bluez.SlackBuild
index b1f31593e..3dbd00f7e 100755
--- a/source/n/bluez/bluez.SlackBuild
+++ b/source/n/bluez/bluez.SlackBuild
@@ -1,8 +1,6 @@
#!/bin/sh
-# Slackware build script for bluez - http://www.bluez.org
-
-# Copyright 2009, 2010, 2011, 2012, 2013 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2009, 2010, 2011, 2012, 2013, 2016 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,23 +21,23 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PKGNAM=bluez
-VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-3}
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1}
-NUMJOBS=${NUMJOBS:-" -j7 "}
+NUMJOBS=${NUMJOBS:--j7}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
esac
fi
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
@@ -61,8 +59,7 @@ mkdir -p $TMP $PKG
cd $TMP
rm -rf $PKGNAM-$VERSION
tar xvf $CWD/${PKGNAM}-${VERSION}.tar.xz || exit 1
-cd $PKGNAM-$VERSION
-
+cd $PKGNAM-$VERSION || exit 1
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -70,89 +67,56 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# Start bluetoothd via a wrapper script to check rc.bluetooth's +/-x first
-zcat $CWD/bluez-run_udev_helper.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/bluez-5.30-obexd_without_systemd-1.patch.gz | patch -p1 --verbose || exit 1
-# Enable the audio socket in audio.conf:
-zcat $CWD/bluez.enable.audio.socket.diff.gz | patch -p1 --verbose || exit 1
+autoreconf -vif
+
+sed -i -e 's|-lreadline|\0 -lncursesw|g' Makefile.{in,tools}
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
+LDFLAGS="-L/usr/lib$LIBDIRSUFFIX" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--mandir=/usr/man \
--localstatedir=/var \
- --enable-datafiles \
- --enable-audio \
- --enable-gstreamer \
- --enable-alsa \
- --enable-usb \
- --enable-tools\
- --enable-input \
- --enable-bccmd \
- --enable-hid2hci \
- --enable-dfutool \
- --enable-hidd \
- --enable-pand \
- --enable-dund \
- --enable-cups \
- --enable-service \
- --enable-network \
- --enable-serial \
- --enable-health \
- --enable-pnat \
- --enable-maemo6 \
- --enable-wiimote \
- --enable-test \
- --enable-dbusoob \
- --with-ouifile=/usr/share/hwdata/oui.txt \
- --disable-silent-rules \
- --build=$ARCH-slackware-linux
+ --docdir=/usr/doc/${PKGNAM}-${VERSION} \
+ --enable-library \
+ --disable-systemd \
+ --build=$ARCH-slackware-linux || exit 1
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
-cp scripts/bluetooth-serial.rules $PKG/lib/udev/rules.d/97-bluetooth-serial.rules || exit 1
-cp -a scripts/bluetooth_serial $PKG/lib/udev/bluetooth_serial || exit 1
-chmod 0755 $PKG/lib/udev/bluetooth_serial
-
-mkdir -p $PKG/etc/bluetooth
-cp -a audio/audio.conf $PKG/etc/bluetooth
-cp -a input/input.conf $PKG/etc/bluetooth
-cp -a network/network.conf $PKG/etc/bluetooth
-cp -a serial/serial.conf $PKG/etc/bluetooth
-chmod 644 $PKG/etc/bluetooth/*.conf
-
-mkdir -p $PKG/etc/alsa
-mv $PKG/usr/share/alsa/bluetooth.conf $PKG/etc/alsa
-( cd $PKG/usr/share/alsa ; ln -s ../../../etc/alsa/bluetooth.conf . )
-
-# Do not overwrite configuration
-# Well, let the dbus file be overwritten, as it is not usually user-edited.
-( cd $PKG
- for file in \
- etc/alsa/bluetooth.conf \
- etc/bluetooth/audio.conf \
- etc/bluetooth/input.conf \
- etc/bluetooth/network.conf \
- etc/bluetooth/serial.conf \
- etc/bluetooth/rfcomm.conf \
- etc/bluetooth/main.conf \
- etc/modprobe.d/bluetooth.conf ; do
- mv ${file} ${file}.new
- done
-)
-
-# Add the wrapper script
-cat $CWD/config/bluetooth.sh > $PKG/lib/udev/bluetooth.sh
-chmod 0755 $PKG/lib/udev/bluetooth.sh
+# Use reset=1 for the btusb module, which supposedly fixes reconnect problems:
+mkdir -p $PKG/lib/modprobe.d
+cp -a $CWD/btusb.conf $PKG/lib/modprobe.d
+chown root:root $PKG/lib/modprobe.d/btusb.conf
+chmod 644 $PKG/lib/modprobe.d/btusb.conf
+
+# Add bluetoothd to /usr/sbin
+mkdir -p $PKG/usr/sbin
+ln -s ../libexec/bluetooth/bluetoothd $PKG/usr/sbin
+
+# Install the configuration files
+mkdir -p $PKG/etc/bluetooth $PKG/etc/default
+cat src/main.conf > $PKG/etc/bluetooth/main.conf.new
+cat profiles/input/input.conf > $PKG/etc/bluetooth/input.conf.new
+cat profiles/network/network.conf > $PKG/etc/bluetooth/network.conf.new
+cat profiles/proximity/proximity.conf > $PKG/etc/bluetooth/proximity.conf.new
+cat $CWD/config/uart.conf > $PKG/etc/bluetooth/uart.conf.new
+cat $CWD/config/defaultconfig > $PKG/etc/default/bluetooth.new
# Add an init script
mkdir -p $PKG/etc/rc.d
cat $CWD/config/rc.bluetooth > $PKG/etc/rc.d/rc.bluetooth.new
+# Let's go ahead and let that start by default, unless an existing init
+# script is not executable:
+chmod 755 $PKG/etc/rc.d/rc.bluetooth.new
+
# Compress and if needed symlink the man pages:
if [ -d $PKG/usr/man ]; then
( cd $PKG/usr/man
@@ -173,7 +137,7 @@ find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
cp -a \
- AUTHORS COPYING* INSTALL NEWS README* \
+ AUTHORS COPYING* INSTALL README* TODO \
$PKG/usr/doc/$PKGNAM-$VERSION
# If there's a ChangeLog, installing at least part of the recent history
@@ -185,9 +149,9 @@ if [ -r ChangeLog ]; then
fi
mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
+
zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
-
diff --git a/source/n/bluez/bluez.enable.audio.socket.diff b/source/n/bluez/bluez.enable.audio.socket.diff
deleted file mode 100644
index 52b9d0c6b..000000000
--- a/source/n/bluez/bluez.enable.audio.socket.diff
+++ /dev/null
@@ -1,12 +0,0 @@
---- ./audio/audio.conf.orig 2010-08-25 00:10:02.000000000 -0500
-+++ ./audio/audio.conf 2012-09-09 12:36:31.766492102 -0500
-@@ -4,6 +4,9 @@
- # particular interface
- [General]
-
-+# Enable the audio socket
-+Enable=Socket
-+
- # Switch to master role for incoming connections (defaults to true)
- #Master=true
-
diff --git a/source/n/bluez/config/bluetooth.modprobe b/source/n/bluez/btusb.conf
index 3072d7885..3072d7885 100644
--- a/source/n/bluez/config/bluetooth.modprobe
+++ b/source/n/bluez/btusb.conf
diff --git a/source/n/bluez/config/bluetooth.sh b/source/n/bluez/config/bluetooth.sh
deleted file mode 100644
index 22034551c..000000000
--- a/source/n/bluez/config/bluetooth.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-# Check whether /etc/rc.d/rc.bluetooth is executable before starting
-# the bluetooth subsystem for hotplugged bluetooth devices
-[ -x /etc/rc.d/rc.bluetooth ] && exec /usr/sbin/bluetoothd --udev
-exit 0
-
diff --git a/source/n/bluez/config/defaultconfig b/source/n/bluez/config/defaultconfig
new file mode 100644
index 000000000..b4da786e1
--- /dev/null
+++ b/source/n/bluez/config/defaultconfig
@@ -0,0 +1,9 @@
+# /etc/default/bluetooth
+
+# A space delimied list of devices to start at boot time
+ACTIVE_HCI_DEVICES_ON_BOOT="hci0"
+
+# A semicolon delimited list of SDP (Service Discovery Protocol)
+# operations for bluetooth devices. See the sdptool for more details.
+SDPTOOL_OPTIONS=""
+
diff --git a/source/n/bluez/config/rc.bluetooth b/source/n/bluez/config/rc.bluetooth
index 296c45422..b56fcd101 100644
--- a/source/n/bluez/config/rc.bluetooth
+++ b/source/n/bluez/config/rc.bluetooth
@@ -1,28 +1,73 @@
#!/bin/sh
-bluez_start() {
- /usr/sbin/bluetoothd
+# /etc/rc.d/rc.bluetooth (based on BLFS script)
+
+# Populated from /etc/default/bluetooth:
+# ACTIVE_HCI_DEVICES_ON_BOOT and SDPTOOL_OPTIONS
+
+[ -r /etc/default/bluetooth ] && . /etc/default/bluetooth
+
+start_hci_dev() {
+ for dev in ${ACTIVE_HCI_DEVICES_ON_BOOT} ; do
+ hciconfig $dev up > /dev/null 2>&1
+ done
+}
+
+run_sdptool() {
+ # Declaring IFS local in this function, removes the need to save/restore it
+ local IFS option
+ test -x /usr/bin/sdptool || return 1
+ IFS=";"
+ for option in ${SDPTOOL_OPTIONS}; do
+ IFS=" "
+ /usr/bin/sdptool $option > /dev/null 2>&1
+ done
+}
+
+start_uarts() {
+ [ -r /etc/bluetooth/uart.conf ] || return
+ grep -v '^[[:space:]]*(#|$)' /etc/bluetooth/uart.conf | while read i; do
+ /usr/bin/hciattach $i > /dev/null 2>&1
+ done
+}
+
+stop_uarts() {
+ killall /usr/bin/hciattach > /dev/null 2>&1
+}
+
+start() {
+ if [ -d /sys/class/bluetooth ]; then
+ # Start as background process and assume OK
+ echo -n "Starting Bluetooth services: bluetoothd "
+ /usr/sbin/bluetoothd &
+ echo -n "hciconfig "
+ start_hci_dev
+ echo -n "sdptool "
+ run_sdptool
+ echo "hciattach"
+ start_uarts
+ fi
}
-bluez_stop() {
- udevadm trigger --subsystem-match=bluetooth --action=remove
- pkill -TERM bluetoothd 1>/dev/null 2>/dev/null
+stop() {
+ stop_uarts
+ killall /usr/sbin/bluetoothd > /dev/null 2>&1
}
-case "$1" in
+case "${1}" in
start)
- bluez_start
+ start
;;
stop)
- bluez_stop
+ stop
;;
restart)
- bluez_stop
+ stop
sleep 1
- bluez_start
+ start
;;
*)
- printf "Usage: $N {start|stop|restart}\n"
+ echo "Usage: ${0} {start|stop|restart}"
exit 1
;;
esac
diff --git a/source/n/bluez/config/uart.conf b/source/n/bluez/config/uart.conf
new file mode 100644
index 000000000..b2e276f4e
--- /dev/null
+++ b/source/n/bluez/config/uart.conf
@@ -0,0 +1,6 @@
+# /etc/bluetooth/uart.conf
+
+# Attach serial devices via UART HCI to BlueZ stack
+# Use one line per device
+# See the hciattach man page for options
+
diff --git a/source/n/bluez/doinst.sh b/source/n/bluez/doinst.sh
index fe68ad7f4..7fc213834 100644
--- a/source/n/bluez/doinst.sh
+++ b/source/n/bluez/doinst.sh
@@ -18,11 +18,10 @@ if [ -e etc/rc.d/rc.bluetooth ]; then
fi
config etc/rc.d/rc.bluetooth.new
-config etc/alsa/bluetooth.conf.new
-config etc/bluetooth/audio.conf.new
config etc/bluetooth/input.conf.new
config etc/bluetooth/main.conf.new
config etc/bluetooth/network.conf.new
-config etc/bluetooth/serial.conf.new
-config etc/bluetooth/rfcomm.conf.new
+config etc/bluetooth/proximity.conf.new
+config etc/bluetooth/uart.conf.new
+config etc/default/bluetooth.new