Index: head/mail/opensmtpd/Makefile =================================================================== --- head/mail/opensmtpd/Makefile (revision 415926) +++ head/mail/opensmtpd/Makefile (revision 415927) @@ -1,74 +1,77 @@ # Created by: Ashish SHUKLA # $FreeBSD$ PORTNAME= opensmtpd PORTVERSION= 5.9.2p1 PORTEPOCH= 1 +PORTREVISION= 1 CATEGORIES= mail MASTER_SITES= http://www.opensmtpd.org/archives/ \ http://distfiles.pirateparty.in/ashish/ MAINTAINER= ashish@FreeBSD.org COMMENT= Security- and simplicity-focused SMTP server from OpenBSD LICENSE= ISCL LICENSE_FILE= ${WRKSRC}/LICENSE LIB_DEPENDS= libevent.so:devel/libevent2 OPTIONS_DEFINE= CA_BUNDLE LIBASRDEVEL MAILERCONF PAM SSL_PORT TABLE_DB OPTIONS_DEFAULT= CA_BUNDLE PAM TABLE_DB CA_BUNDLE_DESC= Install CA bundle for SSL LIBASRDEVEL_DESC= Use development version of libasr MAILERCONF_DESC= Activate OpenSMTPD in mailer.conf(5) SSL_PORT_DESC= SSL/TLS support via OpenSSL/LibreSSL from port TABLE_DB_DESC= Build table-db plugin (aliases) USES= cpe libtool USE_OPENSSL= yes GNU_CONFIGURE= yes CPE_VENDOR= openbsd USE_RC_SUBR= smtpd SUB_FILES= pkg-install pkg-deinstall pkg-message CONFLICTS_INSTALL= postfix-[0-9]* sendmail-[0-9]* opensmtpd-devel-[0-9]* USERS= _smtpd _smtpq GROUPS= _smtpd _smtpq OPTIONS_SUB= yes CA_BUNDLE_CONFIGURE_WITH= path-CAfile=${LOCALBASE}/share/certs/ca-root-nss.crt CA_BUNDLE_RUN_DEPENDS= ${LOCALBASE}/share/certs/ca-root-nss.crt:security/ca_root_nss LIBASRDEVEL_LIB_DEPENDS_OFF= libasr.so:dns/libasr LIBASRDEVEL_LIB_DEPENDS= libasr.so:dns/libasr-devel PAM_CONFIGURE_WITH= auth-pam=smtpd SSL_PORT_VARS= with_openssl_port=yes TABLE_DB_CONFIGURE_WITH= table-db .include .if ${OPSYS} == FreeBSD && ${OSVERSION} <= 1000015 WITH_OPENSSL_PORT= yes .endif .include CONFIGURE_ARGS+= --with-libasr=${LOCALBASE} \ --with-libevent=${LOCALBASE} \ --with-libssl=${OPENSSLBASE} \ --sysconfdir=${PREFIX}/etc/mail/ post-patch: ${REINPLACE_CMD} -e '/chmod 2555/d' ${WRKSRC}/mk/smtpctl/Makefile.in +.if ${PORT_OPTIONS:MTABLE_DB} post-install: @${LN} -sf ${PREFIX}/sbin/smtpctl ${STAGEDIR}${PREFIX}/libexec/opensmtpd/makemap +.endif .include Index: head/mail/opensmtpd/files/smtpd.in =================================================================== --- head/mail/opensmtpd/files/smtpd.in (revision 415926) +++ head/mail/opensmtpd/files/smtpd.in (revision 415927) @@ -1,56 +1,54 @@ #!/bin/sh # # $FreeBSD$ # # PROVIDE: smtpd mail # REQUIRE: LOGIN # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf to enable smtpd: # smtpd_enable (bool): Set it to "YES" to enable OpenSMTPD. # Default is "NO". # smtpd_config (string): Path to OpenSMTPD configuration file. # Default is "%%PREFIX%%/etc/mail/smtpd.conf" # smtpd_flags (string): Additional flags to be passed to smtpd. # Default is "". # # . /etc/rc.subr -check_process() -{ - /bin/pgrep -j none -f "${smtpd_procname}" -} - name="smtpd" rcvar=smtpd_enable start_precmd="smtpd_precmd" restart_precmd="smtpd_checkconfig" configtest_cmd="smtpd_checkconfig" extra_commands="configtest" load_rc_config $name : ${smtpd_enable:="NO"} -: ${smtpd_config:="%%PREFIX%%/etc/mail/smtpd.conf"} -: ${smtpd_procname:="%%PREFIX%%/sbin/smtpd"} +: ${smtpd_config:="%%PREFIX%%/etc/mail/${name}.conf"} +: ${smtpd_procname:="%%PREFIX%%/sbin/${name}"} : ${smtpd_flags:=""} command=${smtpd_procname} +command_args="-f ${smtpd_config} ${command_args}" +required_files="${smtpd_config}" procname=${smtpd_procname} +pidfile="/var/run/${name}.pid" smtpd_checkconfig() { echo "Performing sanity check on smtpd configuration:" - eval ${command} ${smtpd_flags} -n + eval ${command} ${command_args} ${smtpd_flags} -n } smtpd_precmd() { smtpd_checkconfig } run_rc_command "$1" Index: head/mail/opensmtpd-devel/Makefile =================================================================== --- head/mail/opensmtpd-devel/Makefile (revision 415926) +++ head/mail/opensmtpd-devel/Makefile (revision 415927) @@ -1,75 +1,76 @@ # Created by: Ashish SHUKLA # $FreeBSD$ PORTNAME= opensmtpd PORTVERSION= 201602131907 DISTVERSIONSUFFIX= p1 PORTEPOCH= 1 +PORTREVISION= 1 CATEGORIES= mail MASTER_SITES= http://www.opensmtpd.org/archives/ \ http://distfiles.pirateparty.in/ashish/ PKGNAMESUFFIX= -devel MAINTAINER= ashish@FreeBSD.org COMMENT= Security- and simplicity-focused SMTP server from OpenBSD LICENSE= ISCL LICENSE_FILE= ${WRKSRC}/LICENSE LIB_DEPENDS= libevent.so:devel/libevent2 OPTIONS_DEFINE= CA_BUNDLE LIBASR MAILERCONF PAM SSL_PORT OPTIONS_DEFAULT= CA_BUNDLE PAM CA_BUNDLE_DESC= Install CA bundle for SSL LIBASR_DESC= Use stable version of libasr MAILERCONF_DESC= Activate OpenSMTPD in mailer.conf(5) SSL_PORT_DESC= SSL/TLS support via OpenSSL/LibreSSL from port USES= cpe libtool USE_OPENSSL= yes GNU_CONFIGURE= yes CONFIGURE_ARGS= --with-table-db \ --sysconfdir=${PREFIX}/etc/mail/ \ --with-libasr=${LOCALBASE} \ --with-libevent=${LOCALBASE} \ --with-libssl=${OPENSSLBASE} \ --with-group-queue=${GROUPS} USE_RC_SUBR= smtpd SUB_FILES= pkg-install pkg-deinstall CPE_VENDOR= openbsd CONFLICTS_INSTALL= postfix-[0-9]* sendmail-[0-9]* opensmtpd-[0-9]* USERS= _smtpd _smtpq GROUPS= _smtpd PLIST_SUB+= SMTPQ_GROUP=${GROUPS} OPTIONS_SUB= yes LIBASR_LIB_DEPENDS_OFF= libasr.so:dns/libasr-devel LIBASR_LIB_DEPENDS= libasr.so:dns/libasr CA_BUNDLE_CONFIGURE_WITH= path-CAfile=${LOCALBASE}/share/certs/ca-root-nss.crt CA_BUNDLE_RUN_DEPENDS= ${LOCALBASE}/share/certs/ca-root-nss.crt:security/ca_root_nss PAM_CONFIGURE_WITH= auth-pam=smtpd .include .if ${OPSYS} == FreeBSD && ${OSVERSION} < 1000000 && ! ${PORT_OPTIONS:MSSL_PORT} WITH_OPENSSL_PORT= yes .endif .if ${PORT_OPTIONS:MSSL_PORT} WITH_OPENSSL_PORT= yes .endif post-install: @${LN} -sf ${PREFIX}/sbin/smtpctl ${STAGEDIR}${PREFIX}/libexec/opensmtpd/makemap .include Index: head/mail/opensmtpd-devel/files/smtpd.in =================================================================== --- head/mail/opensmtpd-devel/files/smtpd.in (revision 415926) +++ head/mail/opensmtpd-devel/files/smtpd.in (revision 415927) @@ -1,56 +1,54 @@ #!/bin/sh # # $FreeBSD$ # # PROVIDE: smtpd mail # REQUIRE: LOGIN # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf to enable smtpd: # smtpd_enable (bool): Set it to "YES" to enable OpenSMTPD. # Default is "NO". # smtpd_config (string): Path to OpenSMTPD configuration file. # Default is "%%PREFIX%%/etc/mail/smtpd.conf" # smtpd_flags (string): Additional flags to be passed to smtpd. # Default is "". # # . /etc/rc.subr -check_process() -{ - /bin/pgrep -j none -f "^$smtpd_procname\$" -} - name="smtpd" rcvar=smtpd_enable start_precmd="smtpd_precmd" restart_precmd="smtpd_checkconfig" configtest_cmd="smtpd_checkconfig" extra_commands="configtest" load_rc_config $name : ${smtpd_enable:="NO"} -: ${smtpd_config:="%%PREFIX%%/etc/mail/smtpd.conf"} -: ${smtpd_procname:="%%PREFIX%%/sbin/smtpd"} +: ${smtpd_config:="%%PREFIX%%/etc/mail/${name}.conf"} +: ${smtpd_procname:="%%PREFIX%%/sbin/${name}"} : ${smtpd_flags:=""} command=${smtpd_procname} +command_args="-f ${smtpd_config} ${command_args}" +required_files="${smtpd_config}" procname=${smtpd_procname} +pidfile="/var/run/${name}.pid" smtpd_checkconfig() { echo "Performing sanity check on smtpd configuration:" - eval ${command} ${smtpd_flags} -n + eval ${command} ${command_args} ${smtpd_flags} -n } smtpd_precmd() { smtpd_checkconfig } run_rc_command "$1"