From 663ccca45f2331f7a61d8eb68891b0b0524c10e3 Mon Sep 17 00:00:00 2001 From: Micha Glave Date: Fri, 25 Jun 2010 13:35:33 +0200 Subject: [PATCH] proudly present 1st try of forked-daapd --- media-sound/forked-daapd/Manifest | 3 + .../forked-daapd/files/forked-daapd.init | 46 +++++++++++++ .../forked-daapd/forked-daapd-0.11.ebuild | 64 +++++++++++++++++++ 3 files changed, 113 insertions(+) create mode 100644 media-sound/forked-daapd/Manifest create mode 100755 media-sound/forked-daapd/files/forked-daapd.init create mode 100644 media-sound/forked-daapd/forked-daapd-0.11.ebuild diff --git a/media-sound/forked-daapd/Manifest b/media-sound/forked-daapd/Manifest new file mode 100644 index 0000000..459f5d4 --- /dev/null +++ b/media-sound/forked-daapd/Manifest @@ -0,0 +1,3 @@ +AUX forked-daapd.init 1357 RMD160 a7698ca0576ada15cd58f086bf6c1811a37a475b SHA1 cf1e6faf5a96b7ce332508e532e043bbdca2a91b SHA256 3bd44811e6de2d5da2d26cec7cf595ea2060ca650ec777b7bee20f992df3dccf +DIST forked-daapd.git;a=snapshot;h=e3fb8f00cf4192a5e44c46c973964ea937bf4759;sf=tgz 140306 RMD160 2aebe24211cbba784d20a64939e6fd5a7b1a4d42 SHA1 3908d664cd9a8cdb7fe256e8404fbc2aaf942168 SHA256 68ad5e228befcbd737f44801d3dc924296146be025974a44bfbe3fc8bf9c4479 +EBUILD forked-daapd-0.11.ebuild 1476 RMD160 ada42fdf3b12e66f20c35eaac145c999aae881b7 SHA1 6696d7a7c36a24c511399ad083ed20c541a127bd SHA256 cce3d147d1d23e43fa399a4b069fd1a9436e615b28e9c0f672b9514a1d1bbb87 diff --git a/media-sound/forked-daapd/files/forked-daapd.init b/media-sound/forked-daapd/files/forked-daapd.init new file mode 100755 index 0000000..6c3b443 --- /dev/null +++ b/media-sound/forked-daapd/files/forked-daapd.init @@ -0,0 +1,46 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-sound/mt-daapd/files/mt-daapd.init.2,v 1.4 2010/01/25 16:27:26 patrick Exp $ +# Somehow based on init.d file shipped with mt-daapd itself. +# +# You can run multiple copies of this service just symlinking them to +# mt-daapd., then it will load /etc/mt-daapd.d/.conf as config +# file. +# Remember to give them different logs and cache directories. +# +# The main instance (with no ) uses /etc/mt-daapd.conf + +# Check for OpenRC/Baselayout 2 -- see bug #230917 +if [ -f /lib/librc.so -o -f /etc/init.d/sysfs -o -f /lib/rc/version ]; then + myservice=$RC_SVCNAME +fi + +CONF="${myservice##*.}" +if [[ -n ${CONF} && ${myservice} != "mt-daapd" ]]; then + PIDFILE="/var/run/mt-daapd.${CONF}.pid" + CONFFILE="/etc/mt-daapd.d/${CONF}.conf" +else + PIDFILE="/var/run/mt-daapd.pid" + CONFFILE="/etc/mt-daapd.conf" +fi + +depend() { + need net + #USEHOWL need mDNSResponderPosix +} + +start() { + ebegin "Starting mt-daapd DAAP server" + start-stop-daemon --start --quiet --pidfile ${PIDFILE} \ + --exec /usr/sbin/mt-daapd -- -P ${PIDFILE} -c ${CONFFILE} + eend $? +} + +stop() { + ebegin "Stopping mt-daapd DAAP server" + start-stop-daemon --stop --quiet --pidfile ${PIDFILE} --signal 2 + eend $? + + rm -f ${PIDFILE} +} diff --git a/media-sound/forked-daapd/forked-daapd-0.11.ebuild b/media-sound/forked-daapd/forked-daapd-0.11.ebuild new file mode 100644 index 0000000..10c3532 --- /dev/null +++ b/media-sound/forked-daapd/forked-daapd-0.11.ebuild @@ -0,0 +1,64 @@ + +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-sound/mt-daapd/mt-daapd-0.3.0_pre1376.ebuild,v 1.3 2007/02/17 01:02:34 flameeyes Exp $ + +inherit eutils flag-o-matic multilib + +COMMIT="e3fb8f00cf4192a5e44c46c973964ea937bf4759" + +SRC_URI="http://git.debian.org/?p=users/jblache/forked-daapd.git;a=snapshot;h=${COMMIT};sf=tgz" +RESTRICT="mirror" +EAPI='2' + +DESCRIPTION="A multi-threaded implementation of Apple's DAAP server" +HOMEPAGE="http://www.jblache.org/projects/daapd/index.html" +S=${WORKDIR}/forked-daapd + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="vorbis flac ffmpeg itunes musepack" + +DEPEND="sys-libs/zlib + =dev-libs/antlr-c-3* + dev-libs/confuse + >=dev-libs/libevent-1.4 + >=dev-db/sqlite-3.5 + >=dev-libs/libgcrypt-1.2.0 + >=net-dns/avahi-0.6.24 + media-video/ffmpeg + dev-libs/mini-xml + sys-libs/libavl + vorbis? ( media-libs/libvorbis ) + flac? ( media-libs/flac ) + musepack? ( media-libs/taglib ) + itunes? ( app-pda/libplist )" + +src_unpack() { + cd ${WORKDIR} + cat ${DISTDIR}/${A} | tar xz +} + +src_compile() { + autoreconf -i + append-flags -fno-strict-aliasing + + econf \ + $(use_enable flac) \ + $(use_enable itunes) \ + || die "configure failed" + emake || die "make failed" + + cp ${FILESDIR}/${PN}.init ${WORKDIR}/initd +} + +src_install() { + make DESTDIR=${D} install || die "make install failed" + + newinitd ${WORKDIR}/initd ${PN} + + keepdir /var/cache/forked-daapd + + dodoc AUTHORS ChangeLog NEWS README +} +