aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--audio/firefly/Makefile9
-rw-r--r--audio/firefly/files/pkg-deinstall.in27
-rw-r--r--audio/firefly/files/pkg-install.in53
3 files changed, 2 insertions, 87 deletions
diff --git a/audio/firefly/Makefile b/audio/firefly/Makefile
index b292d23cd624..4f8d7575d749 100644
--- a/audio/firefly/Makefile
+++ b/audio/firefly/Makefile
@@ -38,12 +38,10 @@ DAAPD_USER?= daapd
DAAPD_GROUP?= daapd
DAAPD_DBDIR?= ${PREFIX}/var/db/${PORTNAME}
USE_RC_SUBR= mt-daapd
+USERS= ${DAAPD_USER}
+GROUPS= ${DAAPD_GROUP}
PLIST_SUB+= 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
@@ -57,9 +55,6 @@ post-patch:
@${REINPLACE_CMD} -e 's|echo aout|echo elf|' \
${WRKSRC}/configure
-pre-install:
- @${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
-
post-install:
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
diff --git a/audio/firefly/files/pkg-deinstall.in b/audio/firefly/files/pkg-deinstall.in
deleted file mode 100644
index a17adfdbe2c7..000000000000
--- a/audio/firefly/files/pkg-deinstall.in
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD$
-#
-
-PATH=/bin:/usr/bin:/usr/sbin
-
-case $2 in
-
-POST-DEINSTALL)
- echo '---> Starting post-deinstall script:'
-
- if [ -f %%PREFIX%%/etc/mt-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/firefly/files/pkg-install.in b/audio/firefly/files/pkg-install.in
deleted file mode 100644
index 4af21224868d..000000000000
--- a/audio/firefly/files/pkg-install.in
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD: /tmp/pcvs/ports/audio/firefly/files/Attic/pkg-install.in,v 1.2 2010-11-26 23:07:50 beech Exp $
-#
-
-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