summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Buchinger <cb-gentoo@guya.de>2018-10-05 16:02:16 +0200
committerThomas Deutschmann <whissi@gentoo.org>2018-10-07 19:01:50 +0200
commita29e535d11e57f796fb5306dda84e7be990d8e5f (patch)
treec207f3247bd82cafca945bc694d8d6650c2cab15 /media-sound/snapcast/snapcast-9999.ebuild
parentdev-cpp/popl: New package (diff)
downloadgentoo-a29e535d11e57f796fb5306dda84e7be990d8e5f.tar.gz
gentoo-a29e535d11e57f796fb5306dda84e7be990d8e5f.tar.bz2
gentoo-a29e535d11e57f796fb5306dda84e7be990d8e5f.zip
media-sound/snapcast: New package
Plays audio streams time sychronized on multiple devices over network using a server and a client component. Closes: https://bugs.gentoo.org/667710 Signed-off-by: Christian Buchinger <cb-gentoo@guya.de> Package-Manager: Portage-2.3.50, Repoman-2.3.11 Closes: https://github.com/gentoo/gentoo/pull/10059 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'media-sound/snapcast/snapcast-9999.ebuild')
-rw-r--r--media-sound/snapcast/snapcast-9999.ebuild87
1 files changed, 87 insertions, 0 deletions
diff --git a/media-sound/snapcast/snapcast-9999.ebuild b/media-sound/snapcast/snapcast-9999.ebuild
new file mode 100644
index 000000000000..da8726fd243c
--- /dev/null
+++ b/media-sound/snapcast/snapcast-9999.ebuild
@@ -0,0 +1,87 @@
+# 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_preinst() {
+ 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
+ diropts -m 0770 -o snapclient audio
+ keepdir /var/lib/snapclient
+ fi
+
+ if use server ; then
+ diropts -m 0770 -o snapserver snapserver
+ keepdir /var/lib/snapserver
+ fi
+}