aboutsummaryrefslogtreecommitdiffstats
path: root/community/snapcast
diff options
context:
space:
mode:
authorBart Ribbers <bribbers@disroot.org>2018-07-10 17:37:43 +0200
committerSören Tempel <soeren+git@soeren-tempel.net>2018-10-14 13:17:54 +0200
commit8d213358254fd1dc606bbd7f92f1ea299b6d5c56 (patch)
treec83278b87d39999bae232a261dc12ef2b0e3868c /community/snapcast
parent639e4e8ca4d2b82a73a8f68a69a718c01d323cab (diff)
downloadaports-8d213358254fd1dc606bbd7f92f1ea299b6d5c56.tar.bz2
aports-8d213358254fd1dc606bbd7f92f1ea299b6d5c56.tar.xz
testing/snapcast: move to community
Diffstat (limited to 'community/snapcast')
-rw-r--r--community/snapcast/APKBUILD72
-rw-r--r--community/snapcast/snapcast-client.confd4
-rw-r--r--community/snapcast/snapcast-client.initd18
l---------community/snapcast/snapcast-client.pre-install1
-rw-r--r--community/snapcast/snapcast-server.confd3
-rw-r--r--community/snapcast/snapcast-server.initd18
l---------community/snapcast/snapcast-server.pre-install1
-rw-r--r--community/snapcast/snapcast.pre-install8
8 files changed, 125 insertions, 0 deletions
diff --git a/community/snapcast/APKBUILD b/community/snapcast/APKBUILD
new file mode 100644
index 0000000000..05fc2e99ab
--- /dev/null
+++ b/community/snapcast/APKBUILD
@@ -0,0 +1,72 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer: Bart Ribbers <bribbers@disroot.org>
+pkgname=snapcast
+pkgver=0.15.0
+pkgrel=0
+pkgdesc="Synchronous multi-room audio player"
+url="https://github.com/badaix/snapcast"
+arch="all"
+license="GPL-3.0"
+depends="$pkgname-client $pkgname-server"
+makedepends="asio-dev bash avahi-dev flac-dev libvorbis-dev alsa-lib-dev aixlog popl"
+pkgusers="$pkgname"
+pkggroups="$pkgname audio"
+install="$pkgname-client.pre-install $pkgname-server.pre-install"
+subpackages="$pkgname-doc $pkgname-client $pkgname-server"
+source="$pkgname-$pkgver.tar.gz::https://github.com/badaix/$pkgname/archive/v$pkgver.tar.gz
+ $pkgname-client.initd
+ $pkgname-client.confd
+ $pkgname-server.initd
+ $pkgname-server.confd
+ "
+builddir="$srcdir/$pkgname-$pkgver"
+
+build() {
+ cd "$builddir"
+ make
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="$pkgdir" installclient installserver
+}
+
+client() {
+ pkgdesc="$pkgname client"
+ install_if="$pkgname-$pkgver-r$pkgrel"
+
+ mkdir -p "$subpkgdir"/usr/bin
+
+ mv "$pkgdir"/usr/bin/snapclient \
+ "$subpkgdir"/usr/bin/
+ install -Dm755 "$srcdir"/"$subpkgname.initd" \
+ "$subpkgdir"/etc/init.d/"$subpkgname"
+ install -Dm644 "$srcdir"/"$subpkgname.confd" \
+ "$subpkgdir"/etc/conf.d/"$subpkgname"
+}
+
+server() {
+ pkgdesc="$pkgname server"
+ install_if="$pkgname-$pkgver-r$pkgrel"
+
+ mkdir -p "$subpkgdir"/usr/bin
+
+ mv "$pkgdir"/usr/bin/snapserver \
+ "$subpkgdir"/usr/bin/
+ install -Dm755 "$srcdir"/"$subpkgname.initd" \
+ "$subpkgdir"/etc/init.d/"$subpkgname"
+ install -Dm644 "$srcdir"/"$subpkgname.confd" \
+ "$subpkgdir"/etc/conf.d/"$subpkgname"
+}
+
+check() {
+ cd "$builddir"
+ client/snapclient --help > /dev/null
+ server/snapserver --help > /dev/null
+}
+
+sha512sums="3751eeaa9be4ffd5c7633b8770f36e87360ab83004f090a8350e377f60a79d9502b92b92c5c9c35f513705e6484d113de9942f0a896824d7c5f806ba0010e84e snapcast-0.15.0.tar.gz
+833ce6a5fecb023f32df340df98b5cfbecc765735d7133228dd703a6a0c7f2b67ac95aa787ac7119a2eb87e768e5c4deb12738d0b0354db3510d9047f9e9b24f snapcast-client.initd
+fa353d7974d3a8b3b22ff009b762c7c4ee318f9f83e22762a9ebf550484b9fc3cc4dffd389b6d756630dc035cb86d5c5643541957785f8bbf71fe4915691c337 snapcast-client.confd
+6d6b6ea52ecb13c74f1cc6aa777ee2c1c00c9f67c3383fede6b1ad6af522bc24b5a0684939e78c5e2af6f2f35259c7c536f04b63244098f561d0590a93a7ab9f snapcast-server.initd
+48d494143d044a413b414b32cd8be51d4242234b6d7cb03102914a42b1ea6b1913c2c31b223c23c6be316918e731875149a2505daa03165659d0a1be3ca7e75c snapcast-server.confd"
diff --git a/community/snapcast/snapcast-client.confd b/community/snapcast/snapcast-client.confd
new file mode 100644
index 0000000000..68a3a863bc
--- /dev/null
+++ b/community/snapcast/snapcast-client.confd
@@ -0,0 +1,4 @@
+# snapclient options
+
+snapclient_opts=""
+
diff --git a/community/snapcast/snapcast-client.initd b/community/snapcast/snapcast-client.initd
new file mode 100644
index 0000000000..9218a5faef
--- /dev/null
+++ b/community/snapcast/snapcast-client.initd
@@ -0,0 +1,18 @@
+#!/sbin/openrc-run
+
+name=snapclient
+command="/usr/bin/snapclient"
+command_args="-d $snapclient_opts"
+command_user="snapcast"
+pidfile="/run/snapclient/pid"
+
+depend() {
+ need net
+ after firewall
+}
+
+start_pre() {
+ checkpath --directory --owner snapcast:audio --mode 0775 \
+ /run/snapclient
+}
+
diff --git a/community/snapcast/snapcast-client.pre-install b/community/snapcast/snapcast-client.pre-install
new file mode 120000
index 0000000000..500c453d4a
--- /dev/null
+++ b/community/snapcast/snapcast-client.pre-install
@@ -0,0 +1 @@
+snapcast.pre-install \ No newline at end of file
diff --git a/community/snapcast/snapcast-server.confd b/community/snapcast/snapcast-server.confd
new file mode 100644
index 0000000000..6d07abb3a4
--- /dev/null
+++ b/community/snapcast/snapcast-server.confd
@@ -0,0 +1,3 @@
+# snapcast options
+
+snapserver_opts=""
diff --git a/community/snapcast/snapcast-server.initd b/community/snapcast/snapcast-server.initd
new file mode 100644
index 0000000000..ae336d36cf
--- /dev/null
+++ b/community/snapcast/snapcast-server.initd
@@ -0,0 +1,18 @@
+#!/sbin/openrc-run
+
+name=snapserver
+command="/usr/bin/snapserver"
+command_args="-d $snapserver_opts"
+command_user="snapcast"
+start_stop_daemon_args="--quiet"
+
+depend() {
+ need net
+ after firewall
+}
+
+start_pre() {
+ checkpath --directory --owner snapcast:audio --mode 0775 \
+ /run/snapserver
+}
+
diff --git a/community/snapcast/snapcast-server.pre-install b/community/snapcast/snapcast-server.pre-install
new file mode 120000
index 0000000000..500c453d4a
--- /dev/null
+++ b/community/snapcast/snapcast-server.pre-install
@@ -0,0 +1 @@
+snapcast.pre-install \ No newline at end of file
diff --git a/community/snapcast/snapcast.pre-install b/community/snapcast/snapcast.pre-install
new file mode 100644
index 0000000000..cace0e9c54
--- /dev/null
+++ b/community/snapcast/snapcast.pre-install
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+addgroup -S -g 18 audio 2>/dev/null
+addgroup -S snapcast 2>/dev/null
+adduser -S -D -h /var/lib/snapcast -s /sbin/nologin -G snapcast -g snapcast snapcast 2>/dev/null
+addgroup snapcast audio 2>/dev/null
+
+exit 0