summaryrefslogtreecommitdiff
path: root/media-sound/snapcast/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-10-22 11:09:47 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-10-22 11:09:47 +0100
commit64e107b9b6058580ff0432107eb37cefb0b2a7d8 (patch)
tree9a44e603e2ae365e2b1fe35ac37f73e830cdee1d /media-sound/snapcast/files
parent957235cf19a691360c720f7913672adda4258ed0 (diff)
gentoo resync : 22.10.2018
Diffstat (limited to 'media-sound/snapcast/files')
-rw-r--r--media-sound/snapcast/files/snapcast-options-for-use-flags.patch90
-rw-r--r--media-sound/snapcast/files/snapclient.confd33
-rw-r--r--media-sound/snapcast/files/snapclient.initd17
-rw-r--r--media-sound/snapcast/files/snapserver.confd45
-rw-r--r--media-sound/snapcast/files/snapserver.initd17
5 files changed, 202 insertions, 0 deletions
diff --git a/media-sound/snapcast/files/snapcast-options-for-use-flags.patch b/media-sound/snapcast/files/snapcast-options-for-use-flags.patch
new file mode 100644
index 000000000000..956d6299d457
--- /dev/null
+++ b/media-sound/snapcast/files/snapcast-options-for-use-flags.patch
@@ -0,0 +1,90 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 52fec6e..d068db1 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -11,6 +11,11 @@ option(BUILD_TESTS "Build tests (run tests with make test)" ON)
+ option(BUILD_SERVER "Build Snapserver" ON)
+ option(BUILD_CLIENT "Build Snapclient" ON)
+
++option(BUILD_WITH_FLAC "Build with FLAC support" ON)
++option(BUILD_WITH_VORBIS "Build with VORBIS support" ON)
++option(BUILD_WITH_TREMOR "Build with vorbis using TREMOR" ON)
++option(BUILD_WITH_AVAHI "Build with AVAHI support" ON)
++
+
+ if (NOT BUILD_SHARED_LIBS AND NOT BUILD_STATIC_LIBS)
+ message(FATAL_ERROR "One or both of BUILD_SHARED_LIBS or BUILD_STATIC_LIBS must be set to ON to build")
+@@ -109,10 +114,12 @@ else()
+ endif (ALSA_FOUND)
+ endif()
+
+- pkg_search_module(AVAHI avahi-client)
+- if (AVAHI_FOUND)
+- add_definitions(-DHAS_AVAHI)
+- endif (AVAHI_FOUND)
++ if(BUILD_WITH_AVAHI)
++ pkg_search_module(AVAHI avahi-client)
++ if (AVAHI_FOUND)
++ add_definitions(-DHAS_AVAHI)
++ endif (AVAHI_FOUND)
++ endif(BUILD_WITH_AVAHI)
+
+ add_definitions(-DHAS_DAEMON)
+
+@@ -154,29 +161,39 @@ if(NOT HAS_CXX11_STRING_SUPPORT)
+ add_definitions("-DNO_CPP11_STRING")
+ endif()
+
+-pkg_search_module(FLAC flac)
+-if (FLAC_FOUND)
+- add_definitions("-DHAS_FLAC")
+-endif (FLAC_FOUND)
++if(BUILD_WITH_FLAC)
++ pkg_search_module(FLAC flac)
++ if (FLAC_FOUND)
++ add_definitions("-DHAS_FLAC")
++ endif (FLAC_FOUND)
++endif()
+
+-pkg_search_module(OGG ogg)
+-if (OGG_FOUND)
+- add_definitions("-DHAS_OGG")
+-endif (OGG_FOUND)
++if(BUILD_WITH_VORBIS OR BUILD_WITH_TREMOR)
++ pkg_search_module(OGG ogg)
++ if (OGG_FOUND)
++ add_definitions("-DHAS_OGG")
++ endif (OGG_FOUND)
++endif()
+
+-pkg_search_module(VORBIS vorbis)
+-if (VORBIS_FOUND)
+- add_definitions("-DHAS_VORBIS")
+-endif (VORBIS_FOUND)
++if(BUILD_WITH_VORBIS)
++ pkg_search_module(VORBIS vorbis)
++ if (VORBIS_FOUND)
++ add_definitions("-DHAS_VORBIS")
++ endif (VORBIS_FOUND)
++endif()
+
+-pkg_search_module(TREMOR vorbisidec)
+-if (TREMOR_FOUND)
+- add_definitions("-DHAS_TREMOR")
+-endif (TREMOR_FOUND)
++if(BUILD_WITH_TREMOR)
++ pkg_search_module(TREMOR vorbisidec)
++ if (TREMOR_FOUND)
++ add_definitions("-DHAS_TREMOR")
++ endif (TREMOR_FOUND)
++endif()
+
+-pkg_search_module(VORBISENC vorbisenc)
+-if (VORBISENC_FOUND)
+- add_definitions("-DHAS_VORBISENC")
++if(BUILD_WITH_VORBIS)
++ pkg_search_module(VORBISENC vorbisenc)
++ if (VORBISENC_FOUND)
++ add_definitions("-DHAS_VORBISENC")
++ endif(VORBISENC_FOUND)
+ endif()
diff --git a/media-sound/snapcast/files/snapclient.confd b/media-sound/snapcast/files/snapclient.confd
new file mode 100644
index 000000000000..311cce1c4fa6
--- /dev/null
+++ b/media-sound/snapcast/files/snapclient.confd
@@ -0,0 +1,33 @@
+# conf.d file for snapclient
+
+# Options for running Snapclient as daemon
+#
+# -s, --soundcard arg (=default)
+# Index or name of the soundcard
+#
+# -h, --host arg
+# Server hostname or ip address
+#
+# -p, --port arg (=1704)
+# Server port
+#
+# -d, --daemon [=arg(=-3)]
+# Daemonize, optional process priority [-20..19]
+#
+# --user arg
+# The user[:group] to run snapclient as when daemonized
+#
+# --latency arg (=0)
+# Latency of the soundcard
+#
+# -i, --instance arg (=1)
+# Instance id
+#
+# --hostID arg
+# Unique host id
+#
+# For all command line options, please see man snapclient
+
+SNAPCLIENT_USER="--user snapclient:audio"
+
+SNAPCLIENT_OPTS="-d"
diff --git a/media-sound/snapcast/files/snapclient.initd b/media-sound/snapcast/files/snapclient.initd
new file mode 100644
index 000000000000..df69eb2621a0
--- /dev/null
+++ b/media-sound/snapcast/files/snapclient.initd
@@ -0,0 +1,17 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+name=snapclient
+command="/usr/bin/snapclient"
+command_args="$SNAPCLIENT_USER $SNAPCLIENT_OPTS"
+pidfile="/run/snapclient/pid"
+
+depend() {
+ use avahi-daemon
+}
+
+start_pre() {
+ checkpath --directory --owner snapclient:audio --mode 0775 \
+ /run/snapclient
+}
diff --git a/media-sound/snapcast/files/snapserver.confd b/media-sound/snapcast/files/snapserver.confd
new file mode 100644
index 000000000000..9b12f81ff2ab
--- /dev/null
+++ b/media-sound/snapcast/files/snapserver.confd
@@ -0,0 +1,45 @@
+# conf.d file for snapserver
+
+# Options for running Snapserver as daemon
+#
+# -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]
+#
+# --sendToMuted
+# Send audio to muted clients
+#
+# -d, --daemon [=arg(=0)]
+# Daemonize
+# Optional process priority [-20..19]
+#
+# --user arg
+# The user[:group] to run snapserver as when daemonized
+#
+# For all command line options, please see man snapserver
+
+SNAPSERVER_USER="--user snapserver:snapserver"
+
+SNAPSERVER_OPTS="-d -s pipe:///tmp/snapfifo?name=default"
diff --git a/media-sound/snapcast/files/snapserver.initd b/media-sound/snapcast/files/snapserver.initd
new file mode 100644
index 000000000000..02762c861b03
--- /dev/null
+++ b/media-sound/snapcast/files/snapserver.initd
@@ -0,0 +1,17 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+name=snapserver
+command="/usr/bin/snapserver"
+command_args="$SNAPSERVER_USER $SNAPSERVER_OPTS"
+pidfile="/run/snapserver/pid"
+
+depend() {
+ use avahi-daemon
+}
+
+start_pre() {
+ checkpath --directory --owner snapserver:snapserver --mode 0775 \
+ /run/snapserver
+}