diff options
author | Chris Rees <crees@FreeBSD.org> | 2011-07-09 10:07:49 +0000 |
---|---|---|
committer | Chris Rees <crees@FreeBSD.org> | 2011-07-09 10:07:49 +0000 |
commit | 0d9a711a4e8cda6348e05bf82cc364569aae9ec8 (patch) | |
tree | 6019da4a7dc045f61d0498200175aaa815e344fd /mail/fetchmail | |
parent | eec4114162c06cb5b592ecc0a3487ebd2189a1a0 (diff) | |
download | ports-0d9a711a4e8cda6348e05bf82cc364569aae9ec8.tar.gz ports-0d9a711a4e8cda6348e05bf82cc364569aae9ec8.zip |
Use USERS and GROUPS
PR: ports/157613
Submitted by: crees (me)
Approved by: rene (mentor, implicit), Corey Halpin (maintainer)
Notes
Notes:
svn path=/head/; revision=277390
Diffstat (limited to 'mail/fetchmail')
-rw-r--r-- | mail/fetchmail/Makefile | 6 | ||||
-rw-r--r-- | mail/fetchmail/pkg-install | 46 | ||||
-rw-r--r-- | mail/fetchmail/pkg-plist | 1 |
3 files changed, 4 insertions, 49 deletions
diff --git a/mail/fetchmail/Makefile b/mail/fetchmail/Makefile index 02df594acffc..2b871c7e99e1 100644 --- a/mail/fetchmail/Makefile +++ b/mail/fetchmail/Makefile @@ -21,6 +21,9 @@ COMMENT= Batch mail retrieval utility for IMAP/POP3/ETRN/ODMR RUN_DEPENDS= ${LOCALBASE}/share/certs/ca-root-nss.crt:${PORTSDIR}/security/ca_root_nss +USERS= ${PORTNAME} +GROUPS= ${USERS} + USE_RC_SUBR= fetchmail FETCHMAILRC= ${PREFIX}/etc/fetchmailrc SUB_FILES= pkg-message @@ -109,9 +112,6 @@ pre-patch: post-build: @cd ${WRKSRC} && ${MAKE} check -pre-su-install: - @${SETENV} ${SCRIPTS_ENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL - post-install: .if !defined(NOPORTDOCS) ${INSTALL} -d -m 555 -o ${DOCOWN} -g ${DOCGRP} ${DOCSDIR} diff --git a/mail/fetchmail/pkg-install b/mail/fetchmail/pkg-install deleted file mode 100644 index 179729e50461..000000000000 --- a/mail/fetchmail/pkg-install +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -PKG_PREFIX=${PKG_PREFIX:=/usr/local} - -if [ -x /usr/sbin/nologin ]; then - NOLOGIN=/usr/sbin/nologin -else - NOLOGIN=/sbin/nologin -fi - -if [ x"$2" = xPRE-INSTALL ]; then - USER=fetchmail - UID=124 - GROUP=fetchmail - GID=124 - - if /usr/sbin/pw groupshow "${GROUP}" 2>/dev/null; then - echo "You already have a group \"${GROUP}\", so I will use it." - else - if /usr/sbin/pw groupadd ${GROUP} -g ${GID} - then - echo "Added group \"${GROUP}\"." - else - echo "Adding group \"${GROUP}\" failed..." - echo "Please create it, and try again." - exit 1 - fi - fi - - if /usr/sbin/pw user show "${USER}" 2>/dev/null; then - echo "You already have a user \"${USER}\", so I will use it." - else - if /usr/sbin/pw useradd ${USER} -u ${UID} -g ${GROUP} -h - -d /var/run/fetchmail -s ${NOLOGIN} -c "Fetchmail mail-retrieval daemon"; then - echo "Added user \"${USER}\"." - else - echo "Adding user \"${USER}\" failed..." - echo "Please create it, and try again." - exit 1 - fi - fi -fi - -/usr/bin/install -d -m 755 -o fetchmail -g fetchmail /var/run/fetchmail diff --git a/mail/fetchmail/pkg-plist b/mail/fetchmail/pkg-plist index 935f24ef95ae..507eb94cb22a 100644 --- a/mail/fetchmail/pkg-plist +++ b/mail/fetchmail/pkg-plist @@ -36,6 +36,7 @@ libexec/fetchmailconf.py %%NLS%%share/locale/tr/LC_MESSAGES/fetchmail.mo %%NLS%%share/locale/vi/LC_MESSAGES/fetchmail.mo %%NLS%%share/locale/zh_CN/LC_MESSAGES/fetchmail.mo +@exec /usr/bin/install -d -m 755 -o fetchmail -g fetchmail /var/run/fetchmail @unexec if cmp -s %D/etc/fetchmailrc.sample %D/etc/fetchmailrc; then rm -f %D/etc/fetchmailrc; fi etc/fetchmailrc.sample @exec if [ ! -f %D/etc/fetchmailrc ] ; then cp -p %D/%F %B/fetchmailrc; fi |