diff options
author | crees <crees@FreeBSD.org> | 2011-06-22 04:44:12 +0800 |
---|---|---|
committer | crees <crees@FreeBSD.org> | 2011-06-22 04:44:12 +0800 |
commit | f2eb7714c93f54ce8ffee62440d9fd6d6edd2c5c (patch) | |
tree | 417a080de7ce334fd579a176124b807ecb7334d7 /audio/firefly | |
parent | aead73f725888824e414826ff8d9e2cab8c736f7 (diff) | |
download | freebsd-ports-gnome-f2eb7714c93f54ce8ffee62440d9fd6d6edd2c5c.tar.gz freebsd-ports-gnome-f2eb7714c93f54ce8ffee62440d9fd6d6edd2c5c.tar.zst freebsd-ports-gnome-f2eb7714c93f54ce8ffee62440d9fd6d6edd2c5c.zip |
- Use USERS and GROUPS
- Stop removing users on deinstall
PR: ports/157521
Submitted by: Chris Rees (me)
Approved by: rene (mentor), maintainer timeout (14 days)
Diffstat (limited to 'audio/firefly')
-rw-r--r-- | audio/firefly/Makefile | 9 | ||||
-rw-r--r-- | audio/firefly/files/pkg-deinstall.in | 27 | ||||
-rw-r--r-- | audio/firefly/files/pkg-install.in | 53 |
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 |