forked-daapd became owntone
authorJustin Wind <justin.wind+git@gmail.com>
Fri, 4 Feb 2022 19:57:50 +0000 (11:57 -0800)
committerJustin Wind <justin.wind+git@gmail.com>
Fri, 4 Feb 2022 19:57:50 +0000 (11:57 -0800)
media-sound/owntone/Manifest [new file with mode: 0644]
media-sound/owntone/files/daapd.confd [new file with mode: 0644]
media-sound/owntone/files/daapd.initd [new file with mode: 0644]
media-sound/owntone/owntone-28.3.ebuild [new file with mode: 0644]

diff --git a/media-sound/owntone/Manifest b/media-sound/owntone/Manifest
new file mode 100644 (file)
index 0000000..3faa4df
--- /dev/null
@@ -0,0 +1,4 @@
+AUX daapd.confd 397 BLAKE2B fa70ccc26aadda832dc3b44f9024de208ac5cc169ad80271aa7fb080d5a82d9b7544e1ae29f043ccb5ed1ece7b4eb018a4096e87e89db27a6fdf6a8b050fa1a3 SHA512 48e739e88691d92734cb1a8897cac14aabf89988f9b378be39e0f1312f88222133e0af835bc32766328bcbb6bab7b334c1b4bb0cfde7b210f7a471b996c46002
+AUX daapd.initd 570 BLAKE2B 9824d4bce929641b42c30b71fa1509461c9a6894c7fe9a0bcd11c79bfc464cb64caef17c0aed2c7465484b87d06882c5585a4a5b2c367af0565754cdbeed3884 SHA512 ee4ad806fce57bc73b98f13de2728c975fc07c1e613591fbc1aab86a9219c2a92224b52b2621e621fe375b28da6f1defaf5f8f4652856f7f652ad2b435950dab
+DIST owntone-28.3.tar.xz 2561224 BLAKE2B b418e1cee7de847a09b0dc8351dc4309bdca4683d5a4907767d50f2472ad44e2dbd12e1e6fe0f368ac6ae794441c0331bf8c75a0089cab7ecbbdea30e3ea808c SHA512 35f630dd98da066d987b5aa1ce2b19485bf710f605033de0bb5550a072e09282573be6beef9ede095beeef2d7d6f42ed6feb17e008e1dd5c6678233556883ab6
+EBUILD owntone-28.3.ebuild 1831 BLAKE2B 1b3b780cd7d9115101e679cf38a8f64b7f7e50d6a42b87cd7cc520f048852399e7b53589e6258a787a3f80e792f4d41b7e11ba421e179eceb82da441eac341ad SHA512 df1b09cc5787b643e2793a112512ad9304fc5900280f3be28052cdd44c6927e8ca3bfb537678e696821d2240667c200e50a3440a8d37c56489748cee74cc702c
diff --git a/media-sound/owntone/files/daapd.confd b/media-sound/owntone/files/daapd.confd
new file mode 100644 (file)
index 0000000..7e24812
--- /dev/null
@@ -0,0 +1,12 @@
+# Set the log level (0-5)
+#LOG_LEVEL=2
+
+# Specify the log domains.  Comma-separated, choose from: 
+# config, daap, db, httpd, http, main, mdns, misc, rsp, scan, xcode,
+# event, remote, dacp, ffmpeg, artwork, player, raop, laudio, dmap,
+# dbperf, spotify, lastfm, cache, mpd, stream, cast, fifo, lib, web,
+# airplay
+#LOG_DOMAINS=main,config
+
+# ffid to be broadcast in mDNS records
+#FFID=homeserver
diff --git a/media-sound/owntone/files/daapd.initd b/media-sound/owntone/files/daapd.initd
new file mode 100644 (file)
index 0000000..083f56c
--- /dev/null
@@ -0,0 +1,31 @@
+#!/sbin/openrc-run
+
+# Override in /etc/conf.d/owntone
+LOG_LEVEL=${LOG_LEVEL:-2}
+LOG_DOMAINS=${LOG_DOMAINS:-'main,mdns,db,scan'}
+FFID=${FFID:-owntone}
+
+PIDFILE=/run/owntone.pid
+
+depend() {
+    need avahi-dnsconfd
+}
+
+start() {
+    ebegin "Starting owntone"
+    start-stop-daemon --start owntone \
+                     --pidfile "$PIDFILE" \
+                     -- \
+                     -P "$PIDFILE" \
+                     -d "$LOG_LEVEL" \
+                     -b "$FFID" \
+                     -D "$LOG_DOMAINS"
+    eend $?
+}
+
+stop() {
+    ebegin "Stopping daapd"
+    start-stop-daemon --stop owntone \
+                     --pidfile "$PIDFILE"
+    eend $?
+}
diff --git a/media-sound/owntone/owntone-28.3.ebuild b/media-sound/owntone/owntone-28.3.ebuild
new file mode 100644 (file)
index 0000000..5696f2c
--- /dev/null
@@ -0,0 +1,82 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# TODO:
+# Add --enable-spotify when it works
+
+EAPI=7
+
+inherit autotools eutils user
+
+DESCRIPTION="A DAAP (iTunes) media server"
+HOMEPAGE="https://github.com/owntone/owntone-server"
+#SRC_URI="https://github.com/owntone/owntone-server/archive/${PV}.tar.xz -> ${P}.tar.xz"
+SRC_URI="https://github.com/owntone/owntone-server/releases/download/${PV}/${P}.tar.xz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="alsa flac itunes lastfm mpd musepack"
+
+# Note: mpd support appears to be standalone, e.g. --enable-mpd doesn't
+# result in additional linkage.
+RDEPEND="
+       dev-db/sqlite:3
+       dev-libs/antlr-c:0
+       dev-libs/confuse
+       dev-libs/libevent
+       dev-libs/libgcrypt:0
+       dev-libs/libunistring
+       dev-libs/libsodium
+       net-libs/libwebsockets:0/15
+       dev-libs/mxml[threads]
+       net-dns/avahi[dbus]
+       virtual/ffmpeg
+       dev-libs/json-c
+
+       alsa? ( media-libs/alsa-lib )
+       flac? ( media-libs/flac )
+       itunes? ( app-pda/libplist )
+       lastfm? ( net-misc/curl )
+       musepack? ( media-libs/taglib )
+"
+
+DEPEND="
+       dev-java/antlr:3
+       ${RDEPEND}
+"
+
+pkg_setup() {
+       enewuser daapd
+       enewgroup daapd
+}
+
+src_prepare() {
+       # https://github.com/ejurgensen/forked-daapd/pull/185
+       #epatch "${FILESDIR}/antlr-3.5.patch"
+       default
+}
+
+src_configure() {
+       ac_cv_prog_ANTLR=antlr3.5 \
+       econf \
+               $(use_enable alsa) \
+               $(use_enable flac) \
+               $(use_enable musepack) \
+               $(use_enable itunes) \
+               $(use_enable lastfm) \
+               $(use_enable mpd)
+}
+
+src_install() {
+       emake DESTDIR="${D}" install
+
+       newinitd "${FILESDIR}/daapd.initd" owntone
+       newconfd "${FILESDIR}/daapd.confd" owntone
+
+       # dodir by itself fails in the likely case of /srv/music having a
+       # volume mounted already.
+       test -d /srv/music || dodir /srv/music
+
+       keepdir /var/lib/cache/owntone
+       fowners -R daapd:daapd /var/lib/cache/owntone
+}