diff --git a/srcpkgs/bluez-alsa b/srcpkgs/bluez-alsa new file mode 120000 index 00000000000..db15886a96e --- /dev/null +++ b/srcpkgs/bluez-alsa @@ -0,0 +1 @@ +bluez \ No newline at end of file diff --git a/srcpkgs/bluez-compat b/srcpkgs/bluez-compat new file mode 120000 index 00000000000..db15886a96e --- /dev/null +++ b/srcpkgs/bluez-compat @@ -0,0 +1 @@ +bluez \ No newline at end of file diff --git a/srcpkgs/bluez-gstreamer b/srcpkgs/bluez-gstreamer new file mode 120000 index 00000000000..db15886a96e --- /dev/null +++ b/srcpkgs/bluez-gstreamer @@ -0,0 +1 @@ +bluez \ No newline at end of file diff --git a/srcpkgs/bluez/bluez-alsa.template b/srcpkgs/bluez/bluez-alsa.template new file mode 100644 index 00000000000..e89a32be02c --- /dev/null +++ b/srcpkgs/bluez/bluez-alsa.template @@ -0,0 +1,21 @@ +# Template file for 'bluez-alsa'. +# +short_desc="Bluetooth ALSA support" +long_desc=" + This package contains a driver to operate with the ALSA stack. + + BlueZ is the official Linux Bluetooth Stack. It is an Open Source project + distributed under GNU General Public License (GPL)." + +conf_files="/usr/share/alsa/bluetooth.conf" + +Add_dependency run glibc +Add_dependency run alsa-lib +Add_dependency run bluez + +do_install() +{ + mkdir -p ${DESTDIR}/usr/lib ${DESTDIR}/usr/share + mv ${SRCPKGDESTDIR}/usr/lib/alsa-lib ${DESTDIR}/usr/lib + mv ${SRCPKGDESTDIR}/etc/alsa ${DESTDIR}/usr/share +} diff --git a/srcpkgs/bluez/bluez-compat.template b/srcpkgs/bluez/bluez-compat.template new file mode 100644 index 00000000000..770f9c6c270 --- /dev/null +++ b/srcpkgs/bluez/bluez-compat.template @@ -0,0 +1,22 @@ +# Template file for 'bluez-compat'. +# +short_desc="BlueZ 3.x compatibility binaries" +long_desc=" + This package provides the legacy binaries that were reminiscent of + the BlueZ 3.x pairing methods. These binaries are not supported, and + will go away again in the future. The provides binaries are: + + hidd dund pand" + +Add_dependency run glibc +Add_dependency run libbluetooth + +do_install() +{ + mkdir -p ${DESTDIR}/usr/bin ${DESTDIR}/usr/share/man/man1 + for _bin_ in dund hidd pand; do + mv ${SRCPKGDESTDIR}/usr/bin/${_bin_} ${DESTDIR}/usr/bin + mv ${SRCPKGDESTDIR}/usr/share/man/man1/${_bin_}.1 \ + ${DESTDIR}/usr/share/man/man1 + done +} diff --git a/srcpkgs/bluez/bluez-gstreamer.template b/srcpkgs/bluez/bluez-gstreamer.template new file mode 100644 index 00000000000..9ff138cb58e --- /dev/null +++ b/srcpkgs/bluez/bluez-gstreamer.template @@ -0,0 +1,18 @@ +# Template file for 'bluez-gstreamer'. +# +short_desc="Bluetooth GStreamer support" +long_desc=" + This package contains a plugin to operate with GStreamer applications. + + BlueZ is the official Linux Bluetooth Stack. It is an Open Source project + distributed under GNU General Public License (GPL)." + +Add_dependency run glibc +Add_dependency run bluez +Add_dependency run gst-plugins-base + +do_install() +{ + mkdir -p ${DESTDIR}/usr/lib + mv ${SRCPKGDESTDIR}/usr/lib/gstreamer* ${DESTDIR}/usr/lib +} diff --git a/srcpkgs/bluez/files/bluetooth.confd b/srcpkgs/bluez/files/bluetooth.confd new file mode 100644 index 00000000000..d65c3b497ed --- /dev/null +++ b/srcpkgs/bluez/files/bluetooth.confd @@ -0,0 +1,27 @@ +# Configuration file for BlueZ. + +# Activate rfcomm ports (default: no) +# RFCOMM_START=yes +# +# rfcomm configuration file +RFCOMM_CONF="/etc/bluetooth/rfcomm.conf" + +# +# The following daemons are provided in 'bluez-compat'. +# +# Start the HID daemon (default: yes) +# HIDD_START=no +# +# Start dial-up networking daemon (default: no) +# DUND_START=yes +# +# Start the PAN daemon (default: no) +# PAND_START=yes +# +# Options passed to daemons when starting. +# +# BLUETOOTHD_OPTIONS="" +# RFCOMM_OPTIONS="" +# HIDD_OPTIONS="" +# DUND_OPTIONS="" +# PAND_OPTIONS="" diff --git a/srcpkgs/bluez/files/bluetooth.rc b/srcpkgs/bluez/files/bluetooth.rc new file mode 100644 index 00000000000..6faaa108a38 --- /dev/null +++ b/srcpkgs/bluez/files/bluetooth.rc @@ -0,0 +1,63 @@ +#!/sbin/runscript + +depend() +{ + after coldplug + need dbus localmount +} + +start() +{ + einfo "Starting bluetooth subsystem" + eindent + + ebegin "Starting bluetoothd" + start-stop-daemon --start --exec /usr/sbin/bluetoothd \ + $BLUETOOTHD_OPTIONS + eend $? + if [ -n "$RFCOMM_START" ]; then + ebegin "Starting rfcomm" + /usr/bin/rfcomm -f $RFCOMM_CONF bind all + eend $? + fi + if [ -n "$HIDD_START" ]; then + ebegin "Starting hidd" + start-stop-daemon --start --exec /usr/bin/hidd \ + $HIDD_OPTIONS --server + eend $? + fi + if [ -n "$DUND_START" ]; then + ebegin "Starting dund" + start-stop-daemon --start --exec /usr/bin/dund \ + $DUND_OPTIONS + eend $? + fi + if [ -n "$PAND_START" ]; then + ebegin "Starting pand" + start-stop-daemon --start --exec /usr/bin/pand \ + $PAND_OPTIONS + eend $? + fi + eoutdent + eend $? +} + +stop() +{ + ebegin "Stopping bluetooth subsystem" + + if [ -n "$PAND_START" ]; then + start-stop-daemon --stop --quiet --exec /usr/bin/pand + eend $? + fi + if [ -n "$DUND_START" ]; then + start-stop-daemon --stop --quiet --exec /usr/bin/dund + eend $? + fi + if [ -n "$HIDD_START" ]; then + start-stop-daemon --stop --quiet --exec /usr/bin/hidd + eend $? + fi + start-stop-daemon --stop --quiet --exec /usr/sbin/bluetoothd + eend $? +} diff --git a/srcpkgs/bluez/libbluetooth-devel.template b/srcpkgs/bluez/libbluetooth-devel.template new file mode 100644 index 00000000000..d57afdc706a --- /dev/null +++ b/srcpkgs/bluez/libbluetooth-devel.template @@ -0,0 +1,17 @@ +# Template file for 'libbluetooth-devel'. +# +short_desc="Development files to use the BlueZ Linux Bluetooth library" +long_desc=" + BlueZ is the official Linux Bluetooth Stack. It is an Open Source project + distributed under GNU General Public License (GPL)." + +Add_dependency run glibc-devel +Add_dependency run libbluetooth + +do_install() +{ + mkdir -p ${DESTDIR}/usr/include ${DESTDIR}/usr/lib + mv ${SRCPKGDESTDIR}/usr/include ${DESTDIR} + mv ${SRCPKGDESTDIR}/usr/lib/libbluetooth.so ${DESTDIR}/usr/lib + mv ${SRCPKGDESTDIR}/usr/lib/pkgconfig ${DESTDIR}/usr/lib +} diff --git a/srcpkgs/bluez/libbluetooth.template b/srcpkgs/bluez/libbluetooth.template new file mode 100644 index 00000000000..fb718ddd153 --- /dev/null +++ b/srcpkgs/bluez/libbluetooth.template @@ -0,0 +1,14 @@ +# Template file for 'libbluetooth'. +# +short_desc="Library to use the Bluez Linux Bluetooth Stack" +long_desc=" + BlueZ is the official Linux Bluetooth Stack. It is an Open Source project + distributed under GNU General Public License (GPL)." + +Add_dependency run glibc + +do_install() +{ + mkdir -p ${DESTDIR}/usr/lib + mv ${SRCPKGDESTDIR}/usr/lib/libbluetooth.so.* ${DESTDIR}/usr/lib +} diff --git a/srcpkgs/bluez/template b/srcpkgs/bluez/template new file mode 100644 index 00000000000..73e74c3d2fe --- /dev/null +++ b/srcpkgs/bluez/template @@ -0,0 +1,56 @@ +# Template file for 'bluez' +pkgname=bluez +version=4.58 +distfiles="${KERNEL_SITE}/bluetooth/$pkgname-$version.tar.bz2" +build_style=gnu_configure +configure_args="--localstatedir=/var --libexecdir=/lib --enable-gstreamer + --enable-alsa --enable-usb --enable-netlink --enable-tools --enable-bccmd + --enable-hid2hci --enable-dfutool --enable-hidd --enable-pand --enable-dund + --disable-cups --enable-configfiles" +short_desc="Bluetooth tools and daemons" +maintainer="Juan RP " +checksum=b3f034f9c1697c6563ee047ff2ea6809c684a3fc11486de6c3e8141a0d5c0136 +long_desc=" + This package contains tools and system daemons for using Bluetooth devices. + + BlueZ is the official Linux Bluetooth protocol stack. It is an Open Source + project distributed under GNU General Public License (GPL)." + +conf_files=" +/etc/conf.d/bluetooth +/etc/bluetooth/audio.conf +/etc/bluetooth/input.conf +/etc/bluetooth/main.conf +/etc/bluetooth/network.conf +/etc/bluetooth/rfcomm.conf" +openrc_services="bluetooth default" + +subpackages="$pkgname-alsa $pkgname-compat $pkgname-gstreamer libbluetooth" +subpackages="$subpackages libbluetooth-devel" + +Add_dependency full glibc +Add_dependency full dbus +Add_dependency full libnl +Add_dependency full libusb +Add_dependency full udev +Add_dependency full libcap-ng +Add_dependency run libbluetooth +Add_dependency build pkg-config +Add_dependency build flex +Add_dependency build gst-plugins-base +Add_dependency build alsa-lib + +post_install() +{ + cd ${wrksrc} || return 1 + install -m644 network/network.conf input/input.conf audio/audio.conf \ + ${DESTDIR}/etc/bluetooth || return 1 + install -m755 scripts/bluetooth_serial ${DESTDIR}/lib/udev || return 1 + install -m755 test/simple-agent \ + ${DESTDIR}/usr/bin/bluez-simple-agent || return 1 + install -d ${DESTDIR}/etc/init.d ${DESTDIR}/etc/conf.d || return 1 + install -m755 ${FILESDIR}/bluetooth.rc \ + ${DESTDIR}/etc/init.d/bluetooth || return 1 + install -m644 ${FILESDIR}/bluetooth.confd \ + ${DESTDIR}/etc/conf.d/bluetooth || return 1 +} diff --git a/srcpkgs/libbluetooth b/srcpkgs/libbluetooth new file mode 120000 index 00000000000..db15886a96e --- /dev/null +++ b/srcpkgs/libbluetooth @@ -0,0 +1 @@ +bluez \ No newline at end of file diff --git a/srcpkgs/libbluetooth-devel b/srcpkgs/libbluetooth-devel new file mode 120000 index 00000000000..db15886a96e --- /dev/null +++ b/srcpkgs/libbluetooth-devel @@ -0,0 +1 @@ +bluez \ No newline at end of file