ports/151298: audio/firefly: portlint(1) fixes and more
Takefu
takefu at airport.fm
Fri Oct 8 10:30:05 UTC 2010
>Number: 151298
>Category: ports
>Synopsis: audio/firefly: portlint(1) fixes and more
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Fri Oct 08 10:30:04 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Takefu
>Release:
>Organization:
FOX Amateur Radio Club
>Environment:
>Description:
portlint(1) fixes.
Makefile unwanted spaces and changes to the tab and remove unwanted comments.
To abolish the static files are not installed.
UID / GID immobilized.
>How-To-Repeat:
>Fix:
--- firefly.diff begins here ---
diff -ruN /usr/ports/audio/firefly/Makefile audio/firefly/Makefile
--- /usr/ports/audio/firefly/Makefile 2010-07-21 16:52:36.000000000 +0900
+++ audio/firefly/Makefile 2010-10-08 18:37:42.000000000 +0900
@@ -1,6 +1,6 @@
-# New ports collection makefile for: mt-daapd-devel
-# Date created: 26 Nov 2007
-# Whom: Mark Foster <mark at foster.cc>
+# New ports collection makefile for: mt-daapd-devel
+# Date created: 26 Nov 2007
+# Whom: Mark Foster <mark at foster.cc>
# $FreeBSD: ports/audio/firefly/Makefile,v 1.5 2010/06/06 20:43:32 naddy Exp $
#
@@ -26,14 +26,13 @@
CONFLICTS= mt-daapd-0.2.*
GNU_CONFIGURE= yes
-CONFIGURE_ENV= CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}" \
+CONFIGURE_ENV= CFLAGS+="${PTHREAD_CFLAGS}" \
CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib" \
LIBS="-L${LOCALBASE}/lib ${PTHREAD_LIBS}"
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
-CONFIGURE_ARGS= --prefix=${LOCALBASE} --with-id3tag=${PREFIX} --enable-sqlite3 --enable-oggvorbis --enable-flac
-
-#USE_AUTOTOOLS= autoheader:261 autoconf:261:env
+CONFIGURE_ARGS= --prefix=${LOCALBASE} --with-id3tag=${PREFIX} \
+ --enable-sqlite3 --enable-oggvorbis --enable-flac
DAAPD_USER?= daapd
DAAPD_GROUP?= daapd
@@ -41,7 +40,9 @@
USE_RC_SUBR= mt-daapd
PLIST_SUB+= DAAPD_DBDIR=${DAAPD_DBDIR}
-SUB_LIST+= USER=${DAAPD_USER} GROUP=${DAAPD_GROUP} DAAPD_DBDIR=${DAAPD_DBDIR}
+SUB_LIST+= USER=${DAAPD_USER}\
+ GROUP=${DAAPD_GROUP}\
+ DAAPD_DBDIR=${DAAPD_DBDIR}
SUB_FILES+= pkg-install pkg-deinstall
USE_LDCONFIG= yes
@@ -76,9 +77,6 @@
@${CHMOD} 0755 ${DATADIR}
@${CHOWN} ${DAAPD_USER}:${DAAPD_GROUP} ${DAAPD_DBDIR}
@${CHOWN} ${DAAPD_USER}:${DAAPD_GROUP} ${DATADIR}
- ${LN} -sf ${PREFIX}/lib/mt-daapd/plugins/libout-daap.so.0.0 ${PREFIX}/lib/mt-daapd/plugins/libout-daap.so
- ${LN} -sf ${PREFIX}/lib/mt-daapd/plugins/librsp.so.0.0 ${PREFIX}/lib/mt-daapd/plugins/librsp.so
- ${LN} -sf ${PREFIX}/lib/mt-daapd/plugins/libssc-script.so.0.0 ${PREFIX}/lib/mt-daapd/plugins/libssc-script.so
@${ECHO_MSG} "This port installs a sample configuration file in"
@${ECHO_MSG} "${LOCALBASE}/etc/mt-daapd.conf.sample"
diff -ruN /usr/ports/audio/firefly/files/patch-contrib_Makefile.in audio/firefly/files/patch-contrib_Makefile.in
--- /usr/ports/audio/firefly/files/patch-contrib_Makefile.in 1970-01-01 09:00:00.000000000 +0900
+++ audio/firefly/files/patch-contrib_Makefile.in 2010-10-08 18:39:24.000000000 +0900
@@ -0,0 +1,11 @@
+--- contrib/Makefile.in.orig 2007-10-29 15:03:19.000000000 +0900
++++ contrib/Makefile.in 2010-10-08 18:39:10.000000000 +0900
+@@ -200,7 +200,7 @@
+ EXTRA_DIST = README mt-daapd.spec mt-daapd.conf.templ mt-daapd-ssc.sh mt-daapd-ssc.pl
+ BUILT_SOURCES = mt-daapd.conf
+ bin_SCRIPTS = mt-daapd-ssc.sh
+-dbdir = "$(localstatedir)/cache/mt-daapd"
++dbdir = "$(localstatedir)/db/firefly"
+ all: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
diff -ruN /usr/ports/audio/firefly/files/pkg-deinstall.in audio/firefly/files/pkg-deinstall.in
--- /usr/ports/audio/firefly/files/pkg-deinstall.in 2010-07-21 16:52:36.000000000 +0900
+++ audio/firefly/files/pkg-deinstall.in 2010-10-08 12:19:57.000000000 +0900
@@ -1,7 +1,6 @@
#!/bin/sh
#
-# $FreeBSD: ports/audio/firefly/files/pkg-deinstall.in,v 1.1 2008/10/19 15:59:16 miwi Exp $
-# formerly $ FreeBSD: ports/audio/mt-daapd/pkg-deinstall,v 1.1 2004/08/05 23:00:09 edwin Exp $
+# $FreeBSD$
#
PATH=/bin:/usr/bin:/usr/sbin
@@ -11,16 +10,16 @@
POST-DEINSTALL)
echo '---> Starting post-deinstall script:'
- if [ -f /usr/local/etc/mt-daapd.conf ]; then
+ if [ -f %%PREFIX%%/etc/mt-daapd.conf ]; then
echo '---> You seem to have made some custom daapd configuration.'
- echo '---> The "daapd" user and "daapd" group were therefore not deleted.'
- echo '---> You may delete them with "pw groupdel daapd; pw userdel daapd".'
+ 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 "daapd"'
- /usr/sbin/pw groupdel -n daapd
- echo '---> Removing user "daapd"'
- echo 'y' | /usr/sbin/pw userdel -n daapd
+ echo '---> Removing group "%%GROUP%%"'
+ /usr/sbin/pw groupdel -n %%GROUP%%
+ echo '---> Removing user "%%USER%%"'
+ echo 'y' | /usr/sbin/pw userdel -n %%USER%%
fi
;;
diff -ruN /usr/ports/audio/firefly/files/pkg-install.in audio/firefly/files/pkg-install.in
--- /usr/ports/audio/firefly/files/pkg-install.in 2010-07-21 16:52:36.000000000 +0900
+++ audio/firefly/files/pkg-install.in 2010-07-29 18:28:12.000000000 +0900
@@ -1,33 +1,53 @@
#!/bin/sh
#
-# $FreeBSD: ports/audio/firefly/files/pkg-install.in,v 1.1 2008/10/19 15:59:16 miwi Exp $
-# formerly $ FreeBSD: ports/audio/mt-daapd/pkg-install,v 1.1 2004/08/05 23:00:09 edwin Exp $
+# $FreeBSD: ports/audio/mt-daapd/files/pkg-install.in,v 1.1 2006/06/25 13:17:25 itetcu Exp $
#
-PATH=/bin:/usr/bin:/usr/sbin
-
-case $2 in
-
-PRE-INSTALL)
- echo "---> Starting pre-install script:"
-
- if pw showgroup "daapd" 2>/dev/null; then
- echo "---> Using existing group \"daapd\""
- else
- echo "---> Adding group \"daapd\""
- pw addgroup daapd -h - || exit 1
- fi
-
-
- # Create user if required
- if pw showuser "daapd" 2>/dev/null; then
- echo "---> Using existing user \"daapd\""
- else
- echo "---> Adding user \"daapd\""
- pw adduser daapd -g daapd -h - \
- -d "/nonexistent" -s "/sbin/nologin" -c "daapd User" || exit 1
- fi
-
- ;;
-
-esac
+if [ "$2" != "PRE-INSTALL" ]; then
+ exit 0
+fi
+
+SC_GROUP=%%GROUP%%
+SC_USER=%%USER%%
+SC_SHELL=/sbin/nologin
+SC_HOME=/nonexistent
+PW=`which pw`
+
+if ! ${PW} show group ${SC_GROUP} -q >/dev/null; then
+ gid=3689
+ while ${PW} show group -g ${gid} -q >/dev/null; do
+ gid=`expr ${gid} + 1`
+ done
+ if ! ${PW} add group ${SC_GROUP} -g ${gid}; then
+ e=$?
+ echo "*** Failed to add group \`${SC_GROUP}'. Please add it manually."
+ exit ${e}
+ fi
+ echo "*** Added group \`${SC_GROUP}' (id ${gid})"
+else
+ gid=`${PW} show group ${SC_GROUP} 2>/dev/null | cut -d: -f3`
+fi
+
+if ! ${PW} show user ${SC_USER} -q >/dev/null; then
+ uid=3689
+ while ${PW} show user -u ${uid} -q >/dev/null; do
+ uid=`expr ${uid} + 1`
+ done
+ if ! ${PW} add user ${SC_USER} -u ${uid} -g ${gid} -d "${SC_HOME}" \
+ -c "daapd User" -s "${SC_SHELL}" -p "*" \
+ ; then
+ e=$?
+ echo "*** Failed to add user \`${SC_USER}'. Please add it manually."
+ exit ${e}
+ fi
+ echo "*** Added user \`${SC_USER}' (id ${uid})"
+else
+ if ! ${PW} mod user ${SC_USER} -g ${gid} -d "${SC_HOME}" \
+ -c "daapd User" -s "${SC_SHELL}" -p "*" \
+ ; then
+ e=$?
+ echo "*** Failed to update user \`${SC_USER}'."
+ exit ${e}
+ fi
+ echo "*** Updated user \`${SC_USER}'."
+fi
diff -ruN /usr/ports/audio/firefly/pkg-plist audio/firefly/pkg-plist
--- /usr/ports/audio/firefly/pkg-plist 2010-07-21 16:52:36.000000000 +0900
+++ audio/firefly/pkg-plist 2010-10-08 18:49:32.000000000 +0900
@@ -2,9 +2,6 @@
bin/mt-daapd-ssc.sh
bin/wavstreamer
etc/mt-daapd.conf.sample
-lib/mt-daapd/plugins/libout-daap.so
-lib/mt-daapd/plugins/librsp.so
-lib/mt-daapd/plugins/libssc-script.so
lib/mt-daapd/plugins/out-daap.a
lib/mt-daapd/plugins/out-daap.la
lib/mt-daapd/plugins/out-daap.so
@@ -78,3 +75,7 @@
%%PORTDOCS%%@dirrm %%DOCSDIR%%
@dirrmtry lib/mt-daapd/plugins
@dirrmtry lib/mt-daapd
+ at rmtry var/db/firefly/songs3.db
+ at dirrmtry var/db/firefly
+ at dirrmtry var/db
+ at dirrmtry var
--- firefly.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list