summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Bidulock2015-07-08 22:22:32 -0600
committerBrian Bidulock2015-07-08 22:22:32 -0600
commiteb30dc6ca298937d5cfa000a80859257c3c1bf1c (patch)
treecc1f1c54a6b426efe67faea2b77277161a9ee5cc
downloadaur-eb30dc6ca298937d5cfa000a80859257c3c1bf1c.tar.gz
initial version
-rw-r--r--.SRCINFO46
-rw-r--r--PKGBUILD107
-rw-r--r--bluetooth.conf.d30
-rw-r--r--rc.bluetooth100
4 files changed, 283 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..62085ef1acd7
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,46 @@
+pkgbase = bluez-git
+ pkgdesc = Libraries and tools for the Bluetooth protocol stack
+ pkgver = 20130324
+ pkgrel = 1
+ url = http://www.bluez.org/
+ arch = i686
+ arch = x86_64
+ license = GPL2
+ makedepends = gstreamer0.10-base
+ makedepends = libusb-compat
+ makedepends = libnl
+ makedepends = libsndfile
+ depends = dbus-core
+ optdepends = gstreamer0.10-base: bluetooth GStreamer support
+ optdepends = alsa-lib: Audio bluetooth devices support
+ optdepends = dbus-python: to run bluez-simple-agent
+ optdepends = pygobject: to run bluez-simple-agent
+ optdepends = libusb-compat: USB adapters support
+ optdepends = cups: CUPS backend
+ optdepends = libnl: netlink plugin
+ provides = bluez=4.97
+ provides = bluez-libs
+ provides = bluez-utils
+ conflicts = bluez
+ conflicts = bluez-libs
+ conflicts = bluez-utils
+ replaces = bluez
+ replaces = bluez-libs
+ replaces = bluez-utils
+ options = !libtool
+ options = emptydirs
+ backup = etc/bluetooth/proximity.conf
+ backup = etc/bluetooth/input.conf
+ backup = etc/bluetooth/network.conf
+ backup = etc/bluetooth/audio.conf
+ backup = etc/bluetooth/main.conf
+ backup = etc/bluetooth/bluetooth.conf
+ backup = etc/conf.d/bluetooth
+ backup = etc/dbus-1/system.d/bluetooth.conf
+ source = bluetooth.conf.d
+ source = rc.bluetooth
+ md5sums = 7412982b440f29fa7f76a41a87fef985
+ md5sums = 8f9498707f809506928b2e480d3b6789
+
+pkgname = bluez-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..91498198bd43
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,107 @@
+# Maintainer: Juan Diego Tascon
+# Maintainer: Swift Geek
+pkgname=bluez-git
+pkgver=20130324
+pkgrel=1
+pkgdesc="Libraries and tools for the Bluetooth protocol stack"
+
+url="http://www.bluez.org/"
+arch=('i686' 'x86_64')
+license=('GPL2')
+depends=('dbus-core')
+makedepends=('gstreamer0.10-base' 'libusb-compat' 'libnl' 'libsndfile')
+optdepends=("gstreamer0.10-base: bluetooth GStreamer support"
+ "alsa-lib: Audio bluetooth devices support"
+ "dbus-python: to run bluez-simple-agent"
+ "pygobject: to run bluez-simple-agent"
+ "libusb-compat: USB adapters support"
+ "cups: CUPS backend"
+ "libnl: netlink plugin")
+
+conflicts=('bluez' 'bluez-libs' 'bluez-utils')
+provides=('bluez=4.97' 'bluez-libs' 'bluez-utils')
+replaces=('bluez' 'bluez-libs' 'bluez-utils')
+
+options=('!libtool' 'emptydirs')
+backup=(etc/bluetooth/{proximity,input,network,audio,main,bluetooth}.conf
+ 'etc/conf.d/bluetooth' 'etc/dbus-1/system.d/bluetooth.conf')
+source=('bluetooth.conf.d'
+ 'rc.bluetooth')
+md5sums=('7412982b440f29fa7f76a41a87fef985'
+ '8f9498707f809506928b2e480d3b6789')
+
+_gitroot="git://git.kernel.org/pub/scm/bluetooth/bluez.git"
+_gitname="bluez"
+
+if type awk 2>/dev/null >&2;
+then
+ make_parallel_instances=$((`awk '/^processor/ { N++} END { print N }' /proc/cpuinfo`*4))
+else
+ make_parallel_instances=4
+fi
+
+build() {
+ cd ${srcdir}
+ msg "Connecting to GIT server...."
+
+ if [ -d ${srcdir}/${_gitname} ] ; then
+ cd ${_gitname} && git pull origin
+ msg "The local files are updated."
+ else
+ git clone ${_gitroot}
+ fi
+
+ msg "GIT checkout done or server timeout"
+ msg "Starting make..."
+
+
+ cd ${srcdir}/${_gitname}
+
+ ./bootstrap || return 1
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --libexecdir=/usr/lib \
+ --enable-gstreamer \
+ --enable-alsa \
+ --enable-usb \
+ --enable-tools \
+ --enable-bccmd \
+ --enable-dfutool \
+ --enable-hid2hci \
+ --enable-hidd \
+ --enable-pand \
+ --enable-dund \
+ --enable-cups \
+ --enable-library \
+ --enable-wiimote
+ make -j"${make_parallel_instances}"
+}
+
+package() {
+ cd "${srcdir}/${_gitname}"
+ make -j"${make_parallel_instances}" DESTDIR="${pkgdir}" install || return 1
+
+ install -vDm755 "${srcdir}/rc.bluetooth" "${pkgdir}/etc/rc.d/bluetooth"
+
+ install -vd "${pkgdir}/etc/bluetooth"
+ install -vm644 profiles/*/*.conf "${pkgdir}/etc/bluetooth/"
+ install -vm644 src/*.conf "${pkgdir}/etc/bluetooth/"
+
+ install -vDm644 "${srcdir}/bluetooth.conf.d" "${pkgdir}/etc/conf.d/bluetooth"
+
+# # FS#27630
+# cd test
+# # Python bindings
+# install -vd "${pkgdir}/usr/lib/python2.7/site-packages"
+# install -vDm755 *.py "${pkgdir}/usr/lib/python2.7/site-packages"
+#
+# # Python untilities
+# install -vDm755 simple-agent "${pkgdir}/usr/bin/bluez-simple-agent"
+# for filename in test-*;
+# do
+# install -vDm755 "${filename}" "${pkgdir}/usr/bin/bluez-${filename}"
+# done
+# cd ..
+# sed -i 's#/usr/bin/python#/usr/bin/python2#' "${pkgdir}/usr/bin/bluez"-*
+}
diff --git a/bluetooth.conf.d b/bluetooth.conf.d
new file mode 100644
index 000000000000..1c1e0258976a
--- /dev/null
+++ b/bluetooth.conf.d
@@ -0,0 +1,30 @@
+# Bluetooth configuraton file
+
+# Bluetooth services (allowed values are "true" and "false")
+
+# Run the bluetoothd daemon (default: true)
+#DAEMON_ENABLE="false"
+
+# Run the sdp daemon (default: false)
+# If this is disabled, hcid's internal sdp daemon will be used
+#SDPD_ENABLE="true"
+
+# Run the bluetooth HID daemon (default: false)
+#HIDD_ENABLE="true"
+
+# Activate rfcomm ports (default: false)
+#RFCOMM_ENABLE="true"
+
+# Run bluetooth dial-up networking daemon (default: false)
+#DUND_ENABLE="true"
+
+# Run bluetooth PAN daemon (default: false)
+#PAND_ENABLE="true"
+
+# rfcomm configuration file (default: /etc/bluetooth/rfcomm.conf)
+#RFCOMM_CONFIG="/etc/bluetooth/rfcomm.conf"
+
+# Options for hidd, dund and pand (default: none)
+HIDD_OPTIONS="--server"
+#DUND_OPTIONS=""
+#PAND_OPTIONS=""
diff --git a/rc.bluetooth b/rc.bluetooth
new file mode 100644
index 000000000000..a46ee2abbf18
--- /dev/null
+++ b/rc.bluetooth
@@ -0,0 +1,100 @@
+#!/bin/bash
+#
+# Start/stop the Bluetooth daemons
+#
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+DAEMON_NAME="bluetoothd"
+HIDD_NAME="hidd"
+RFCOMM_NAME="rfcomm"
+PAND_NAME="pand"
+DUND_NAME="dund"
+
+DAEMON_EXEC="/usr/sbin/bluetoothd"
+HIDD_EXEC="/usr/bin/hidd"
+RFCOMM_EXEC="/usr/bin/rfcomm"
+PAND_EXEC="/usr/bin/pand"
+DUND_EXEC="/usr/bin/dund"
+
+DAEMON_ENABLE="true"
+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
+ sleep 1
+ 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
+ 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