aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Kolobov <sergei@FreeBSD.org>2003-10-23 20:24:42 +0000
committerSergei Kolobov <sergei@FreeBSD.org>2003-10-23 20:24:42 +0000
commit50642a2603d4a17b5339c69905fcfdec9b029f16 (patch)
tree947975aa0255fb11b2b00eac8cb82956ec50d866
parent9e4870a5d6532b1cb9b38ac066d328a59a038265 (diff)
downloadports-50642a2603d4a17b5339c69905fcfdec9b029f16.tar.gz
ports-50642a2603d4a17b5339c69905fcfdec9b029f16.zip
Notes
-rw-r--r--audio/Makefile1
-rw-r--r--audio/daapd/Makefile65
-rw-r--r--audio/daapd/distinfo1
-rw-r--r--audio/daapd/files/daapd.sh28
-rw-r--r--audio/daapd/files/patch-makefile15
-rw-r--r--audio/daapd/pkg-deinstall27
-rw-r--r--audio/daapd/pkg-descr6
-rw-r--r--audio/daapd/pkg-install40
-rw-r--r--audio/daapd/pkg-message28
-rw-r--r--audio/daapd/pkg-plist6
10 files changed, 217 insertions, 0 deletions
diff --git a/audio/Makefile b/audio/Makefile
index 9d3518c11fd3..473c241402f3 100644
--- a/audio/Makefile
+++ b/audio/Makefile
@@ -50,6 +50,7 @@
SUBDIR += csound-manual
SUBDIR += cue2toc
SUBDIR += cymbaline
+ SUBDIR += daapd
SUBDIR += daaplib
SUBDIR += dagrab
SUBDIR += dap
diff --git a/audio/daapd/Makefile b/audio/daapd/Makefile
new file mode 100644
index 000000000000..d91355771ab1
--- /dev/null
+++ b/audio/daapd/Makefile
@@ -0,0 +1,65 @@
+# New ports collection makefile for: daapd
+# Date created: 19 October 2003
+# Whom: Lars Thegler <lars@thegler.dk>
+#
+# $FreeBSD$
+#
+
+PORTNAME= daapd
+PORTVERSION= 0.2.1c
+CATEGORIES= audio
+MASTER_SITES= http://www.deleet.de/projekte/daap/daapd/
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= lars@thegler.dk
+COMMENT= Server for Digital Audio Access Protocol
+
+BUILD_DEPENDS= ${LOCALBASE}/lib/libid3tag.a:${PORTSDIR}/audio/mad \
+ ${LOCALBASE}/lib/libdaaplib.a:${PORTSDIR}/audio/daaplib \
+ ${LOCALBASE}/lib/libhttpd.a:${PORTSDIR}/www/libhttpd-persistent
+
+USE_GMAKE= yes
+USE_REINPLACE= yes
+MAKEFILE= makefile
+ALL_TARGET= daapd
+
+PKGMESSAGE= ${WRKDIR}/pkg-message
+PKGINSTALL= ${WRKDIR}/pkg-install
+PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
+
+DAAPD_USER= daapd
+DAAPD_GROUP= daapd
+
+LOGDIR= ${DATADIR}
+FILES_SUB= USER=${DAAPD_USER} GROUP=${DAAPD_GROUP} \
+ PREFIX=${PREFIX} LOGDIR=${LOGDIR} DOCSDIR=${DOCSDIR} \
+ LOCALBASE=${LOCALBASE}
+
+post-patch:
+ @${REINPLACE_CMD} ${FILES_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
+ ${WRKSRC}/${MAKEFILE}
+
+pre-install:
+ @${SED} ${FILES_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
+ ${PKGDIR}/pkg-install > ${PKGINSTALL}
+ @${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+
+post-install:
+ @${INSTALL_DATA} ${WRKSRC}/daapd-example.conf ${PREFIX}/etc/daapd.conf.sample
+ @${SED} ${FILES_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
+ ${FILESDIR}/daapd.sh > ${WRKDIR}/daapd.sh
+ @${INSTALL_SCRIPT} ${WRKDIR}/daapd.sh ${PREFIX}/etc/rc.d/daapd.sh
+ @${SED} ${FILES_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
+ ${PKGDIR}/pkg-deinstall > ${PKGDEINSTALL}
+ @${SED} ${FILES_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
+ ${PKGDIR}/pkg-message > ${PKGMESSAGE}
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${DOCSDIR}
+ @${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
+.endif
+ @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+.if !defined(BATCH)
+ @${CAT} ${PKGMESSAGE}
+.endif
+
+.include <bsd.port.mk>
diff --git a/audio/daapd/distinfo b/audio/daapd/distinfo
new file mode 100644
index 000000000000..1f4913eeb030
--- /dev/null
+++ b/audio/daapd/distinfo
@@ -0,0 +1 @@
+MD5 (daapd-0.2.1c.tgz) = 6f4d9a4d6aaaaafea9d82e3f31cb055f
diff --git a/audio/daapd/files/daapd.sh b/audio/daapd/files/daapd.sh
new file mode 100644
index 000000000000..6c4052638952
--- /dev/null
+++ b/audio/daapd/files/daapd.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+# $FreeBSD$
+
+DAAPD_USER=%%USER%%
+DAAPD=%%PREFIX%%/sbin/daapd
+DAAPD_LOG=%%LOGDIR%%/daapd.log
+DAAPD_PID=/var/run/daapd.pid
+DAAPD_CONF=%%PREFIX%%/etc/daapd.conf
+
+case "$1" in
+ start)
+ if [ -r "${DAAPD_CONF}" ]; then
+ su -m ${DAAPD_USER} -c "${DAAPD} -c ${DAAPD_CONF}" \
+ >> ${DAAPD_LOG} 2>&1 &
+ echo $(($!+1)) > "${DAAPD_PID}"
+ echo -n ' daapd'
+ fi
+ ;;
+ stop)
+ kill -TERM `cat "${DAAPD_PID}"` && rm -f "${DAAPD_PID}"
+ ;;
+ *)
+ echo ""
+ echo "Usage: `basename $0` { start | stop }"
+ echo ""
+ exit 64
+ ;;
+esac
diff --git a/audio/daapd/files/patch-makefile b/audio/daapd/files/patch-makefile
new file mode 100644
index 000000000000..07ee1c58e4cc
--- /dev/null
+++ b/audio/daapd/files/patch-makefile
@@ -0,0 +1,15 @@
+--- makefile.orig Tue Oct 21 22:59:55 2003
++++ makefile Tue Oct 21 23:00:44 2003
+@@ -2,9 +2,9 @@
+ TARGET = daapd
+ OBJS = daapd.o db.o dboutput.o songcache.o parsemp3.o
+ LIBS = -ldaaplib -lhttpd -lid3tag -lz
+-LIBPATH = -L. -L/usr/local/lib
+-INCPATH = -I.
+-DEPLOY = /usr/local/bin
++LIBPATH = -L. -L%%LOCALBASE%%/lib
++INCPATH = -I. -I%%LOCALBASE%%/include
++DEPLOY = %%PREFIX%%/sbin
+ CFLAGS = -Wall -Wno-multichar
+
+ .cc.o:
diff --git a/audio/daapd/pkg-deinstall b/audio/daapd/pkg-deinstall
new file mode 100644
index 000000000000..a0ca6d0332b2
--- /dev/null
+++ b/audio/daapd/pkg-deinstall
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+PATH=/bin:/usr/bin:/usr/sbin
+
+case $2 in
+
+POST-DEINSTALL)
+ echo '---> Starting post-deinstall script:'
+
+ if [ -f %%PREFIX%%/etc/daapd.conf ]; then
+ echo '---> You seem to have made some custom daapd configuration.'
+ echo '---> The "%%USER%%" user and "%%GROUP%%" group were therefore not deleted.'
+ echo '---> You may delete them with "pw groupdel %%GROUP%%; pw userdel %%USER%%".'
+
+ else
+ echo '---> Removing group "%%GROUP%%"'
+ /usr/sbin/pw groupdel -n %%GROUP%%
+ echo '---> Removing user "%%USER%%"'
+ echo 'y' | /usr/sbin/pw userdel -n %%USER%%
+ fi
+
+ ;;
+
+esac
diff --git a/audio/daapd/pkg-descr b/audio/daapd/pkg-descr
new file mode 100644
index 000000000000..c098e1c2c705
--- /dev/null
+++ b/audio/daapd/pkg-descr
@@ -0,0 +1,6 @@
+daapd scans a directory for music files and makes them available via
+the Apple proprietary protocol DAAP. DAAP clients can browse the
+directory and retrieve individual files, either by streaming or by
+downloading them.
+
+WWW: http://www.deleet.de/projekte/daap/daapd/
diff --git a/audio/daapd/pkg-install b/audio/daapd/pkg-install
new file mode 100644
index 000000000000..b539b4621aac
--- /dev/null
+++ b/audio/daapd/pkg-install
@@ -0,0 +1,40 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+PATH=/bin:/usr/bin:/usr/sbin
+
+case $2 in
+
+PRE-INSTALL)
+ echo "---> Starting pre-install script:"
+
+ if pw showgroup "%%GROUP%%" 2>/dev/null; then
+ echo "---> Using existing group \"%%GROUP%%\""
+ else
+ echo "---> Adding group \"%%GROUP%%\""
+ pw addgroup %%GROUP%% -h - || exit 1
+ fi
+
+ # Create user if required
+ if pw showuser "%%USER%%" 2>/dev/null; then
+ echo "---> Using existing user \"%%USER%%\""
+ else
+ echo "---> Adding user \"%%USER%%\""
+ pw adduser %%USER%% -g %%GROUP%% -h - \
+ -d "%%LOGDIR%%" -s "/sbin/nologin" -c "daapd User" || exit 1
+ fi
+
+ ;;
+
+POST-INSTALL)
+ echo "---> Starting post-install script:"
+
+ echo "---> Creating directory \"%%LOGDIR%%\""
+ mkdir %%LOGDIR%%
+ chown %%USER%% %%LOGDIR%%
+
+ ;;
+
+esac
diff --git a/audio/daapd/pkg-message b/audio/daapd/pkg-message
new file mode 100644
index 000000000000..6a1922c4c684
--- /dev/null
+++ b/audio/daapd/pkg-message
@@ -0,0 +1,28 @@
+=================================================================
+
+daapd has now been installed.
+
+A sample configuration file has been placed at:
+
+ %%PREFIX%%/etc/daapd.conf.sample
+
+You need to copy this to
+
+ %%PREFIX%%/etc/daapd.conf
+
+and edit it to suit your requirements.
+Documentation is installed at:
+
+ %%DOCSDIR%%/README
+
+Once configured, you can start daapd by running:
+
+ %%PREFIX%%/etc/rc.d/daapd.sh start
+
+daapd keeps its logfile in
+
+ %%LOGDIR%%/daapd.log
+
+Enjoy!
+
+=================================================================
diff --git a/audio/daapd/pkg-plist b/audio/daapd/pkg-plist
new file mode 100644
index 000000000000..71b9af9603c9
--- /dev/null
+++ b/audio/daapd/pkg-plist
@@ -0,0 +1,6 @@
+@comment $FreeBSD$
+sbin/daapd
+etc/daapd.conf.sample
+etc/rc.d/daapd.sh
+%%PORTDOCS%%%%DOCSDIR%%/README
+@dirrm %%DATADIR%%