ports/contrib (3.6): bluealsa: new port
commit 02d0da218cbc067486bc535122e6cc0d257c6077 Author: Steffen Nurpmeso <steffen@sdaoden.eu> Date: Wed Dec 30 22:26:16 2020 +0100 bluealsa: new port diff --git a/bluealsa/.footprint b/bluealsa/.footprint new file mode 100644 index 000000000..ebfdf3b2b --- /dev/null +++ b/bluealsa/.footprint @@ -0,0 +1,22 @@ +drwxr-xr-x root/root etc/ +drwxr-xr-x root/root etc/dbus-1/ +drwxr-xr-x root/root etc/dbus-1/system.d/ +-rw-r--r-- root/root etc/dbus-1/system.d/bluealsa.conf +drwxr-xr-x root/root etc/rc.d/ +-rwxr-xr-x root/root etc/rc.d/bluealsa +drwxr-xr-x root/root usr/ +drwxr-xr-x root/root usr/bin/ +-rwxr-xr-x root/root usr/bin/bluealsa +-rwxr-xr-x root/root usr/bin/bluealsa-aplay +drwxr-xr-x root/root usr/etc/ +drwxr-xr-x root/root usr/etc/alsa/ +drwxr-xr-x root/root usr/etc/alsa/conf.d/ +-rw-r--r-- root/root usr/etc/alsa/conf.d/20-bluealsa.conf +drwxr-xr-x root/root usr/lib/ +drwxr-xr-x root/root usr/lib/alsa-lib/ +-rw-r--r-- root/root usr/lib/alsa-lib/libasound_module_ctl_bluealsa.a +-rwxr-xr-x root/root usr/lib/alsa-lib/libasound_module_ctl_bluealsa.la +-rwxr-xr-x root/root usr/lib/alsa-lib/libasound_module_ctl_bluealsa.so +-rw-r--r-- root/root usr/lib/alsa-lib/libasound_module_pcm_bluealsa.a +-rwxr-xr-x root/root usr/lib/alsa-lib/libasound_module_pcm_bluealsa.la +-rwxr-xr-x root/root usr/lib/alsa-lib/libasound_module_pcm_bluealsa.so diff --git a/bluealsa/.signature b/bluealsa/.signature new file mode 100644 index 000000000..f9c7ffa5d --- /dev/null +++ b/bluealsa/.signature @@ -0,0 +1,7 @@ +untrusted comment: verify with /etc/ports/stenur.pub +RWQEMWjN1NA43zSplARGMh4p6eYD9HxWSLxo3dV+CBC+SknhNwBw8dxhd5Eoc9Mds4TR2kt/896cTVYrSHEeC9ISZGkxB3t1Ogc= +SHA256 (Pkgfile) = 735999d6c5c8b496a10cc772cc2b1a9aba4473d057596e6e441d40d8857f456e +SHA256 (.footprint) = a1ec2cab3b6db9ed7c973fec4a346d4cc1f1a489618664a156bfa4f19d1d49bd +SHA256 (bluez-alsa-3.0.0.tar.gz) = 8b9bc36be922c10c6628ddf84b13dfadfeb3ab0bcf72bad842c66f3120abc6b2 +SHA256 (bluealsa) = 87bdea39125a877c4613f48f97ad8aafffb669ba72bc76e49cfa5a6763680c4e +SHA256 (bluealsa.conf) = 85751bb2dbda79b22ce4572e2165dcb0843e292676a781db2c2a5bcc60f840b0 diff --git a/bluealsa/Pkgfile b/bluealsa/Pkgfile new file mode 100644 index 000000000..de5685905 --- /dev/null +++ b/bluealsa/Pkgfile @@ -0,0 +1,27 @@ +# Description: Bluetooth Audio ALSA Backend (for users in "audio" group) +# URL: https://github.com/Arkq/bluez-alsa +# Maintainer: Steffen Nurpmeso, steffen at sdaoden dot eu +# Depends on: bluez fdk-aac sbc + +#@ .. via bluez: alsa-lib dbus + +name=bluealsa +rname=bluez-alsa +version=3.0.0 +release=1 +source=( +https://github.com/Arkq/${rname}/archive/v${version}/${rname}-${version}.tar.gz + bluealsa bluealsa.conf) + +build() { + cd $rname-$version + autoreconf --install --symlink + mkdir build && cd build + ../configure --prefix=/usr --enable-aac + make all + make DESTDIR=$PKG install + install -D -m 0755 $SRC/bluealsa $PKG/etc/rc.d/bluealsa + install -D -m 0644 $SRC/bluealsa.conf $PKG/etc/dbus-1/system.d/bluealsa.conf +} + +# s-sh-mode diff --git a/bluealsa/bluealsa b/bluealsa/bluealsa new file mode 100755 index 000000000..8c359ae9f --- /dev/null +++ b/bluealsa/bluealsa @@ -0,0 +1,47 @@ +#!/bin/sh +#@ bluez-alsa startup script. +#@ Likely requires <- bluetoothd <- dbus + +#@ With bluealsa <2.0.0, the daemon crashed at times +#@ Nov 5 23:22:25 kent kernel: baio[19242]: segfault at 1 ip \ +#@ 00007f06dc0bca31 sp 00007f06da5dce28 error 4 \ +#@ in libc-2.28.so[7f06dbf83000+147000] +#@ and if we would not remove $RUNDIR, restart would be rejected: +#@ Nov 5 23:25:07 kent /usr/bin/bluealsa: Couldn't initialize \ +#@ controller thread: Bad file descriptor + +SSD=/sbin/start-stop-daemon +PROG=/usr/bin/bluealsa +PID=/var/run/bluealsa.pid +RUNDIR=/var/run/bluealsa +OPTS=-S + +case $1 in +start) + rm -rf "${RUNDIR}" + $SSD --start --background --make-pidfile --pidfile $PID --exec $PROG \ + -- $OPTS + ;; +stop) + $SSD --stop --remove-pidfile --retry 10 --pidfile $PID --exec $PROG + rm -rf "${RUNDIR}" + ;; +restart) + $0 stop + $0 start + ;; +status) + $SSD --status --pidfile $PID --exec $PROG + e=$? + case $e in + 0) echo "$PROG is running with pid $(cat $PID)" ;; + 1) echo "$PROG is not running but the pid file $PID exists" ;; + 3) echo "$PROG is not running" ;; + 4) echo "Unable to determine the program status" ;; + esac + exit $e + ;; +*) + echo "usage: $0 [start|stop|restart|status]" + ;; +esac diff --git a/bluealsa/bluealsa.conf b/bluealsa/bluealsa.conf new file mode 100644 index 000000000..e8a639deb --- /dev/null +++ b/bluealsa/bluealsa.conf @@ -0,0 +1,19 @@ +<!-- This configuration file specifies the required security policies + for BlueALSA core daemon to work. --> + +<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" + "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> +<busconfig> + + <!-- ../system.conf have denied everything, so we just punch some holes --> + + <policy user="root"> + <allow own_prefix="org.bluealsa"/> + <allow send_destination="org.bluealsa"/> + </policy> + + <policy group="audio"> + <allow send_destination="org.bluealsa"/> + </policy> + +</busconfig>
participants (1)
-
crux@crux.nu