diff options
-rw-r--r-- | testing/snapcast/APKBUILD | 32 | ||||
l--------- | testing/snapcast/snapcast-client.pre-install | 1 | ||||
-rw-r--r-- | testing/snapcast/snapcast-server.confd | 23 | ||||
-rw-r--r-- | testing/snapcast/snapcast-server.initd | 12 | ||||
l--------- | testing/snapcast/snapcast-server.pre-install | 1 | ||||
-rw-r--r-- | testing/snapcast/snapcast.pre-install | 6 |
6 files changed, 70 insertions, 5 deletions
diff --git a/testing/snapcast/APKBUILD b/testing/snapcast/APKBUILD index 069b4914b1..dc84796cac 100644 --- a/testing/snapcast/APKBUILD +++ b/testing/snapcast/APKBUILD @@ -1,21 +1,21 @@ # Contributor: Carlo Landmeter <clandmeter@gmail.com> -# Maintainer: +# Maintainer: Marvin Steadfast <marvin@xsteadfastx.org> pkgname=snapcast pkgver=0.11.1 ### NOTE: when bumping pkgver also update sha's below from gitsubmodules _jsonrpcpp_sha=115296b2232ba8776467d74602d392d03409ad7e _popl_sha=0dc38f8bc30bec1946f7e3dbc5a2d37ad1edb93e -pkgrel=0 +pkgrel=1 pkgdesc="Synchronous multi-room audio player" url="https://github.com/badaix/snapcast" arch="all" license="GPL-3.0" -depends="" +depends="$pkgname-client $pkgname-server" makedepends="asio-dev bash avahi-dev flac-dev libvorbis-dev alsa-lib-dev " -install="" -subpackages="$pkgname-doc" +install="$pkgname.pre-install" +subpackages="$pkgname-doc $pkgname-client $pkgname-server" source="snapcast-$pkgver.tar.gz::https://github.com/badaix/snapcast/archive/v$pkgver.tar.gz jsonrpcpp-$_jsonrpcpp_sha.tar.gz::https://github.com/badaix/jsonrpcpp/archive/$_jsonrpcpp_sha.tar.gz https://raw.githubusercontent.com/badaix/popl/$_popl_sha/include/popl.hpp @@ -41,6 +41,28 @@ package() { make DESTDIR="$pkgdir" installclient installserver } +client() { + depends= + install="$pkgname-client.pre-install" + mkdir -p "$subpkgdir"/usr/bin + install -Dm755 "$pkgdir"/usr/bin/snapclient "$subpkgdir"/usr/bin/snapclient +} + +server() { + depends= + install="$pkgname-server.pre-install" + mkdir -p "$subpkgdir"/usr/bin + install -Dm755 "$pkgdir"/usr/bin/snapserver "$subpkgdir"/usr/bin/snapserver + install -Dm755 "$subpkgname.initd" "$subpkgdir"/etc/init.d/"$subpkgname" + install -Dm644 "$subpkgname.confd" "$subpkgdir"/etc/conf.d/"$subpkgname" +} + +check() { + cd "$builddir" + client/snapclient --help > /dev/null + server/snapserver --help > /dev/null +} + sha512sums="100eb239505d6f2d39a5efd470ff1802aa9fecabb709ff5dec284cefe6b6f0ef0432508cc24e8e29ed9ec378f5aae6a30c9fd7599ded106232e3b1a5ec9307be snapcast-0.11.1.tar.gz 2737653a2e06a20e419580669f53b9760fd0997593f0bb6f053c55d12e35564e3ecdf9bfff71397eb252468e4174f3eefbcd1543a28c46bfc0055bda0843ebe8 jsonrpcpp-115296b2232ba8776467d74602d392d03409ad7e.tar.gz d0cde4748036dec2457343b36e6c6aa47557f649503aa10b648a105b062144f5625f74597ff79da6125aa5fe4477357d664473593819116cf401b68cbff4641a popl.hpp" diff --git a/testing/snapcast/snapcast-client.pre-install b/testing/snapcast/snapcast-client.pre-install new file mode 120000 index 0000000000..500c453d4a --- /dev/null +++ b/testing/snapcast/snapcast-client.pre-install @@ -0,0 +1 @@ +snapcast.pre-install
\ No newline at end of file diff --git a/testing/snapcast/snapcast-server.confd b/testing/snapcast/snapcast-server.confd new file mode 100644 index 0000000000..1543a94305 --- /dev/null +++ b/testing/snapcast/snapcast-server.confd @@ -0,0 +1,23 @@ +# Allowed options: +# -h, --help Produce help message +# -v, --version Show version number +# -p, --port arg (=1704) Server port +# --controlPort arg (=1705) Remote control port +# -s, --stream arg (=pipe:///tmp/snapfifo?name=default) +# URI of the PCM input stream. +# Format: TYPE://host/path?name=NAME +# [&codec=CODEC] +# [&sampleformat=SAMPLEFORMAT] +# --sampleformat arg (=48000:16:2) Default sample format +# -c, --codec arg (=flac) Default transport codec +# (flac|ogg|pcm)[:options] +# Type codec:? to get codec specific options +# --streamBuffer arg (=20) Default stream read buffer [ms] +# -b, --buffer arg (=1000) Buffer [ms] +# -d, --daemon [=arg(=0)] Daemonize +# optional process priority [-20..19] +# --user arg the user[:group] to run snapserver as when daemonized + +USER_OPTS="--user snapcast:snapcast" + +SNAPSERVER_OPTS="" diff --git a/testing/snapcast/snapcast-server.initd b/testing/snapcast/snapcast-server.initd new file mode 100644 index 0000000000..ab70a84a14 --- /dev/null +++ b/testing/snapcast/snapcast-server.initd @@ -0,0 +1,12 @@ +#!/sbin/openrc-run + +name="$RC_SVCNAME" +command="/usr/bin/snapserver" +command_args="${USER_OPTS:---user snapcast:snapcast} $SNAPSERVER_OPTS" +command_background=yes +pidfile="/run/$RC_SVCNAME.pid" + +depend() { + need net + after firewall +} diff --git a/testing/snapcast/snapcast-server.pre-install b/testing/snapcast/snapcast-server.pre-install new file mode 120000 index 0000000000..500c453d4a --- /dev/null +++ b/testing/snapcast/snapcast-server.pre-install @@ -0,0 +1 @@ +snapcast.pre-install
\ No newline at end of file diff --git a/testing/snapcast/snapcast.pre-install b/testing/snapcast/snapcast.pre-install new file mode 100644 index 0000000000..0152f9e7db --- /dev/null +++ b/testing/snapcast/snapcast.pre-install @@ -0,0 +1,6 @@ +#!/bin/sh + +addgroup snapcast 2>/dev/null +adduser -S -D -h /var/lib/snapcast -s /sbin/nologin -G snapcast -g snapcast snapcast 2>/dev/null + +exit 0 |