summaryrefslogtreecommitdiff
path: root/media-sound/snapcast
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
parent957235cf19a691360c720f7913672adda4258ed0 (diff)
gentoo resync : 22.10.2018
Diffstat (limited to 'media-sound/snapcast')
-rw-r--r--media-sound/snapcast/Manifest9
-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
-rw-r--r--media-sound/snapcast/metadata.xml34
-rw-r--r--media-sound/snapcast/snapcast-0.15.0.ebuild89
-rw-r--r--media-sound/snapcast/snapcast-9999.ebuild89
9 files changed, 423 insertions, 0 deletions
diff --git a/media-sound/snapcast/Manifest b/media-sound/snapcast/Manifest
new file mode 100644
index 000000000000..b9a9bfe5e25b
--- /dev/null
+++ b/media-sound/snapcast/Manifest
@@ -0,0 +1,9 @@
+AUX snapcast-options-for-use-flags.patch 2583 BLAKE2B 4ad94f7c2d796017047645dcc74bd04209817dcf6c96c05cf92a130af2c5239761325f25a0bf8ebd65c6d1221f3ba248b93eb98c22ad278c06bca46c8e27d056 SHA512 84be456467309c2c040526dfa1847e65fdec2c59d7ba917416d10ece0d7173d53ce11c2fed2a566fb3157e58757ea21500464c46abff18e57dfb092c18450932
+AUX snapclient.confd 643 BLAKE2B f15281f607b230b165e61dae2d71e58a9b899329da435caca46aa866a14528246bbfd9abfa1002815270d98fb926e322025095b9955fe84e0381c17149ca0b9c SHA512 34961a219a608aa5447fc4b47d08785923a4a8a5d70f87f03c62dab2f590180d72992f40594772ac9d2c8cfc89281789418eee46c860b1b7c1b826e6660cfc72
+AUX snapclient.initd 378 BLAKE2B a1f2dda0843c541edfefce80e0ad9587af8ef50844fe742d932a1a1d3ea06e8587574ec4c08d403858bb42b4bf3ebcfa67fce59182b2f779e09e2ad53790d0ca SHA512 5d58c9746ba793c59ae1690a97aa5f0c74ffd3fe86a1f9ed5851e3f181e050188f70a96fbc7b8cfe0afe5de784bc332e25b4a4e68873503106b2231c59e8af69
+AUX snapserver.confd 1013 BLAKE2B 205c58e3d42dc12d759c7dd5acbb1a1229ae052a48392731a7cc10cf9ab36250938995a75c4968c33521cf1480396856b5cd8653e90b5b8a3188e1660b1c1257 SHA512 5adcf37ed69ccb09541f7bf7563ddf5a8aaf1bfcabc02f430976ae5b8e418ea68cf0b22216f3f7387a04f7516a8f30cc5b2923f811c1833c7a4208e951fd266e
+AUX snapserver.initd 383 BLAKE2B bd920738ecb98eda76f0045b50b3b0763cd123ab5eb08bbbe2964d7a0556b6df2ecb879dd0b0ff9614b10520008e9934cb278a0f3705539076eb812404f0ba58 SHA512 565084bea18bfefe60c0e33e0fd33929a0b170df9d0cbbfbf794a9ee9055a9bf605a716ff18bf72d2813e890b64815eebc2bc24963f300b4061cf017440a62d6
+DIST snapcast-0.15.0.tar.gz 667452 BLAKE2B 0bf7e28ba52356c8fff8066ded3d741243c2ba88cdc6cefda113c0d6866fe14b2fea6198d7809e564cd61d32a336a2c30ee22f6f5d6ae77368a6f3e254cc5065 SHA512 3751eeaa9be4ffd5c7633b8770f36e87360ab83004f090a8350e377f60a79d9502b92b92c5c9c35f513705e6484d113de9942f0a896824d7c5f806ba0010e84e
+EBUILD snapcast-0.15.0.ebuild 2027 BLAKE2B 3b59f8b92af313d4be43e94cf6f96b80b0bef11bd13ad7d131b1af700929665c39c2916b5f48b996a4a39df6c4f194b5b3accf434f378ad11e4a23e81bb887be SHA512 1fbc1e71107ba90abbd03a61d67ffdcc684e5fbd59e611c0f79c4f2197d3cf83634bbfee6391ef83dfbc2837b54eceb1f5a4496d3c3bf495952b8d7ff0836cc6
+EBUILD snapcast-9999.ebuild 2027 BLAKE2B 3b59f8b92af313d4be43e94cf6f96b80b0bef11bd13ad7d131b1af700929665c39c2916b5f48b996a4a39df6c4f194b5b3accf434f378ad11e4a23e81bb887be SHA512 1fbc1e71107ba90abbd03a61d67ffdcc684e5fbd59e611c0f79c4f2197d3cf83634bbfee6391ef83dfbc2837b54eceb1f5a4496d3c3bf495952b8d7ff0836cc6
+MISC metadata.xml 1335 BLAKE2B 6b0e6cfeb32d2fd6c9dfd5404df5795a1c82f1fffb2e12c31ee5c6656e0b7470d41416775c816211847bb37288f620b7f5ffe85641b88d3b5493f21436a43ae6 SHA512 78bc34f1071f7efaf923dded86d6af3761f34612832b29e6ddacf63c7bcbb5c9662e3857a818dfd0328423a7ba3aaa6d383cf425551227b6228d6d58cad4943b
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
+}
diff --git a/media-sound/snapcast/metadata.xml b/media-sound/snapcast/metadata.xml
new file mode 100644
index 000000000000..3a92671f3335
--- /dev/null
+++ b/media-sound/snapcast/metadata.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>cb-gentoo@guya.de</email>
+ <name>Christian Buchinger</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <use>
+ <flag name="avahi">Build with avahi support</flag>
+ <flag name="client">Build and install Snapcast client component</flag>
+ <flag name="flac">Build with FLAC compression support</flag>
+ <flag name="server">Build and install Snapcast server component</flag>
+ <flag name="tremor">Build with TREMOR version of vorbis</flag>
+ <flag name="vorbis">Build with libvorbis support</flag>
+ </use>
+ <upstream>
+ <maintainer status="active">
+ <name>Johannes Pohl</name>
+ <email>github@badaix.de</email>
+ </maintainer>
+ <bugs-to>https://github.com/badaix/snapcast/issues</bugs-to>
+ <remote-id type="github">badaix/snapcast</remote-id>
+ </upstream>
+ <longdescription lang="en">
+ Snapcast plays audio streams time sychronized on multiple devices over
+ network using a server and a client component. The server picks up an
+ audio stream from a fifo pipe, thus it can be combined with any audio
+ source that is able to write to a pipe.
+ </longdescription>
+</pkgmetadata>
diff --git a/media-sound/snapcast/snapcast-0.15.0.ebuild b/media-sound/snapcast/snapcast-0.15.0.ebuild
new file mode 100644
index 000000000000..a664ea01e296
--- /dev/null
+++ b/media-sound/snapcast/snapcast-0.15.0.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+DESCRIPTION="Synchronous multi-room audio player"
+HOMEPAGE="https://github.com/badaix/snapcast"
+
+if [[ ${PV} == *9999 ]] ; then
+ inherit user cmake-utils git-r3
+
+ EGIT_REPO_URI="https://github.com/badaix/snapcast.git"
+ EGIT_BRANCH="develop"
+else
+ inherit user cmake-utils
+
+ SRC_URI="https://github.com/badaix/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="GPL-3+"
+SLOT="0"
+IUSE="+avahi +client +flac +server static-libs tremor +vorbis"
+
+REQUIRED_USE="|| ( server client )"
+
+RDEPEND="avahi? ( net-dns/avahi[dbus] )
+ client? ( media-libs/alsa-lib )
+ flac? ( media-libs/flac )
+ tremor? ( media-libs/tremor )
+ vorbis? ( media-libs/libvorbis )"
+DEPEND="${RDEPEND}
+ >=dev-cpp/aixlog-1.2.1
+ >=dev-cpp/asio-1.12.1
+ >=dev-cpp/popl-1.2.0"
+
+PATCHES=( "${FILESDIR}/${PN}-options-for-use-flags.patch" )
+
+pkg_setup() {
+ if use server ; then
+ enewgroup "snapserver"
+ enewuser "snapserver" -1 -1 /var/lib/snapserver snapserver
+ fi
+
+ if use client ; then
+ enewuser "snapclient" -1 -1 /var/lib/snapclient audio
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_WITH_AVAHI=$(usex avahi)
+ -DBUILD_CLIENT=$(usex client)
+ -DBUILD_WITH_FLAC=$(usex flac)
+ -DBUILD_SERVER=$(usex server)
+ -DBUILD_STATIC_LIBS=$(usex static-libs)
+ -DBUILD_TESTS=no
+ -DBUILD_WITH_TREMOR=$(usex tremor)
+ -DBUILD_WITH_VORBIS=$(usex vorbis)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ for bin in server client ; do
+ if use ${bin} ; then
+ doman "${bin}/snap${bin}.1"
+
+ newconfd "${FILESDIR}/snap${bin}.confd" "snap${bin}"
+ newinitd "${FILESDIR}/snap${bin}.initd" "snap${bin}"
+ fi
+ done
+
+ if use client ; then
+ keepdir /var/lib/snapclient
+ fowners snapclient:audio /var/lib/snapclient
+ fperms 0770 /var/lib/snapclient
+ fi
+
+ if use server ; then
+ keepdir /var/lib/snapserver
+ fowners snapserver:snapserver /var/lib/snapserver
+ fperms 0770 /var/lib/snapserver
+ fi
+}
diff --git a/media-sound/snapcast/snapcast-9999.ebuild b/media-sound/snapcast/snapcast-9999.ebuild
new file mode 100644
index 000000000000..a664ea01e296
--- /dev/null
+++ b/media-sound/snapcast/snapcast-9999.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+DESCRIPTION="Synchronous multi-room audio player"
+HOMEPAGE="https://github.com/badaix/snapcast"
+
+if [[ ${PV} == *9999 ]] ; then
+ inherit user cmake-utils git-r3
+
+ EGIT_REPO_URI="https://github.com/badaix/snapcast.git"
+ EGIT_BRANCH="develop"
+else
+ inherit user cmake-utils
+
+ SRC_URI="https://github.com/badaix/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="GPL-3+"
+SLOT="0"
+IUSE="+avahi +client +flac +server static-libs tremor +vorbis"
+
+REQUIRED_USE="|| ( server client )"
+
+RDEPEND="avahi? ( net-dns/avahi[dbus] )
+ client? ( media-libs/alsa-lib )
+ flac? ( media-libs/flac )
+ tremor? ( media-libs/tremor )
+ vorbis? ( media-libs/libvorbis )"
+DEPEND="${RDEPEND}
+ >=dev-cpp/aixlog-1.2.1
+ >=dev-cpp/asio-1.12.1
+ >=dev-cpp/popl-1.2.0"
+
+PATCHES=( "${FILESDIR}/${PN}-options-for-use-flags.patch" )
+
+pkg_setup() {
+ if use server ; then
+ enewgroup "snapserver"
+ enewuser "snapserver" -1 -1 /var/lib/snapserver snapserver
+ fi
+
+ if use client ; then
+ enewuser "snapclient" -1 -1 /var/lib/snapclient audio
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_WITH_AVAHI=$(usex avahi)
+ -DBUILD_CLIENT=$(usex client)
+ -DBUILD_WITH_FLAC=$(usex flac)
+ -DBUILD_SERVER=$(usex server)
+ -DBUILD_STATIC_LIBS=$(usex static-libs)
+ -DBUILD_TESTS=no
+ -DBUILD_WITH_TREMOR=$(usex tremor)
+ -DBUILD_WITH_VORBIS=$(usex vorbis)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ for bin in server client ; do
+ if use ${bin} ; then
+ doman "${bin}/snap${bin}.1"
+
+ newconfd "${FILESDIR}/snap${bin}.confd" "snap${bin}"
+ newinitd "${FILESDIR}/snap${bin}.initd" "snap${bin}"
+ fi
+ done
+
+ if use client ; then
+ keepdir /var/lib/snapclient
+ fowners snapclient:audio /var/lib/snapclient
+ fperms 0770 /var/lib/snapclient
+ fi
+
+ if use server ; then
+ keepdir /var/lib/snapserver
+ fowners snapserver:snapserver /var/lib/snapserver
+ fperms 0770 /var/lib/snapserver
+ fi
+}