diff options
Diffstat (limited to 'testing/bluez')
-rw-r--r-- | testing/bluez/APKBUILD | 77 | ||||
-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, 154 insertions, 0 deletions
diff --git a/testing/bluez/APKBUILD b/testing/bluez/APKBUILD new file mode 100644 index 000000000..b8a18a350 --- /dev/null +++ b/testing/bluez/APKBUILD @@ -0,0 +1,77 @@ +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=bluez +pkgver=4.64 +pkgrel=1 +pkgdesc="Tools for the Bluetooth protocol stack" +url="http://www.bluez.org/" +license="GPL2" +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 + bluetooth.initd + bluetooth.confd + " + +_builddir="$srcdir"/$pkgname-$pkgver +build() { + cd "$_builddir" + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --libexecdir=/lib \ + --mandir=/usr/share/man \ + --enable-gstreamer \ + --enable-alsa \ + --enable-usb \ + --enable-netlink \ + --enable-tools \ + --enable-bccmd \ + --enable-hid2hci \ + --enable-dfutool \ + --enable-hidd \ + --enable-pand \ + --enable-dund \ + --enable-cups \ + --enable-configfiles \ + || return 1 + make || return 1 +} + +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() { + pkgdesc="Libraries for Bluetooth protocol stack" + mkdir -p "$subpkgdir"/usr/lib + mv "$pkgdir"/usr/lib/libbluetooth.so.* "$subpkgdir"/usr/lib/ +} + +alsa() { + pkgdesc="Bluez plugin for ALSA" + mkdir -p "$subpkgdir"/etc "$subpkgdir"/usr/lib + mv "$pkgdir"/etc/alsa* "$subpkgdir"/etc/ + mv "$pkgdir"/usr/lib/alsa* "$subpkgdir"/usr/lib/ +} + +cups() { + pkgdesc="Bluez backend for CUPS" + mkdir -p "$subpkgdir"/usr/lib/ + mv "$pkgdir"/usr/lib/cups "$subpkgdir"/usr/lib/ +} + +netlink() { + pkgdesc="Bluez netlink plugin" + mkdir -p "$subpkgdir"/usr/lib/bluetooth/plugins + mv "$pkgdir"/usr/lib/bluetooth/plugins/netlink.so \ + "$subpkgdir"/usr/lib/bluetooth/plugins +} + +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 000000000..b0cc74441 --- /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 000000000..111902aae --- /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 000000000..b0cc74441 --- /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 000000000..9ec58e97c --- /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 +} |