diff options
author | Mateusz Piotrowski <0mp@FreeBSD.org> | 2020-10-22 09:36:12 +0000 |
---|---|---|
committer | Mateusz Piotrowski <0mp@FreeBSD.org> | 2020-10-22 09:36:12 +0000 |
commit | 43bfc42ffbdb1fab1ada7c0917cb228039fa5ce6 (patch) | |
tree | 2b5913fac3a09c04a5ca219d2cc984ffbfd809f1 /mail/ssmtp | |
parent | net-p2p/monero-cli: Upgrade from 0.17.1.0 to 0.17.1.1 (diff) |
Clean up the port
- Use = instead of += when unnecessary when assigning values to standard
ports variables
- Set to various option-specific variables via OPTION_VARIABLEs.
- Improve the description of USERPREFS; it's better to have a more
descriptive option instead of defining a custom warning in
"pre-everything::".
- Use OPTION_CONFIGURE_ENABLE instead of OPTION_CONFIGURE_ON.
- Install manual pages at the preferred directory
- Install *.sample in ETCDIR with @sample, update pkg-message accordingly.
Diffstat (limited to 'mail/ssmtp')
-rw-r--r-- | mail/ssmtp/Makefile | 44 | ||||
-rw-r--r-- | mail/ssmtp/files/pkg-message.in | 15 | ||||
-rw-r--r-- | mail/ssmtp/pkg-plist | 8 |
3 files changed, 31 insertions, 36 deletions
diff --git a/mail/ssmtp/Makefile b/mail/ssmtp/Makefile index c1c196f7cc43..843c9a2742c1 100644 --- a/mail/ssmtp/Makefile +++ b/mail/ssmtp/Makefile @@ -3,7 +3,7 @@ PORTNAME= ssmtp PORTVERSION= 2.64 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= mail MASTER_SITES= DEBIAN_POOL DISTFILES= ${PORTNAME}_${PORTVERSION}.orig${EXTRACT_SUFX} @@ -17,11 +17,9 @@ LICENSE_FILE= ${WRKSRC}/COPYRIGHT USES= gmake tar:bzip2 GNU_CONFIGURE= yes -MAKE_ENV+= TARGET_ARCH= -CFLAGS+= -I${OPENSSLINC} -LDFLAGS+= -L${OPENSSLLIB} +MAKE_ENV= TARGET_ARCH= -SUB_FILES+= pkg-message +SUB_FILES= pkg-message GROUPS= ssmtp @@ -30,27 +28,21 @@ OPTIONS_DEFAULT= CRAMMD5 OPENSSL XORIGIP CRAMMD5_DESC= CRAM-MD5 authentication support LOGFILE_DESC= Log file -USERPREFS_DESC= User-defined revaliases +USERPREFS_DESC= User-defined revaliases in ~/.ssmtprc XORIGIP_DESC= X-Originating-IP header for REMOTE_ADDR envvar -CRAMMD5_CONFIGURE_ON= --enable-md5auth -IPV6_CONFIGURE_ON= --enable-inet6 -LOGFILE_CONFIGURE_ON= --enable-logfile -OPENSSL_USES= ssl -OPENSSL_CONFIGURE_ON= --enable-ssl -XORIGIP_EXTRA_PATCHES= ${FILESDIR}/remote-addr.patch +CRAMMD5_CONFIGURE_ENABLE= md5auth +IPV6_CONFIGURE_ENABLE= inet6 +LOGFILE_CONFIGURE_ENABLE= logfile +OPENSSL_USES= ssl +OPENSSL_CONFIGURE_ENABLE= ssl +OPENSSL_CFLAGS= -I${OPENSSLINC} +OPENSSL_LDFLAGS= -L${OPENSSLLIB} +USERPREFS_CFLAGS= -DUSERPREFS +XORIGIP_EXTRA_PATCHES= ${FILESDIR}/remote-addr.patch _MAILERCONF= /etc/mail/mailer.conf -.include <bsd.port.options.mk> - -.if ${PORT_OPTIONS:MUSERPREFS} -CFLAGS+= -DUSERPREFS -pre-everything:: - @${ECHO_CMD} "If you don't want to let your users set their own revalias address" - @${ECHO_CMD} "(in ~/.ssmtprc), please define WITHOUT_USERPREFS." -.endif - post-configure: @${REINPLACE_CMD} -e "s,/etc/ssl/certs/ssmtp.pem,${PREFIX}/etc/ssmtp/ssmtp.pem,g" \ ${WRKSRC}/ssmtp.c ${WRKSRC}/ssmtp.conf @@ -58,14 +50,14 @@ post-configure: do-install: ${INSTALL_PROGRAM} ${WRKSRC}/ssmtp ${STAGEDIR}${PREFIX}/sbin/ssmtp - @${MKDIR} ${STAGEDIR}${PREFIX}/etc/ssmtp + @${MKDIR} ${STAGEDIR}${ETCDIR} ${INSTALL_DATA} ${WRKSRC}/revaliases \ - ${STAGEDIR}${PREFIX}/etc/ssmtp/revaliases.sample + ${STAGEDIR}${ETCDIR}/revaliases.sample ${INSTALL_DATA} ${WRKSRC}/ssmtp.conf \ - ${STAGEDIR}${PREFIX}/etc/ssmtp/ssmtp.conf.sample - ${INSTALL_MAN} ${WRKSRC}/ssmtp.8 ${STAGEDIR}${MANPREFIX}/man/man8/ssmtp.8 + ${STAGEDIR}${ETCDIR}/ssmtp.conf.sample + ${INSTALL_MAN} ${WRKSRC}/ssmtp.8 ${STAGEDIR}${MAN8PREFIX}/share/man/man8 ${INSTALL_MAN} ${WRKSRC}/ssmtp.conf.5 \ - ${STAGEDIR}${MANPREFIX}/man/man5/ssmtp.conf.5 + ${STAGEDIR}${MAN5PREFIX}/share/man/man5 replace: @${REINPLACE_CMD} -e 's,^[^#],#&,g' ${_MAILERCONF} diff --git a/mail/ssmtp/files/pkg-message.in b/mail/ssmtp/files/pkg-message.in index ac5aab616c3a..ae4a5fb5cc18 100644 --- a/mail/ssmtp/files/pkg-message.in +++ b/mail/ssmtp/files/pkg-message.in @@ -3,8 +3,7 @@ message: <<EOM sSMTP has been installed successfully. -To replace sendmail with ssmtp type "make replace" or change -your /etc/mail/mailer.conf to: +Firstly, edit /etc/mail/mailer.conf to replace sendmail with ssmtp: sendmail %%PREFIX%%/sbin/ssmtp send-mail %%PREFIX%%/sbin/ssmtp @@ -13,11 +12,15 @@ newaliases %%PREFIX%%/sbin/ssmtp hoststat /usr/bin/true purgestat /usr/bin/true +Hint: in case sSMPT is being installed directly from ports, +editing /etc/mail/mailer.conf can be done by running "make replace". -However, before you can use the program, you should copy the files -"revaliases.sample" and "ssmtp.conf.sample" in %%PREFIX%%/etc/ssmtp -to "revaliases" and "ssmtp.conf" respectively and edit them to suit -your needs. +Secondly, edit the following files to configure sSMTP: + +- %%ETCDIR%%/revaliases +- %%ETCDIR%%/ssmtp.conf + +At this point sSMTP should be ready to go. EOM } ] diff --git a/mail/ssmtp/pkg-plist b/mail/ssmtp/pkg-plist index 3197d5e8a782..225a32a82372 100644 --- a/mail/ssmtp/pkg-plist +++ b/mail/ssmtp/pkg-plist @@ -1,6 +1,6 @@ @(,ssmtp,2555) sbin/ssmtp -@(,ssmtp,640) etc/ssmtp/revaliases.sample -@(,ssmtp,640) etc/ssmtp/ssmtp.conf.sample -man/man5/ssmtp.conf.5.gz -man/man8/ssmtp.8.gz +@sample(,ssmtp,640) etc/ssmtp/revaliases.sample +@sample(,ssmtp,640) etc/ssmtp/ssmtp.conf.sample +share/man/man5/ssmtp.conf.5.gz +share/man/man8/ssmtp.8.gz @dir(,ssmtp,750) etc/ssmtp |