summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2005-10-21 10:10:27 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2005-10-21 10:10:27 +0000
commit6dc1b494863b039d989049fab4f86ade806aa921 (patch)
treea5fd7ac0458366b367f8838a2c04cb0bb0a03159 /media-sound
parentStable on mips. (diff)
downloadgentoo-2-6dc1b494863b039d989049fab4f86ade806aa921.tar.gz
gentoo-2-6dc1b494863b039d989049fab4f86ade806aa921.tar.bz2
gentoo-2-6dc1b494863b039d989049fab4f86ade806aa921.zip
New revision, patched to allow launching more than one instance of mt-daapd. Also new init.d file that allows symlinked-launches.
(Portage version: 2.0.53_rc6)
Diffstat (limited to 'media-sound')
-rw-r--r--media-sound/mt-daapd/ChangeLog10
-rw-r--r--media-sound/mt-daapd/Manifest12
-rw-r--r--media-sound/mt-daapd/files/digest-mt-daapd-0.2.3-r11
-rw-r--r--media-sound/mt-daapd/files/mt-daapd-0.2.3-pidfile.patch51
-rwxr-xr-xmedia-sound/mt-daapd/files/mt-daapd.init.242
-rw-r--r--media-sound/mt-daapd/mt-daapd-0.2.3-r1.ebuild101
6 files changed, 212 insertions, 5 deletions
diff --git a/media-sound/mt-daapd/ChangeLog b/media-sound/mt-daapd/ChangeLog
index ca321af09ef5..386e68c5e030 100644
--- a/media-sound/mt-daapd/ChangeLog
+++ b/media-sound/mt-daapd/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for media-sound/mt-daapd
# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/mt-daapd/ChangeLog,v 1.6 2005/10/04 11:21:26 matsuu Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/mt-daapd/ChangeLog,v 1.7 2005/10/21 10:10:27 flameeyes Exp $
+
+*mt-daapd-0.2.3-r1 (21 Oct 2005)
+
+ 21 Oct 2005; Diego Pettenò <flameeyes@gentoo.org>
+ +files/mt-daapd-0.2.3-pidfile.patch, +files/mt-daapd.init.2,
+ +mt-daapd-0.2.3-r1.ebuild:
+ New revision, patched to allow launching more than one instance of mt-daapd.
+ Also new init.d file that allows symlinked-launches.
04 Oct 2005; MATSUU Takuto <matsuu@gentoo.org> mt-daapd-0.2.3.ebuild:
Added ~sh.
diff --git a/media-sound/mt-daapd/Manifest b/media-sound/mt-daapd/Manifest
index cd7bb761c7cd..e3bfaf1d4730 100644
--- a/media-sound/mt-daapd/Manifest
+++ b/media-sound/mt-daapd/Manifest
@@ -1,7 +1,11 @@
-MD5 880127a188cf908b0ad84221e48eeebf mt-daapd-0.2.1.1.ebuild 1936
-MD5 14f69e3681187656efa996600cdf20d9 mt-daapd-0.2.3.ebuild 1959
MD5 1d61529bf228b9567cfbdb265ceef287 ChangeLog 1068
-MD5 a1eaeb2ae801daeb712c90c060e922dc metadata.xml 158
-MD5 a83c2c2bb548a45b8b1294e009aff64d files/digest-mt-daapd-0.2.3 66
MD5 804311ec22b1fba76a61411d0c752a15 files/digest-mt-daapd-0.2.1.1 68
+MD5 a83c2c2bb548a45b8b1294e009aff64d files/digest-mt-daapd-0.2.3 66
+MD5 a83c2c2bb548a45b8b1294e009aff64d files/digest-mt-daapd-0.2.3-r1 66
+MD5 b6ec66b0ccfd69869025f1bba1421dd6 files/mt-daapd-0.2.3-pidfile.patch 1918
MD5 d14aca83cf21b8c519b42962ba276e42 files/mt-daapd.init 540
+MD5 d4ffcc5422f3669bf524d245ea5f6dd4 files/mt-daapd.init.2 1320
+MD5 a1eaeb2ae801daeb712c90c060e922dc metadata.xml 158
+MD5 880127a188cf908b0ad84221e48eeebf mt-daapd-0.2.1.1.ebuild 1936
+MD5 d49d4f9b8160334e59f84386d989f684 mt-daapd-0.2.3-r1.ebuild 2383
+MD5 14f69e3681187656efa996600cdf20d9 mt-daapd-0.2.3.ebuild 1959
diff --git a/media-sound/mt-daapd/files/digest-mt-daapd-0.2.3-r1 b/media-sound/mt-daapd/files/digest-mt-daapd-0.2.3-r1
new file mode 100644
index 000000000000..b3d3908ff384
--- /dev/null
+++ b/media-sound/mt-daapd/files/digest-mt-daapd-0.2.3-r1
@@ -0,0 +1 @@
+MD5 17aa3fa0601cbe172d18f53489141e5a mt-daapd-0.2.3.tar.gz 406035
diff --git a/media-sound/mt-daapd/files/mt-daapd-0.2.3-pidfile.patch b/media-sound/mt-daapd/files/mt-daapd-0.2.3-pidfile.patch
new file mode 100644
index 000000000000..50ad82cf4f7e
--- /dev/null
+++ b/media-sound/mt-daapd/files/mt-daapd-0.2.3-pidfile.patch
@@ -0,0 +1,51 @@
+Index: mt-daapd-0.2.3/src/main.c
+===================================================================
+--- mt-daapd-0.2.3.orig/src/main.c
++++ mt-daapd-0.2.3/src/main.c
+@@ -551,6 +551,7 @@ void usage(char *program) {
+ printf(" -m Disable mDNS\n");
+ printf(" -c <file> Use configfile specified\n");
+ printf(" -p Parse playlist file\n");
++ printf(" -P <file> Write the PID to specified file\n");
+ printf(" -f Run in foreground\n");
+ printf(" -y Yes, go ahead and run as non-root user\n");
+ printf("\n\n");
+@@ -708,6 +709,7 @@ int start_signal_handler(pthread_t *hand
+ int main(int argc, char *argv[]) {
+ int option;
+ char *configfile=DEFAULT_CONFIGFILE;
++ char *pidfile=PIDFILE;
+ WSCONFIG ws_config;
+ WSHANDLE server;
+ int parseonly=0;
+@@ -726,7 +728,7 @@ int main(int argc, char *argv[]) {
+ config.use_mdns=1;
+ err_debuglevel=1;
+
+- while((option=getopt(argc,argv,"D:d:c:mpfry")) != -1) {
++ while((option=getopt(argc,argv,"D:d:c:mpP:fry")) != -1) {
+ switch(option) {
+ case 'd':
+ err_debuglevel=atoi(optarg);
+@@ -754,6 +756,10 @@ int main(int argc, char *argv[]) {
+ foreground=1;
+ break;
+
++ case 'P':
++ pidfile=optarg;
++ break;
++
+ case 'r':
+ reload=1;
+ break;
+@@ -803,8 +809,8 @@ int main(int argc, char *argv[]) {
+
+ /* open the pidfile, so it can be written once we detach */
+ if((!foreground) && (!force_non_root)) {
+- if(-1 == (pid_fd = open(PIDFILE,O_CREAT | O_WRONLY | O_TRUNC, 0644)))
+- DPRINTF(E_FATAL,L_MAIN,"Error opening pidfile (%s): %s\n",PIDFILE,strerror(errno));
++ if(-1 == (pid_fd = open(pidfile,O_CREAT | O_WRONLY | O_TRUNC, 0644)))
++ DPRINTF(E_FATAL,L_MAIN,"Error opening pidfile (%s): %s\n",pidfile,strerror(errno));
+
+ if(0 == (pid_fp = fdopen(pid_fd, "w")))
+ DPRINTF(E_FATAL,L_MAIN,"fdopen: %s\n",strerror(errno));
diff --git a/media-sound/mt-daapd/files/mt-daapd.init.2 b/media-sound/mt-daapd/files/mt-daapd.init.2
new file mode 100755
index 000000000000..05c7265584bc
--- /dev/null
+++ b/media-sound/mt-daapd/files/mt-daapd.init.2
@@ -0,0 +1,42 @@
+#!/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.1 2005/10/21 10:10:27 flameeyes 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.<name>, then it will load /etc/mt-daapd.d/<name>.conf as config
+# file.
+# Remember to give them different logs and cache directories.
+#
+# The main instance (with no <name>) uses /etc/mt-daapd.conf
+
+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 mDNSResponder
+ provide daap
+}
+
+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/mt-daapd/mt-daapd-0.2.3-r1.ebuild b/media-sound/mt-daapd/mt-daapd-0.2.3-r1.ebuild
new file mode 100644
index 000000000000..f3e80f72e52c
--- /dev/null
+++ b/media-sound/mt-daapd/mt-daapd-0.2.3-r1.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-sound/mt-daapd/mt-daapd-0.2.3-r1.ebuild,v 1.1 2005/10/21 10:10:27 flameeyes Exp $
+
+inherit flag-o-matic eutils
+
+MY_P="${P/_/-}"
+
+DESCRIPTION="A multi-threaded implementation of Apple's DAAP server"
+HOMEPAGE="http://www.mt-daapd.org/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sh ~x86"
+IUSE="debug howl vorbis"
+
+DEPEND="sys-libs/zlib
+ media-libs/libid3tag
+ sys-libs/gdbm
+ debug? ( dev-util/efence )
+ howl? ( >=net-misc/howl-0.9.2 )
+ vorbis? ( media-libs/libvorbis )"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ epatch ${FILESDIR}/${P}-pidfile.patch
+}
+
+src_compile() {
+ local myconf=""
+
+ # debugging support?
+ if use debug; then
+ myconf="${myconf} --enable-debug --enable-debug-memory --enable-efence"
+ fi
+
+ # howl support?
+ if use howl; then
+ myconf="${myconf} --enable-howl"
+ myconf="${myconf} --with-howl-libs=/usr/$(get_libdir)"
+ myconf="${myconf} --with-howl-includes=/usr/include/howl"
+ fi
+
+ # Bug 65723
+ if use vorbis; then
+ myconf="${myconf} --enable-oggvorbis"
+ fi
+
+ econf ${myconf} || die "configure failed"
+ emake || die "make failed"
+
+ cp ${FILESDIR}/${PN}.init.2 ${WORKDIR}/initd
+ use howl && \
+ sed -i -e 's:#USEHOWL ::' ${WORKDIR}/initd || \
+ sed -i -e '/#USEHOWL/d' ${WORKDIR}/initd
+}
+
+src_install() {
+ make DESTDIR=${D} install || die "make install failed"
+
+ insinto /etc
+ newins contrib/mt-daapd.conf mt-daapd.conf.example
+ doins contrib/mt-daapd.playlist
+
+ newinitd ${WORKDIR}/initd ${PN}
+
+ keepdir /var/cache/mt-daapd /etc/mt-daapd.d
+
+ dodoc AUTHORS CREDITS ChangeLog NEWS README TODO
+}
+
+pkg_postinst() {
+ einfo
+ einfo "You have to configure your mt-daapd.conf following"
+ einfo "/etc/mt-daapd.conf.example file."
+ einfo
+
+ if use howl; then
+ einfo
+ einfo "Since you want to use howl instead of the internal mdnsd"
+ einfo "you need to make sure that you have mDNSResponder configured"
+ einfo "and running to use mt-daapd."
+ einfo
+ fi
+
+ if use vorbis; then
+ einfo
+ einfo "You need to edit you extensions list in /etc/mt-daapd.conf"
+ einfo "if you want your mt-daapd to serve ogg files."
+ einfo
+ fi
+
+ einfo
+ einfo "If you want to start more than one ${PN} service, symlink"
+ einfo "/etc/init.d/${PN} to /etc/init.d/${PN}.<name>, and it will"
+ einfo "load the data from /etc/${PN}.d/<name>.conf."
+ einfo "Make sure that you have different cache directories for them."
+ einfo
+}