diff options
author | glarkin <glarkin@FreeBSD.org> | 2011-05-18 02:58:49 +0800 |
---|---|---|
committer | glarkin <glarkin@FreeBSD.org> | 2011-05-18 02:58:49 +0800 |
commit | 46f9d00e1bad0a8a0a76814f245b62eff47529f2 (patch) | |
tree | c847cab89265268418e5463e496f6e70d6abcda5 /mail | |
parent | 2ab524f0b69fc69d8f83aba98e03cfd72f94db94 (diff) | |
download | freebsd-ports-graphics-46f9d00e1bad0a8a0a76814f245b62eff47529f2.tar.gz freebsd-ports-graphics-46f9d00e1bad0a8a0a76814f245b62eff47529f2.tar.zst freebsd-ports-graphics-46f9d00e1bad0a8a0a76814f245b62eff47529f2.zip |
- Moved a bunch of chmod and chown commands from Makefile to pkg-plist now
that PR 152498 has been committed [1]
- Other minor Makefile cleanups
Suggested by: Jason Helfman <jhelfman@e-e.com> [1]
Diffstat (limited to 'mail')
-rw-r--r-- | mail/nullmailer/Makefile | 17 | ||||
-rw-r--r-- | mail/nullmailer/pkg-plist | 6 |
2 files changed, 9 insertions, 14 deletions
diff --git a/mail/nullmailer/Makefile b/mail/nullmailer/Makefile index 22a7530c3e5..94eb7896ddb 100644 --- a/mail/nullmailer/Makefile +++ b/mail/nullmailer/Makefile @@ -40,7 +40,7 @@ SUB_FILES+= pkg-install pkg-deinstall pkg-message PKGINSTALL= ${WRKDIR}/pkg-install PKGMESSAGE= ${WRKDIR}/pkg-message -PLIST_SUB+= LOCALSTATEDIR=${LOCALSTATEDIR} +PLIST_SUB+= LOCALSTATEDIR=${LOCALSTATEDIR} NULLMAIL_USER=${USERS} SUB_LIST+= LOCALSTATEDIR=${LOCALSTATEDIR} NULLMAIL_USER=${USERS} MAN1= nullmailer-inject.1 sendmail.1 @@ -48,21 +48,10 @@ MAN7= nullmailer.7 MAN8= nullmailer-queue.8 nullmailer-send.8 post-install: - @cd ${WRKSRC} && make install-data install-root - -# Append commands that reference the nullmailer user to the plist, because -# we need to ensure that the account has been created by bsd.port.mk by -# the time these are executed. - @${ECHO_CMD} '@exec ${PW} usermod ${USERS} -d ${LOCALSTATEDIR}/nullmailer' >> ${TMPPLIST} - @${ECHO_CMD} '@exec ${CHOWN} ${USERS}:${USERS} ${LOCALSTATEDIR}/nullmailer/queue' >> ${TMPPLIST} - @${ECHO_CMD} '@exec ${CHOWN} ${USERS}:${USERS} ${LOCALSTATEDIR}/nullmailer/tmp' >> ${TMPPLIST} - @${ECHO_CMD} '@exec ${CHOWN} ${USERS}:${USERS} ${LOCALSTATEDIR}/nullmailer/trigger' >> ${TMPPLIST} - @${ECHO_CMD} '@exec ${CHOWN} ${USERS} ${PREFIX}/sbin/nullmailer-queue' >> ${TMPPLIST} - @${ECHO_CMD} '@exec ${CHOWN} ${USERS} ${PREFIX}/libexec/nullmailer/mailq' >> ${TMPPLIST} - @${ECHO_CMD} '@exec ${CHOWN} -R ${USERS} ${LOCALSTATEDIR}/nullmailer' >> ${TMPPLIST} + @cd ${WRKSRC} && ${MAKE} install-root @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL - @${INSTALL_DATA} -c ${FILESDIR}/remotes.sample ${PREFIX}/etc/nullmailer/ + @${INSTALL_DATA} -c ${FILESDIR}/remotes.sample ${ETCDIR} @${CAT} ${PKGMESSAGE} .include <bsd.port.mk> diff --git a/mail/nullmailer/pkg-plist b/mail/nullmailer/pkg-plist index 567408b9b21..65923d000d8 100644 --- a/mail/nullmailer/pkg-plist +++ b/mail/nullmailer/pkg-plist @@ -2,10 +2,12 @@ libexec/nullmailer/smtp libexec/nullmailer/qmqp libexec/nullmailer/mailq @exec chmod u+s %D/libexec/nullmailer/mailq +@exec chown %%NULLMAIL_USER%% %D/libexec/nullmailer/mailq libexec/nullmailer/sendmail bin/nullmailer-inject sbin/nullmailer-queue @exec chmod u+s %D/sbin/nullmailer-queue +@exec chown %%NULLMAIL_USER%% %D/sbin/nullmailer-queue sbin/nullmailer-send %%ETCDIR%%/me.sample %%ETCDIR%%/remotes.sample @@ -13,13 +15,17 @@ sbin/nullmailer-send @dirrmtry %%ETCDIR%% @cwd / @exec mkdir -p %%LOCALSTATEDIR%%/nullmailer/queue +@exec chown %%NULLMAIL_USER%%:%%NULLMAIL_USER%% %%LOCALSTATEDIR%%/nullmailer @exec chmod 700 %%LOCALSTATEDIR%%/nullmailer/queue +@exec chown %%NULLMAIL_USER%%:%%NULLMAIL_USER%% %%LOCALSTATEDIR%%/nullmailer/queue @dirrmtry %%LOCALSTATEDIR%%/nullmailer/queue @exec mkdir -p %%LOCALSTATEDIR%%/nullmailer/tmp @exec chmod 700 %%LOCALSTATEDIR%%/nullmailer/tmp +@exec chown %%NULLMAIL_USER%%:%%NULLMAIL_USER%% %%LOCALSTATEDIR%%/nullmailer/tmp @dirrmtry %%LOCALSTATEDIR%%/nullmailer/tmp @exec mkfifo %%LOCALSTATEDIR%%/nullmailer/trigger @exec chmod 600 %%LOCALSTATEDIR%%/nullmailer/trigger +@exec chown %%NULLMAIL_USER%%:%%NULLMAIL_USER%% %%LOCALSTATEDIR%%/nullmailer/trigger @unexec rm -f %%LOCALSTATEDIR%%/nullmailer/trigger @ignore %%LOCALSTATEDIR%%/nullmailer/trigger |