From 3600e72ee3f42b05e0a14097237e9a6c19e523a8 Mon Sep 17 00:00:00 2001 From: Justin Wind Date: Sun, 15 Jul 2018 15:19:29 -0700 Subject: [PATCH] add media-sound/forked-daapd --- media-sound/forked-daapd/Manifest | 5 ++ media-sound/forked-daapd/files/daapd.confd | 11 +++ media-sound/forked-daapd/files/daapd.initd | 31 ++++++++ .../forked-daapd/forked-daapd-26.2.ebuild | 78 +++++++++++++++++++ media-sound/forked-daapd/metadata.xml | 23 ++++++ 5 files changed, 148 insertions(+) create mode 100644 media-sound/forked-daapd/Manifest create mode 100644 media-sound/forked-daapd/files/daapd.confd create mode 100644 media-sound/forked-daapd/files/daapd.initd create mode 100644 media-sound/forked-daapd/forked-daapd-26.2.ebuild create mode 100644 media-sound/forked-daapd/metadata.xml diff --git a/media-sound/forked-daapd/Manifest b/media-sound/forked-daapd/Manifest new file mode 100644 index 0000000..8e636b4 --- /dev/null +++ b/media-sound/forked-daapd/Manifest @@ -0,0 +1,5 @@ +AUX daapd.confd 344 BLAKE2B 62176766f5350bc0335b233431adffae42915abb5fd540e121dbe26da6ce03728bbebed3aa2b79a7044f39374b7ae16e4b11a837a4d5ab3690ecdc027e11ffa7 SHA512 b8e2d1bc61fbaa23d9b99770657fbf3af55a9e6fd39a34af4e90379f5ce883f29458dae48f424b77c3000933932b31106466714838da38e9a159d34af6cbdacc +AUX daapd.initd 583 BLAKE2B 0d84bdf5eb458568e07b2e3866dc36e95f1a2e169055345383b5607a38c347b3457b108385f16df8cce0ca280845a3ff122246af3c06747b91e9f2f7ac39857c SHA512 a584cd71c5673732ac0c31fb92d156f5c480ced066d0686f957d6adf9c769ec234fe46a468077ea6b28efca132336e186fa0adc2200150e9fca11f2800aeb67a +DIST forked-daapd-26.2.tar.gz 3004481 BLAKE2B 1e0bdc1e458996902f62fb1e5a65ec14edb9743cae7663679340a322d5b7a4d8b17803e3a9d7d1718f7ee9d60585dbadda522992eb0bd2813e18268fd72100e2 SHA512 44a1cbd05a7b3376700be14d1f5787f213ed384d146e847f0d0c2483a12d181359e1fc1977e17a6aca63322dc345fdc4e51ad690f2f3f39c235f4c49a6d19165 +EBUILD forked-daapd-26.2.ebuild 1661 BLAKE2B 4164a2d76c518f490e8b6630e10096f0a8a3694396becdad4fe5bef83ed3421c3eb6917faefd3eb1cd258e4848e173491d6e75d69807aa388d9b6a5a22c04f92 SHA512 2bcfbe049e76b0d4890ef7a194ff5234d1cedf2aefe42896b1e97849f3e58f54ee84b055a6810041fe79bdd41c6725ac0287f4bfd303fc47e643e6dd401fc702 +MISC metadata.xml 793 BLAKE2B aa9497c2700a6b0fa38496b637d9a65124bccc571ad2afc76ceca831b2fcacca09a31f318ad7eba39d0848476e14057a1e61d3cb1c7880a425c936f979909dbd SHA512 43ef73e58b7e999ee49ac1af5fcf1861e19debcad5cb783f3cec5e977badef997be362520932b97e404b39c5578df91b26821289733458cf1125d41572bf4d34 diff --git a/media-sound/forked-daapd/files/daapd.confd b/media-sound/forked-daapd/files/daapd.confd new file mode 100644 index 0000000..8b26850 --- /dev/null +++ b/media-sound/forked-daapd/files/daapd.confd @@ -0,0 +1,11 @@ +# Set the log level (0-5) +#LOG_LEVEL=2 + +# Specify the log domains. Comma-separated, choose from: config, +# daap, db, httpd, main, mdns, misc, rsp, scan, xcode, event, remote, +# dacp, ffmpeg, artwork, player, raop, laudio, dmap, dbperf, spotify, +# lastfm, cache +#LOG_DOMAINS=main,config + +# ffid to be broadcast in mDNS records +#FFID=homeserver diff --git a/media-sound/forked-daapd/files/daapd.initd b/media-sound/forked-daapd/files/daapd.initd new file mode 100644 index 0000000..7854bd4 --- /dev/null +++ b/media-sound/forked-daapd/files/daapd.initd @@ -0,0 +1,31 @@ +#!/sbin/openrc-run + +# Override in /etc/conf.d/daapd +LOG_LEVEL=${LOG_LEVEL:-2} +LOG_DOMAINS=${LOG_DOMAINS:-'main,mdns,db,scan'} +FFID=${FFID:-daapd} + +PIDFILE=/var/run/forked-daapd.pid + +depend() { + need avahi-dnsconfd +} + +start() { + ebegin "Starting daapd" + start-stop-daemon --start forked-daapd \ + --pidfile "$PIDFILE" \ + -- \ + -P "$PIDFILE" \ + -d "$LOG_LEVEL" \ + -b "$FFID" \ + -D "$LOG_DOMAINS" + eend $? +} + +stop() { + ebegin "Stopping daapd" + start-stop-daemon --stop forked-daapd \ + --pidfile "$PIDFILE" + eend $? +} diff --git a/media-sound/forked-daapd/forked-daapd-26.2.ebuild b/media-sound/forked-daapd/forked-daapd-26.2.ebuild new file mode 100644 index 0000000..5384be0 --- /dev/null +++ b/media-sound/forked-daapd/forked-daapd-26.2.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# TODO: +# Add --enable-spotify when it works + +EAPI=5 + +inherit autotools eutils user + +DESCRIPTION="A DAAP (iTunes) media server" +HOMEPAGE="https://github.com/ejurgensen/forked-daapd" +SRC_URI="https://github.com/ejurgensen/forked-daapd/archive/${PV}.tar.gz -> ${P}.tar.gz" +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/mini-xml[threads] + net-dns/avahi[dbus] + virtual/ffmpeg + + 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.5 + ${RDEPEND} +" + +pkg_setup() { + enewuser daapd + enewgroup daapd +} + +src_prepare() { + # https://github.com/ejurgensen/forked-daapd/pull/185 + #epatch "${FILESDIR}/antlr-3.5.patch" + + eautoreconf +} + +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" daapd + newconfd "${FILESDIR}/daapd.confd" daapd + + # dodir by itself fails in the likely case of /srv/music having a + # volume mounted already. + test -d /srv/music || dodir /srv/music + + fowners -R daapd:daapd /var/lib/cache/forked-daapd +} diff --git a/media-sound/forked-daapd/metadata.xml b/media-sound/forked-daapd/metadata.xml new file mode 100644 index 0000000..4f9e72d --- /dev/null +++ b/media-sound/forked-daapd/metadata.xml @@ -0,0 +1,23 @@ + + + + + stasibear@gentoo.org + Erik Mackdanz + + + This is a much updated version of the original + forked-daapd 0.19 (non-gcd), a Linux/FreeBSD DAAP + (iTunes) media server with support for AirPlay + devices, Apple Remote (and compatibles), Spotify and + internet radio. + + + Enable support for iTunes library XML + Enable LastFM scrobbling support + Enable streaming to mpd + + + ejurgensen/forked-daapd + + -- 2.45.2