diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2010-05-19 08:02:28 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-05-19 08:02:28 +0000 |
commit | 80b81a91d09812b6ff99c9cb1cd93f757327bc8c (patch) | |
tree | 15935bdb13efa85efb00919cd4ed0c4e9d353a57 /testing | |
parent | 1c6f938da5885d7c1390baac9f2e3d8deaf0c641 (diff) | |
download | aports-80b81a91d09812b6ff99c9cb1cd93f757327bc8c.tar.bz2 aports-80b81a91d09812b6ff99c9cb1cd93f757327bc8c.tar.xz |
testing/bluez: added init.d script
Diffstat (limited to 'testing')
-rw-r--r-- | testing/bluez/APKBUILD | 13 | ||||
-rw-r--r-- | testing/bluez/bluetooth-conf.d | 7 | ||||
-rw-r--r-- | testing/bluez/bluetooth-init.d | 31 | ||||
-rw-r--r-- | testing/bluez/bluetooth.confd | 7 | ||||
-rw-r--r-- | testing/bluez/bluetooth.initd | 32 |
5 files changed, 87 insertions, 3 deletions
diff --git a/testing/bluez/APKBUILD b/testing/bluez/APKBUILD index 32c9ec976c..b8a18a350e 100644 --- a/testing/bluez/APKBUILD +++ b/testing/bluez/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=bluez pkgver=4.64 -pkgrel=0 +pkgrel=1 pkgdesc="Tools for the Bluetooth protocol stack" url="http://www.bluez.org/" license="GPL2" @@ -9,7 +9,10 @@ depends= makedepends="dbus-dev gstreamer-dev alsa-lib-dev libusb-dev libnl-dev" subpackages="$pkgname-dev $pkgname-doc libbluetooth $pkgname-alsa $pkgname-cups $pkgname-netlink" -source="http://www.kernel.org/pub/linux/bluetooth/$pkgname-$pkgver.tar.bz2" +source="http://www.kernel.org/pub/linux/bluetooth/$pkgname-$pkgver.tar.bz2 + bluetooth.initd + bluetooth.confd + " _builddir="$srcdir"/$pkgname-$pkgver build() { @@ -39,6 +42,8 @@ build() { package() { cd "$_builddir" make install DESTDIR="$pkgdir" + install -Dm755 "$srcdir"/bluetooth.initd "$pkgdir"/etc/init.d/bluetooth + install -Dm644 "$srcdir"/bluetooth.confd "$pkgdir"/etc/conf.d/bluetooth } libbluetooth() { @@ -67,4 +72,6 @@ netlink() { "$subpkgdir"/usr/lib/bluetooth/plugins } -md5sums="d6e60bad937fe72b0bc77e327ee470b0 bluez-4.64.tar.bz2" +md5sums="d6e60bad937fe72b0bc77e327ee470b0 bluez-4.64.tar.bz2 +66408fb89b05e7ce7e61c4c3c356d2c6 bluetooth.initd +a159d897a057f4675548327329c4cc22 bluetooth.confd" diff --git a/testing/bluez/bluetooth-conf.d b/testing/bluez/bluetooth-conf.d new file mode 100644 index 0000000000..b0cc744415 --- /dev/null +++ b/testing/bluez/bluetooth-conf.d @@ -0,0 +1,7 @@ +# Bluetooth configuraton file + +# Bind rfcomm devices (allowed values are "true" and "false") +RFCOMM_ENABLE=true + +# Config file for rfcomm +RFCOMM_CONFIG="/etc/bluetooth/rfcomm.conf" diff --git a/testing/bluez/bluetooth-init.d b/testing/bluez/bluetooth-init.d new file mode 100644 index 0000000000..111902aaeb --- /dev/null +++ b/testing/bluez/bluetooth-init.d @@ -0,0 +1,31 @@ +#!/sbin/runscript +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-wireless/bluez/files/4.60/bluetooth-init.d,v 1.1 2010/02/01 19:47:46 pacho Exp $ + +depend() { + after coldplug + need dbus localmount +} + +start() { + ebegin "Starting Bluetooth" + + udevadm trigger --subsystem-match=bluetooth + eend $? + + if [ "${RFCOMM_ENABLE}" = "true" -a -x /usr/bin/rfcomm ]; then + if [ -f "${RFCOMM_CONFIG}" ]; then + ebegin " Starting rfcomm" + /usr/bin/rfcomm -f "${RFCOMM_CONFIG}" bind all + eend $? + else + ewarn "Not enabling rfcomm because RFCOMM_CONFIG does not exists" + fi + fi +} + +stop() { + ebegin "Shutting down Bluetooth" + eend 0 +} diff --git a/testing/bluez/bluetooth.confd b/testing/bluez/bluetooth.confd new file mode 100644 index 0000000000..b0cc744415 --- /dev/null +++ b/testing/bluez/bluetooth.confd @@ -0,0 +1,7 @@ +# Bluetooth configuraton file + +# Bind rfcomm devices (allowed values are "true" and "false") +RFCOMM_ENABLE=true + +# Config file for rfcomm +RFCOMM_CONFIG="/etc/bluetooth/rfcomm.conf" diff --git a/testing/bluez/bluetooth.initd b/testing/bluez/bluetooth.initd new file mode 100644 index 0000000000..9ec58e97c4 --- /dev/null +++ b/testing/bluez/bluetooth.initd @@ -0,0 +1,32 @@ +#!/sbin/runscript +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-wireless/bluez/files/4.60/bluetooth-init.d,v 1.1 2010/02/01 19:47:46 pacho Exp $ + +depend() { + after coldplug + need dbus localmount +} + +start() { + ebegin "Starting Bluetooth" + + if [ -x /sbin/udevadm ]; then + udevadm trigger --subsystem-match=bluetooth + eend $? + fi + + if [ "${RFCOMM_ENABLE}" = "true" -a -x /usr/bin/rfcomm ]; then + if [ -f "${RFCOMM_CONFIG}" ]; then + /usr/bin/rfcomm -f "${RFCOMM_CONFIG}" bind all + else + ewarn "Not enabling rfcomm because RFCOMM_CONFIG does not exists" + fi + fi + eend $? +} + +stop() { + ebegin "Shutting down Bluetooth" + eend 0 +} |