svn commit: r552956 - in head/mail/ssmtp: . files
Mateusz Piotrowski
0mp at FreeBSD.org
Thu Oct 22 09:36:13 UTC 2020
Author: 0mp
Date: Thu Oct 22 09:36:12 2020
New Revision: 552956
URL: https://svnweb.freebsd.org/changeset/ports/552956
Log:
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.
Modified:
head/mail/ssmtp/Makefile
head/mail/ssmtp/files/pkg-message.in
head/mail/ssmtp/pkg-plist
Modified: head/mail/ssmtp/Makefile
==============================================================================
--- head/mail/ssmtp/Makefile Thu Oct 22 09:28:16 2020 (r552955)
+++ head/mail/ssmtp/Makefile Thu Oct 22 09:36:12 2020 (r552956)
@@ -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}
Modified: head/mail/ssmtp/files/pkg-message.in
==============================================================================
--- head/mail/ssmtp/files/pkg-message.in Thu Oct 22 09:28:16 2020 (r552955)
+++ head/mail/ssmtp/files/pkg-message.in Thu Oct 22 09:36:12 2020 (r552956)
@@ -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
}
]
Modified: head/mail/ssmtp/pkg-plist
==============================================================================
--- head/mail/ssmtp/pkg-plist Thu Oct 22 09:28:16 2020 (r552955)
+++ head/mail/ssmtp/pkg-plist Thu Oct 22 09:36:12 2020 (r552956)
@@ -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
+ at sample(,ssmtp,640) etc/ssmtp/revaliases.sample
+ at 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
More information about the svn-ports-all
mailing list