mirror of
https://git.FreeBSD.org/ports.git
synced 2025-02-01 10:59:55 +00:00
- 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]
This commit is contained in:
parent
ad874f87a2
commit
7c25b89c78
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=274234
@ -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>
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user