View | Details | Raw Unified | Return to bug 195224 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-8 / +15 lines)
Lines 3-19 Link Here
3
3
4
PORTNAME=	firefly
4
PORTNAME=	firefly
5
PORTVERSION=	1696
5
PORTVERSION=	1696
6
PORTREVISION=	10
6
PORTREVISION=	11
7
CATEGORIES=	audio
7
CATEGORIES=	audio
8
MASTER_SITES=	http://nightlies.fireflymediaserver.org/nightlies/svn-${PORTVERSION}/ \
8
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE} \
9
		http://www.magnesium.net/~mdf/distfiles/
9
		${MASTER_SITE_SOURCEFORGE}
10
MASTER_SITE_SUBDIR=	fireflyserver-server/Sources/mt-daapd/svn-1696
10
DISTNAME=	mt-daapd-svn-${PORTVERSION}
11
DISTNAME=	mt-daapd-svn-${PORTVERSION}
11
12
12
MAINTAINER=	info@netocean.de
13
MAINTAINER=	info@NetOcean.de
13
COMMENT=	Open-source media server for the Roku SoundBridge and iTunes
14
COMMENT=	Open-source media server for the Roku SoundBridge and iTunes
14
15
15
LICENSE=	GPLv2
16
LICENSE=	GPLv2
16
BROKEN=		Does not fetch
17
17
18
BUILD_DEPENDS=	${LOCALBASE}/include/vorbis/codec.h:${PORTSDIR}/audio/libvorbis \
18
BUILD_DEPENDS=	${LOCALBASE}/include/vorbis/codec.h:${PORTSDIR}/audio/libvorbis \
19
		${LOCALBASE}/include/FLAC/metadata.h:${PORTSDIR}/audio/flac
19
		${LOCALBASE}/include/FLAC/metadata.h:${PORTSDIR}/audio/flac
Lines 33-43 Link Here
33
33
34
DAAPD_USER?=	daapd
34
DAAPD_USER?=	daapd
35
DAAPD_GROUP?=	daapd
35
DAAPD_GROUP?=	daapd
36
DAAPD_DBDIR?=	${PREFIX}/var/db/${PORTNAME}
36
DAAPD_DBDIR?=	${BASEDIR}/var/db/${PORTNAME}
37
USE_RC_SUBR=	mt-daapd
37
USE_RC_SUBR=	mt-daapd
38
USERS=		${DAAPD_USER}
38
USERS=		${DAAPD_USER}
39
GROUPS=		${DAAPD_GROUP}
39
GROUPS=		${DAAPD_GROUP}
40
40
41
SUB_LIST+=	DAAPD_USER=${DAAPD_USER} \
42
		DAAPD_GROUP=${DAAPD_GROUP} \
43
		DAAPD_DBDIR=${DAAPD_DBDIR}
44
45
SUB_FILES=	pkg-install pkg-message
41
PLIST_SUB+=	DAAPD_DBDIR=${DAAPD_DBDIR} \
46
PLIST_SUB+=	DAAPD_DBDIR=${DAAPD_DBDIR} \
42
		DAAPD_USER=${DAAPD_USER} \
47
		DAAPD_USER=${DAAPD_USER} \
43
		DAAPD_GROUP=${DAAPD_GROUP} \
48
		DAAPD_GROUP=${DAAPD_GROUP} \
Lines 62-68 Link Here
62
	@${ECHO_CMD} "Define vars below if you need:"
67
	@${ECHO_CMD} "Define vars below if you need:"
63
	@${ECHO_CMD} "DAAPD_USER=${DAAPD_USER} (default: daapd)"
68
	@${ECHO_CMD} "DAAPD_USER=${DAAPD_USER} (default: daapd)"
64
	@${ECHO_CMD} "DAAPD_GROUP=${DAAPD_GROUP} (default: daapd)"
69
	@${ECHO_CMD} "DAAPD_GROUP=${DAAPD_GROUP} (default: daapd)"
65
	@${ECHO_CMD} "DAAPD_DBDIR=${DAAPD_DBDIR} (default: ${PREFIX}/var/db/${PORTNAME})"
70
	@${ECHO_CMD} "DAAPD_DBDIR=${DAAPD_DBDIR} (default: ${BASEDIR}/var/db/${PORTNAME})"
66
71
67
post-patch:
72
post-patch:
68
	@${REINPLACE_CMD} -e 's|echo aout|echo elf|' \
73
	@${REINPLACE_CMD} -e 's|echo aout|echo elf|' \
Lines 76-83 Link Here
76
	@${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR}
81
	@${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR}
77
.endfor
82
.endfor
78
.endif
83
.endif
84
	@${MKDIR} ${STAGEDIR}${PREFIX}/etc/${PORTNAME}
85
	@${CHMOD} 0755 ${STAGEDIR}${PREFIX}/etc/${PORTNAME}
79
	${INSTALL_DATA} ${WRKSRC}/contrib/mt-daapd.conf \
86
	${INSTALL_DATA} ${WRKSRC}/contrib/mt-daapd.conf \
80
		${STAGEDIR}${PREFIX}/etc/mt-daapd.conf.sample
87
		${STAGEDIR}${PREFIX}/etc/${PORTNAME}/mt-daapd.conf.sample
81
	@${MKDIR} ${STAGEDIR}${DAAPD_DBDIR}
88
	@${MKDIR} ${STAGEDIR}${DAAPD_DBDIR}
82
	@${MKDIR} ${STAGEDIR}${DATADIR}
89
	@${MKDIR} ${STAGEDIR}${DATADIR}
83
	@${CHMOD} 0755 ${STAGEDIR}${DAAPD_DBDIR}
90
	@${CHMOD} 0755 ${STAGEDIR}${DAAPD_DBDIR}
(-)files/mt-daapd.in (-3 / +3 lines)
Lines 12-21 Link Here
12
rcvar=firefly_enable
12
rcvar=firefly_enable
13
13
14
command="%%PREFIX%%/sbin/mt-daapd"
14
command="%%PREFIX%%/sbin/mt-daapd"
15
command_args="-c %%PREFIX%%/etc/mt-daapd.conf"
15
command_args="-c %%PREFIX%%/etc/firefly/mt-daapd.conf"
16
pidfile="/var/run/mt-daapd.pid"
16
pidfile="/var/run/mt-daapd.pid"
17
required_dirs="%%PREFIX%%/var/db/firefly"
17
required_dirs="%%BASEDIR%%/var/db/firefly"
18
required_files="%%PREFIX%%/etc/mt-daapd.conf"
18
required_files="%%PREFIX%%/etc/firefly/mt-daapd.conf"
19
19
20
load_rc_config "$name"
20
load_rc_config "$name"
21
run_rc_command "$1"
21
run_rc_command "$1"
(-)files/pkg-install.in (+83 lines)
Line 0 Link Here
1
#!/bin/sh
2
3
user="%%DAAPD_USER%%"
4
group="%%DAAPD_GROUP%%"
5
etcdir=%%ETCDIR%%
6
dbdir=%%DAAPD_DBDIR%%
7
8
#function mkpw () {
9
#    head /dev/urandom | uuencode -m - | sed -n 2p | cut -c1-${1:-8}
10
#}
11
12
case ${2} in
13
POST-INSTALL)
14
15
    if [ -f ${etcdir}/mt-daapd.conf.sample ]; then
16
17
        # Check whether .../mt-daapd.conf had been modified
18
        CHK_ONE=$(cat ${etcdir}/mt-daapd.conf | md5)
19
        CHK_TWO='empty'
20
        if [ -f ${etcdir}/mt-daapd.conf.sample ]; then
21
            CHK_TWO=$(cat ${etcdir}/mt-daapd.conf.sample | md5)
22
        fi
23
24
25
        if [ "${CHK_ONE}" != "${CHK_TWO}" ]; then
26
27
             echo ""
28
             echo "INFO: ${etcdir}/mt-daapd.conf"
29
             echo "INFO: exists already. I rather won't"
30
             echo "INFO: overwrite it with the example."
31
             echo ""
32
33
        else
34
            cp -a ${etcdir}/mt-daapd.conf.sample ${etcdir}/mt-daapd.conf
35
            FILE=${etcdir}/mt-daapd.conf
36
37
38
            DIRS="/home /media /mnt"
39
            for DIR in ${DIRS}; do
40
                if [ -d ${DIR} ]; then
41
                    mp3_dir="$( echo "${mp3_dir},${DIR}" )"
42
                fi
43
            done
44
            mp3_dir="$( echo "${mp3_dir}" | sed -E 's|^,||')"
45
            mp3_dir="$( echo "${mp3_dir}" | sed -E 's|,$||')"
46
47
48
            RESULT="$( cat ${FILE} | sed -E 's|^(mp3_dir =).*|\1 '${mp3_dir}'|' )"
49
            [ ! -z "${RESULT}" ] && echo "${RESULT}" > ${FILE}
50
51
52
            RESULT="$( cat ${FILE} | sed -E 's|^(db_parms =).*|\1 '${dbdir}'|' )"
53
            [ ! -z "${RESULT}" ] && echo "${RESULT}" > ${FILE}
54
55
56
            RESULT="$( cat ${FILE} | sed -E 's|^(servername =).*|\1 '$(hostname)'|' )"
57
            [ ! -z "${RESULT}" ] && echo "${RESULT}" > ${FILE}
58
59
60
           #RESULT="$( cat ${FILE} | sed -E 's|(admin_pw =).*|\1 '$(mkpw 10)'|' )"
61
            RESULT="$( cat ${FILE} | sed -E 's|(admin_pw =).*|\1 '$(head /dev/urandom | uuencode -m - | sed -n 2p | cut -c1-10)'|' )"
62
            [ ! -z "${RESULT}" ] && echo "${RESULT}" > ${FILE}
63
64
65
            RESULT="$( cat ${FILE} | sed -E 's|^#?(password =).*|\1 firefly|' )"
66
            [ ! -z "${RESULT}" ] && echo "${RESULT}" > ${FILE}
67
68
69
            RESULT="$( cat ${FILE} | sed -E 's|^#?(compress =).*|\1 1|' )"
70
            [ ! -z "${RESULT}" ] && echo "${RESULT}" > ${FILE}
71
72
73
            RESULT="$( cat ${FILE} | sed -E 's|(logfile =).*|\1 /var/log/mt-daapd.log|' )"
74
            [ ! -z "${RESULT}" ] && echo "${RESULT}" > ${FILE}
75
        fi
76
    fi
77
78
;;
79
esac
80
81
yes
82
native
83
text/plain
(-)files/pkg-message.in (+28 lines)
Line 0 Link Here
1
2
----------------------------------------------------------------------------
3
4
5
Working configuration and an example is placed under
6
7
    %%ETCDIR%%/mt-daapd.conf.sample
8
    %%ETCDIR%%/mt-daapd.conf
9
10
11
In order to let FireFly service start at boot, add following to rc.conf
12
13
    firefly_enable="YES"
14
15
16
FireFly service can be initialized by the following command
17
18
    service mt-daapd start
19
20
21
For further information and tips, see the following webpage
22
23
    https://sourceforge.net/projects/fireflyserver-server/
24
25
----------------------------------------------------------------------------
26
yes
27
native
28
text/plain
(-)pkg-descr (-4 / +7 lines)
Lines 1-5 Link Here
1
Firefly (mt-daapd) is an open-source media server for the Roku SoundBridge
1
iTunes-compatible DAAP Server
2
and Apple iTunes. It runs on POSIX platforms as well as Win32. It supports
3
server-side transcoding and other advanced features.
4
2
5
WWW: http://www.fireflymediaserver.org/
3
Firefly Media Server (formerly mt-daapd) is an open-source audio media server
4
(or daemon) for the Roku SoundBridge and iTunes. It serves media files using
5
Roku Server Protocol (RSP) and Digital Audio Access Protocol (DAAP). It
6
supports server-side transcoding and other advanced features.
7
8
WWW: https://sourceforge.net/projects/fireflyserver-server/
(-)pkg-plist (-3 / +3 lines)
Lines 1-4 Link Here
1
@sample etc/mt-daapd.conf.sample
1
@sample etc/firefly/mt-daapd.conf.sample
2
bin/mt-daapd-ssc.sh
2
bin/mt-daapd-ssc.sh
3
bin/wavstreamer
3
bin/wavstreamer
4
lib/mt-daapd/plugins/out-daap.a
4
lib/mt-daapd/plugins/out-daap.a
Lines 64-68 Link Here
64
share/mt-daapd/admin-root/zlib-license.html
64
share/mt-daapd/admin-root/zlib-license.html
65
share/mt-daapd/admin-root/zlib-license.txt
65
share/mt-daapd/admin-root/zlib-license.txt
66
@dir(%%DAAPD_USER%%,%%DAAPD_GROUP%%,) %%DATADIR%%
66
@dir(%%DAAPD_USER%%,%%DAAPD_GROUP%%,) %%DATADIR%%
67
@rmtry var/db/firefly/songs3.db
67
@rmtry %%DAAPD_DBDIR%%/songs3.db
68
@dir(%%DAAPD_USER%%,%%DAAPD_GROUP%%,) var/db/firefly
68
@dir(%%DAAPD_USER%%,%%DAAPD_GROUP%%,) %%DAAPD_DBDIR%%

Return to bug 195224