View | Details | Raw Unified | Return to bug 151298
Collapse All | Expand All

(-)audio/firefly/Makefile (-11 / +9 lines)
Lines 1-6 Link Here
1
# New ports collection makefile for: mt-daapd-devel
1
# New ports collection makefile for:	mt-daapd-devel
2
# Date created:                26 Nov 2007
2
# Date created:				26 Nov 2007
3
# Whom:                        Mark Foster <mark@foster.cc>
3
# Whom:					Mark Foster <mark@foster.cc>
4
# $FreeBSD: ports/audio/firefly/Makefile,v 1.5 2010/06/06 20:43:32 naddy Exp $
4
# $FreeBSD: ports/audio/firefly/Makefile,v 1.5 2010/06/06 20:43:32 naddy Exp $
5
#
5
#
Lines 26-39 Link Here
26
CONFLICTS=	mt-daapd-0.2.*
26
CONFLICTS=	mt-daapd-0.2.*
27
GNU_CONFIGURE=	yes
27
GNU_CONFIGURE=	yes
28
CONFIGURE_ENV=	CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}" \
28
CONFIGURE_ENV=	CFLAGS+="${PTHREAD_CFLAGS}" \
29
		CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \
29
		CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \
30
		LDFLAGS="-L${LOCALBASE}/lib" \
30
		LDFLAGS="-L${LOCALBASE}/lib" \
31
		LIBS="-L${LOCALBASE}/lib ${PTHREAD_LIBS}"
31
		LIBS="-L${LOCALBASE}/lib ${PTHREAD_LIBS}"
32
CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
32
CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
33
CONFIGURE_ARGS=		--prefix=${LOCALBASE} --with-id3tag=${PREFIX} --enable-sqlite3 --enable-oggvorbis --enable-flac
33
CONFIGURE_ARGS=		--prefix=${LOCALBASE} --with-id3tag=${PREFIX} \
34
34
			--enable-sqlite3 --enable-oggvorbis --enable-flac
35
#USE_AUTOTOOLS=	autoheader:261 autoconf:261:env
36
DAAPD_USER?=	daapd
35
DAAPD_USER?=	daapd
37
DAAPD_GROUP?=	daapd
36
DAAPD_GROUP?=	daapd
Lines 41-47 Link Here
41
USE_RC_SUBR=	mt-daapd
40
USE_RC_SUBR=	mt-daapd
42
PLIST_SUB+=	DAAPD_DBDIR=${DAAPD_DBDIR}
41
PLIST_SUB+=	DAAPD_DBDIR=${DAAPD_DBDIR}
43
SUB_LIST+=	USER=${DAAPD_USER} GROUP=${DAAPD_GROUP} DAAPD_DBDIR=${DAAPD_DBDIR}
42
SUB_LIST+=	USER=${DAAPD_USER}\
43
		GROUP=${DAAPD_GROUP}\
44
		DAAPD_DBDIR=${DAAPD_DBDIR}
44
SUB_FILES+=	pkg-install pkg-deinstall
45
SUB_FILES+=	pkg-install pkg-deinstall
45
USE_LDCONFIG=	yes
46
USE_LDCONFIG=	yes
Lines 76-84 Link Here
76
	@${CHMOD} 0755 ${DATADIR}
77
	@${CHMOD} 0755 ${DATADIR}
77
	@${CHOWN} ${DAAPD_USER}:${DAAPD_GROUP} ${DAAPD_DBDIR}
78
	@${CHOWN} ${DAAPD_USER}:${DAAPD_GROUP} ${DAAPD_DBDIR}
78
	@${CHOWN} ${DAAPD_USER}:${DAAPD_GROUP} ${DATADIR}
79
	@${CHOWN} ${DAAPD_USER}:${DAAPD_GROUP} ${DATADIR}
79
	${LN} -sf ${PREFIX}/lib/mt-daapd/plugins/libout-daap.so.0.0 ${PREFIX}/lib/mt-daapd/plugins/libout-daap.so
80
	${LN} -sf ${PREFIX}/lib/mt-daapd/plugins/librsp.so.0.0 ${PREFIX}/lib/mt-daapd/plugins/librsp.so
81
	${LN} -sf ${PREFIX}/lib/mt-daapd/plugins/libssc-script.so.0.0 ${PREFIX}/lib/mt-daapd/plugins/libssc-script.so
82
	@${ECHO_MSG} "This port installs a sample configuration file in"
80
	@${ECHO_MSG} "This port installs a sample configuration file in"
83
	@${ECHO_MSG} "${LOCALBASE}/etc/mt-daapd.conf.sample"
81
	@${ECHO_MSG} "${LOCALBASE}/etc/mt-daapd.conf.sample"
(-)audio/firefly/files/patch-contrib_Makefile.in (+11 lines)
Line 0 Link Here
1
--- contrib/Makefile.in.orig	2007-10-29 15:03:19.000000000 +0900
2
+++ contrib/Makefile.in	2010-10-08 18:39:10.000000000 +0900
3
@@ -200,7 +200,7 @@
4
 EXTRA_DIST = README mt-daapd.spec mt-daapd.conf.templ mt-daapd-ssc.sh mt-daapd-ssc.pl
5
 BUILT_SOURCES = mt-daapd.conf
6
 bin_SCRIPTS = mt-daapd-ssc.sh
7
-dbdir = "$(localstatedir)/cache/mt-daapd"
8
+dbdir = "$(localstatedir)/db/firefly"
9
 all: $(BUILT_SOURCES)
10
 	$(MAKE) $(AM_MAKEFLAGS) all-recursive
11
(-)audio/firefly/files/pkg-deinstall.in (-9 / +8 lines)
Lines 1-7 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
#
2
#
3
# $FreeBSD: ports/audio/firefly/files/pkg-deinstall.in,v 1.1 2008/10/19 15:59:16 miwi Exp $
3
# $FreeBSD$
4
# formerly $ FreeBSD: ports/audio/mt-daapd/pkg-deinstall,v 1.1 2004/08/05 23:00:09 edwin Exp $
5
#
4
#
6
PATH=/bin:/usr/bin:/usr/sbin
5
PATH=/bin:/usr/bin:/usr/sbin
Lines 11-26 Link Here
11
POST-DEINSTALL)
10
POST-DEINSTALL)
12
  echo '---> Starting post-deinstall script:'
11
  echo '---> Starting post-deinstall script:'
13
  if [ -f /usr/local/etc/mt-daapd.conf ]; then
12
  if [ -f %%PREFIX%%/etc/mt-daapd.conf ]; then
14
    echo '---> You seem to have made some custom daapd configuration.'
13
    echo '---> You seem to have made some custom daapd configuration.'
15
    echo '--->   The "daapd" user and "daapd" group were therefore not deleted.'
14
    echo '--->   The "%%USER%%" user and "%%GROUP%%" group were therefore not deleted.'
16
    echo '--->   You may delete them with "pw groupdel daapd; pw userdel daapd".'
15
    echo '--->   You may delete them with "pw groupdel %%GROUP%%; pw userdel %%USER%%".'
17
  else
16
  else
18
    echo '---> Removing group "daapd"'
17
    echo '---> Removing group "%%GROUP%%"'
19
    /usr/sbin/pw groupdel -n daapd
18
    /usr/sbin/pw groupdel -n %%GROUP%%
20
    echo '---> Removing user "daapd"'
19
    echo '---> Removing user "%%USER%%"'
21
    echo 'y' | /usr/sbin/pw userdel -n daapd
20
    echo 'y' | /usr/sbin/pw userdel -n %%USER%%
22
  fi
21
  fi
23
  ;;
22
  ;;
(-)audio/firefly/files/pkg-install.in (-29 / +49 lines)
Lines 1-33 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
#
2
#
3
# $FreeBSD: ports/audio/firefly/files/pkg-install.in,v 1.1 2008/10/19 15:59:16 miwi Exp $
3
# $FreeBSD: ports/audio/mt-daapd/files/pkg-install.in,v 1.1 2006/06/25 13:17:25 itetcu Exp $
4
# formerly $ FreeBSD: ports/audio/mt-daapd/pkg-install,v 1.1 2004/08/05 23:00:09 edwin Exp $
5
#
4
#
6
PATH=/bin:/usr/bin:/usr/sbin
5
if [ "$2" != "PRE-INSTALL" ]; then
7
6
	exit 0
8
case $2 in
7
fi
9
8
10
PRE-INSTALL)
9
SC_GROUP=%%GROUP%%
11
  echo "---> Starting pre-install script:"
10
SC_USER=%%USER%%
12
11
SC_SHELL=/sbin/nologin
13
  if pw showgroup "daapd" 2>/dev/null; then
12
SC_HOME=/nonexistent
14
    echo "---> Using existing group \"daapd\""
13
PW=`which pw`
15
  else
14
16
    echo "---> Adding group \"daapd\""
15
if ! ${PW} show group ${SC_GROUP} -q >/dev/null; then
17
    pw addgroup daapd -h - || exit 1
16
	gid=3689
18
  fi
17
	while ${PW} show group -g ${gid} -q >/dev/null; do
19
18
		gid=`expr ${gid} + 1`
20
19
	done
21
  # Create user if required
20
	if ! ${PW} add group ${SC_GROUP} -g ${gid}; then
22
  if pw showuser "daapd" 2>/dev/null; then
21
		e=$?
23
    echo "---> Using existing user \"daapd\""
22
		echo "*** Failed to add group \`${SC_GROUP}'. Please add it manually."
24
  else
23
		exit ${e}
25
    echo "---> Adding user \"daapd\""
24
	fi
26
    pw adduser daapd -g daapd -h - \
25
	echo "*** Added group \`${SC_GROUP}' (id ${gid})"
27
      -d "/nonexistent" -s "/sbin/nologin" -c "daapd User" || exit 1
26
else
28
  fi
27
	gid=`${PW} show group ${SC_GROUP} 2>/dev/null | cut -d: -f3`
29
28
fi
30
  ;;
29
31
30
if ! ${PW} show user ${SC_USER} -q >/dev/null; then
32
esac
31
	uid=3689
32
	while ${PW} show user -u ${uid} -q >/dev/null; do
33
		uid=`expr ${uid} + 1`
34
	done
35
	if ! ${PW} add user ${SC_USER} -u ${uid} -g ${gid} -d "${SC_HOME}" \
36
	-c "daapd User" -s "${SC_SHELL}" -p "*" \
37
	; then
38
		e=$?
39
		echo "*** Failed to add user \`${SC_USER}'. Please add it manually."
40
		exit ${e}
41
	fi
42
	echo "*** Added user \`${SC_USER}' (id ${uid})"
43
else
44
	if ! ${PW} mod user ${SC_USER} -g ${gid} -d "${SC_HOME}" \
45
	-c "daapd User" -s "${SC_SHELL}" -p "*" \
46
	; then
47
		e=$?
48
		echo "*** Failed to update user \`${SC_USER}'."
49
		exit ${e}
50
	fi
51
		echo "*** Updated user \`${SC_USER}'."
52
fi
(-)audio/firefly/pkg-plist (-3 / +4 lines)
Lines 2-10 Link Here
2
bin/mt-daapd-ssc.sh
2
bin/mt-daapd-ssc.sh
3
bin/wavstreamer
3
bin/wavstreamer
4
etc/mt-daapd.conf.sample
4
etc/mt-daapd.conf.sample
5
lib/mt-daapd/plugins/libout-daap.so
6
lib/mt-daapd/plugins/librsp.so
7
lib/mt-daapd/plugins/libssc-script.so
8
lib/mt-daapd/plugins/out-daap.a
5
lib/mt-daapd/plugins/out-daap.a
9
lib/mt-daapd/plugins/out-daap.la
6
lib/mt-daapd/plugins/out-daap.la
10
lib/mt-daapd/plugins/out-daap.so
7
lib/mt-daapd/plugins/out-daap.so
Lines 78-80 Link Here
78
%%PORTDOCS%%@dirrm %%DOCSDIR%%
75
%%PORTDOCS%%@dirrm %%DOCSDIR%%
79
@dirrmtry lib/mt-daapd/plugins
76
@dirrmtry lib/mt-daapd/plugins
80
@dirrmtry lib/mt-daapd
77
@dirrmtry lib/mt-daapd
78
@rmtry var/db/firefly/songs3.db
79
@dirrmtry var/db/firefly
80
@dirrmtry var/db
81
@dirrmtry var

Return to bug 151298