diff options
Diffstat (limited to 'abs/extra-testing/bluez')
-rw-r--r-- | abs/extra-testing/bluez/PKGBUILD | 24 | ||||
-rw-r--r-- | abs/extra-testing/bluez/__Changelog | 7 | ||||
-rw-r--r-- | abs/extra-testing/bluez/bluez.install | 15 | ||||
-rw-r--r-- | abs/extra-testing/bluez/rc.bluetooth | 106 | ||||
-rw-r--r-- | abs/extra-testing/bluez/run.bluetoothd | 12 | ||||
-rw-r--r-- | abs/extra-testing/bluez/run.dund | 14 | ||||
-rw-r--r-- | abs/extra-testing/bluez/run.hidd | 14 | ||||
-rw-r--r-- | abs/extra-testing/bluez/run.pand | 14 | ||||
-rw-r--r-- | abs/extra-testing/bluez/run.rfcomm | 17 | ||||
-rw-r--r-- | abs/extra-testing/bluez/runit.bluetooth | 65 |
10 files changed, 110 insertions, 178 deletions
diff --git a/abs/extra-testing/bluez/PKGBUILD b/abs/extra-testing/bluez/PKGBUILD index 46af613..83ad50d 100644 --- a/abs/extra-testing/bluez/PKGBUILD +++ b/abs/extra-testing/bluez/PKGBUILD @@ -1,6 +1,6 @@ # Maintainer: Geoffroy Carrier <geoffroy@archlinux.org> pkgname=bluez -pkgver=4.62 +pkgver=4.63 pkgrel=1 pkgdesc="Libraries and tools for the Bluetooth protocol stack" url="http://www.bluez.org/" @@ -12,11 +12,13 @@ optdepends=('gstreamer0.10-base' 'alsa-lib' 'libusb') conflicts=('bluez-libs' 'bluez-utils') provides=('bluez-libs' 'bluez-utils') replaces=('bluez-libs' 'bluez-utils') +install='bluez.install' backup=(etc/bluetooth/{main,rfcomm,audio,network,input}.conf etc/conf.d/bluetooth) source=("http://www.kernel.org/pub/linux/bluetooth/$pkgname-$pkgver.tar.bz2" - 'bluetooth.conf.d' - 'runit.bluetooth') + bluetooth.conf.d run.bluetoothd run.hidd run.dund run.pand + run.rfcomm) + build() { cd "$srcdir/$pkgname-$pkgver" ./configure --prefix=/usr \ @@ -45,9 +47,17 @@ build() { install -D -m644 "$srcdir/$pkgname-$pkgver/network/network.conf" "$pkgdir/etc/bluetooth/" || return 1 install -D -m644 "$srcdir/$pkgname-$pkgver/input/input.conf" "$pkgdir/etc/bluetooth/" || return 1 install -D -m644 "$srcdir/$pkgname-$pkgver/audio/audio.conf" "$pkgdir/etc/bluetooth/" || return 1 - install -D -m755 "$srcdir/runit.bluetooth" "$pkgdir/etc/sv/bluetooth/run" || return 1 - install -D -m644 "$srcdir/bluetooth.conf.d" "$pkgdir/etc/conf.d/bluetooth" || return 1 + install -D -m644 "$srcdir/bluetooth.conf.d" "$pkgdir/etc/conf.d/bluetooth" || return 1 + install -D -m755 "$srcdir/run.bluetoothd" "$pkgdir/etc/sv/bluetoothd/run" || return 1 + install -D -m755 "$srcdir/run.hidd" "$pkgdir/etc/sv/hidd/run" || return 1 + install -D -m755 "$srcdir/run.dund" "$pkgdir/etc/sv/dund/run" || return 1 + install -D -m755 "$srcdir/run.pand" "$pkgdir/etc/sv/pand/run" || return 1 + install -D -m755 "$srcdir/run.rfcomm" "$pkgdir/etc/sv/rfcomm/run" || return 1 } -md5sums=('3c2187a97f5b43ae84b4bbd4b34671e0' +md5sums=('bb388f3dbb69cd253f23fc32b0f49ffa' 'd12be5b494525bb1ba6eac5c3983dd3e' - 'af1037c8e96dda60a1fea29140afb8f4') + '1c88fcd455920ad8ee0c7cae3fe15771' + 'a9c1b4da8b5a3969865272bd0fb01da2' + '89c073f43a074844b87e28103e48623d' + '8ee99afea417561d01012b8047fd06d5' + '934a9eaa25c275d18115068101fb75e8') diff --git a/abs/extra-testing/bluez/__Changelog b/abs/extra-testing/bluez/__Changelog index af8c597..124d0eb 100644 --- a/abs/extra-testing/bluez/__Changelog +++ b/abs/extra-testing/bluez/__Changelog @@ -2,3 +2,10 @@ I really have no idea how this bluetooth stuff works. If anyone wants to take a stab at getting this working properly with runit, feel free. I only need this package to get mythpywii working. + +2010-04-01: +Make this package work with runit. All daemons were seperated into their +own run scripts. Of particular interest is rfcomm and hid2hci utilities. +They are not daemons and I added "/sbin/sv <executable> down ." in their +respective run files. All based on this thread: +http://article.gmane.org/gmane.comp.sysutils.supervision.general/1585/ diff --git a/abs/extra-testing/bluez/bluez.install b/abs/extra-testing/bluez/bluez.install new file mode 100644 index 0000000..f9b757b --- /dev/null +++ b/abs/extra-testing/bluez/bluez.install @@ -0,0 +1,15 @@ +post_install() { + add_service.sh bluetoothd + echo ">>> Only the bluetoothd daemon is started by default." + echo ">>> You can optionally add the following as required:" + echo ">>> hidd dund pand rfcomm" + echo ">>> $ sudo add_service.sh <service_name>" +} + +pre_remove() { + for d in { bluetoothd,hidd,dund,pand,rfcomm } ; do + if [ -d /var/service/${d} ] ; then + remove_servcie.sh $d + fi + done +} diff --git a/abs/extra-testing/bluez/rc.bluetooth b/abs/extra-testing/bluez/rc.bluetooth deleted file mode 100644 index 38b6216..0000000 --- a/abs/extra-testing/bluez/rc.bluetooth +++ /dev/null @@ -1,106 +0,0 @@ -#!/bin/sh -# -# Start/stop the Bluetooth daemons -# - -. /etc/rc.conf -. /etc/rc.d/functions - -DAEMON_NAME="bluetoothd" -HID2HCI_NAME="hid2hci" -HIDD_NAME="hidd" -RFCOMM_NAME="rfcomm" -PAND_NAME="pand" -DUND_NAME="dund" - -DAEMON_EXEC="/usr/sbin/bluetoothd" -HID2HCI_EXEC="/usr/sbin/hid2hci" -HIDD_EXEC="/usr/bin/hidd" -RFCOMM_EXEC="/usr/bin/rfcomm" -PAND_EXEC="/usr/bin/pand" -DUND_EXEC="/usr/bin/dund" - -DAEMON_ENABLE="true" -HID2HCI_ENABLE="false" -HIDD_ENABLE="false" -RFCOMM_ENABLE="false" -DUND_ENABLE="false" -PAND_ENABLE="false" - -RFCOMM_CONFIG="/etc/bluetooth/rfcomm.conf" - -HIDD_OPTIONS="" -DUND_OPTIONS="" -PAND_OPTIONS="" - -[ -f /etc/conf.d/bluetooth ] && . /etc/conf.d/bluetooth - -case "$1" in - start) - stat_busy "Starting bluetooth subsystem:" - if [ "$DAEMON_ENABLE" = "true" -a -x "$DAEMON_EXEC" ] ; then - stat_append " $DAEMON_NAME" - $DAEMON_EXEC - fi - if [ "$HID2HCI_ENABLE" = "true" -a -x "$HID2HCI_EXEC" ] ; then - stat_append " $HID2HCI_NAME" - $HID2HCI_EXEC --tohci > /dev/null 2>&1 || true - fi - if [ "$SDPD_ENABLE" = "true" -a -x "$SDPD_EXEC" ] ; then - stat_append " $SDPD_NAME" - $SDPD_EXEC - fi - if [ "$HIDD_ENABLE" = "true" -a -x "$HIDD_EXEC" ]; then - stat_append " $HIDD_NAME" - $HIDD_EXEC $HIDD_OPTIONS --server - fi - if [ "$RFCOMM_ENABLE" = "true" -a -x "$RFCOMM_EXEC" -a -f "$RFCOMM_CONFIG" ]; then - stat_append " $RFCOMM_NAME" - $RFCOMM_EXEC -f $RFCOMM_CONFIG bind all - fi - if [ "$DUND_ENABLE" = "true" -a -x "$DUND_EXEC" -a -n "$DUND_OPTIONS" ]; then - stat_append " $DUND_NAME" - $DUND_EXEC $DUND_OPTIONS - fi - if [ "$PAND_ENABLE" = "true" -a -x "$PAND_EXEC" -a -n "$PAND_OPTIONS" ]; then - stat_append " $PAND_NAME" - $PAND_EXEC $PAND_OPTIONS - fi - add_daemon bluetooth - stat_done - ;; - stop) - stat_busy "Stopping bluetooth subsystem:" - - stat_append " $PAND_NAME" - killall $PAND_NAME >/dev/null 2>&1 - - stat_append " $DUND_NAME" - killall $DUND_NAME >/dev/null 2>&1 - - if [ -x "$RFCOMM_EXEC" ]; then - stat_append " $RFCOMM_NAME" - $RFCOMM_EXEC release all >/dev/null 2>&1 - fi - - stat_append " $HIDD_NAME" - killall $HIDD_NAME >/dev/null 2>&1 - - stat_append " $SDPD_NAME" - killall $SDPD_NAME >/dev/null 2>&1 - - stat_append " $DAEMON_NAME" - killall $DAEMON_NAME >/dev/null 2>&1 - - rm_daemon bluetooth - stat_done - ;; - restart) - $0 stop - sleep 1 - $0 start - ;; - *) - echo "usage: $0 {start|stop|restart}" -esac -exit 0 diff --git a/abs/extra-testing/bluez/run.bluetoothd b/abs/extra-testing/bluez/run.bluetoothd new file mode 100644 index 0000000..7a92437 --- /dev/null +++ b/abs/extra-testing/bluez/run.bluetoothd @@ -0,0 +1,12 @@ +#!/bin/sh +# +# Start/stop the Bluetooth daemons +# + +. /etc/rc.conf +. /etc/rc.d/functions + +[ -f /etc/conf.d/bluetooth ] && . /etc/conf.d/bluetooth + + stat_runit "Starting bluetooth subsystem:" + exec /usr/sbin/bluetoothd -n diff --git a/abs/extra-testing/bluez/run.dund b/abs/extra-testing/bluez/run.dund new file mode 100644 index 0000000..c42cfa1 --- /dev/null +++ b/abs/extra-testing/bluez/run.dund @@ -0,0 +1,14 @@ +#!/bin/sh +# +# Start/stop the Bluetooth daemons +# + +. /etc/rc.conf +. /etc/rc.d/functions + +[ -f /etc/conf.d/bluetooth ] && . /etc/conf.d/bluetooth + +svwaitup -s 3 /var/service/bluetoothd || exit 1 + + stat_runit "Starting BlueZ Bluetooth dial-up networking daemon" + exec /usr/bin/dund -n -s diff --git a/abs/extra-testing/bluez/run.hidd b/abs/extra-testing/bluez/run.hidd new file mode 100644 index 0000000..e4f66d3 --- /dev/null +++ b/abs/extra-testing/bluez/run.hidd @@ -0,0 +1,14 @@ +#!/bin/sh +# +# Start/stop the Bluetooth daemons +# + +. /etc/rc.conf +. /etc/rc.d/functions + +[ -f /etc/conf.d/bluetooth ] && . /etc/conf.d/bluetooth + +svwaitup -s 3 /var/service/bluetoothd || exit 1 + + stat_runit "Starting Bluetooth HID daemon:" + exec /usr/bin/hidd -n --server diff --git a/abs/extra-testing/bluez/run.pand b/abs/extra-testing/bluez/run.pand new file mode 100644 index 0000000..ab15ef6 --- /dev/null +++ b/abs/extra-testing/bluez/run.pand @@ -0,0 +1,14 @@ +#!/bin/sh +# +# Start/stop the Bluetooth daemons +# + +. /etc/rc.conf +. /etc/rc.d/functions + +[ -f /etc/conf.d/bluetooth ] && . /etc/conf.d/bluetooth + +svwaitup -s 3 /var/service/bluetoothd || exit 1 + + stat_runit "Starting BlueZ Bluetooth PAN daemon" + exec /usr/bin/pand -n -s diff --git a/abs/extra-testing/bluez/run.rfcomm b/abs/extra-testing/bluez/run.rfcomm new file mode 100644 index 0000000..8bc619b --- /dev/null +++ b/abs/extra-testing/bluez/run.rfcomm @@ -0,0 +1,17 @@ +#!/bin/sh +# +# Start/stop the Bluetooth daemons +# + +. /etc/rc.conf +. /etc/rc.d/functions + +[ -f /etc/conf.d/bluetooth ] && . /etc/conf.d/bluetooth + +RFCOMM_CONFIG="/etc/bluetooth/rfcomm.conf" + +svwaitup -s 3 /var/service/bluetoothd || exit 1 + + stat_runit "Starting RFCOMM for the bluetooth subsystem" + /usr/bin/rfcomm -f $RFCOMM_CONFIG bind all + /sbin/sv down . diff --git a/abs/extra-testing/bluez/runit.bluetooth b/abs/extra-testing/bluez/runit.bluetooth deleted file mode 100644 index 4b443db..0000000 --- a/abs/extra-testing/bluez/runit.bluetooth +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/sh -# -# Start/stop the Bluetooth daemons -# - -. /etc/rc.conf -. /etc/rc.d/functions - -DAEMON_NAME="bluetoothd" -HID2HCI_NAME="hid2hci" -HIDD_NAME="hidd" -RFCOMM_NAME="rfcomm" -PAND_NAME="pand" -DUND_NAME="dund" - -DAEMON_EXEC="/usr/sbin/bluetoothd -n" -HID2HCI_EXEC="/usr/sbin/hid2hci" -HIDD_EXEC="/usr/bin/hidd" -RFCOMM_EXEC="/usr/bin/rfcomm" -PAND_EXEC="/usr/bin/pand" -DUND_EXEC="/usr/bin/dund" - -DAEMON_ENABLE="true" -HID2HCI_ENABLE="false" -HIDD_ENABLE="false" -RFCOMM_ENABLE="false" -DUND_ENABLE="false" -PAND_ENABLE="false" - -RFCOMM_CONFIG="/etc/bluetooth/rfcomm.conf" - -HIDD_OPTIONS="-n" -DUND_OPTIONS="-n" -PAND_OPTIONS="-n" - -[ -f /etc/conf.d/bluetooth ] && . /etc/conf.d/bluetooth - - stat_runit "Starting bluetooth subsystem:" - if [ "$DAEMON_ENABLE" = "true" -a -x "$DAEMON_EXEC" ] ; then - exec $DAEMON_EXEC - fi -# if [ "$HID2HCI_ENABLE" = "true" -a -x "$HID2HCI_EXEC" ] ; then -# stat_append " $HID2HCI_NAME" -# $HID2HCI_EXEC --tohci > /dev/null 2>&1 || true -# fi -# if [ "$SDPD_ENABLE" = "true" -a -x "$SDPD_EXEC" ] ; then -# stat_append " $SDPD_NAME" -# $SDPD_EXEC -# fi -# if [ "$HIDD_ENABLE" = "true" -a -x "$HIDD_EXEC" ]; then -# stat_append " $HIDD_NAME" -# $HIDD_EXEC $HIDD_OPTIONS --server -# fi -# if [ "$RFCOMM_ENABLE" = "true" -a -x "$RFCOMM_EXEC" -a -f "$RFCOMM_CONFIG" ]; then -# stat_append " $RFCOMM_NAME" -# $RFCOMM_EXEC -f $RFCOMM_CONFIG bind all -# fi -# if [ "$DUND_ENABLE" = "true" -a -x "$DUND_EXEC" -a -n "$DUND_OPTIONS" ]; then -# stat_append " $DUND_NAME" -# $DUND_EXEC $DUND_OPTIONS -# fi -# if [ "$PAND_ENABLE" = "true" -a -x "$PAND_EXEC" -a -n "$PAND_OPTIONS" ]; then -# stat_append " $PAND_NAME" -# $PAND_EXEC $PAND_OPTIONS -# fi |