Index: head/mail/dovecot/Makefile =================================================================== --- head/mail/dovecot/Makefile (revision 472343) +++ head/mail/dovecot/Makefile (revision 472344) @@ -1,162 +1,162 @@ # Created by: Nagy, Attila # $FreeBSD$ ###################################################################### # Anytime PORTVERSION changes please bump PORTREVISION of # # mail/dovecot-pigeonhole. See ports/146029 for an explanation. # ###################################################################### PORTNAME= dovecot PORTVERSION= 2.3.1 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= mail ipv6 MASTER_SITES= https://www.dovecot.org/releases/2.3/ MAINTAINER= ler@FreeBSD.org COMMENT= Secure, fast and powerful IMAP and POP3 server LICENSE= LGPL21 MIT LICENSE_COMB= dual LICENSE_FILE_LGPL21= ${WRKSRC}/COPYING.LGPL LICENSE_FILE_MIT= ${WRKSRC}/COPYING.MIT USES= cpe iconv libtool pkgconfig ssl USE_RC_SUBR= dovecot GNU_CONFIGURE= yes CONFIGURE_ARGS= --localstatedir=/var \ --with-statedir=/var/db/dovecot \ --without-shadow \ --with-ssl=openssl \ --with-docs USE_LDCONFIG= ${PREFIX}/lib/dovecot INSTALL_TARGET= install-strip USERS= dovecot dovenull GROUPS= ${USERS} CONFLICTS_INSTALL= dovecot22 OPTIONS_DEFINE= LIBWRAP LUA LZ4 VPOPMAIL DOCS EXAMPLES OPTIONS_DEFAULT=GSSAPI_NONE LIBWRAP OPTIONS_SUB= yes OPTIONS_GROUP= DB FTS OPTIONS_GROUP_DB= CDB LDAP MYSQL PGSQL SQLITE OPTIONS_GROUP_FTS= ICU LUCENE SOLR TEXTCAT OPTIONS_SINGLE= GSSAPI OPTIONS_SINGLE_GSSAPI= GSSAPI_NONE GSSAPI_BASE GSSAPI_HEIMDAL GSSAPI_MIT LZ4_DESC= LZ4 compression support VPOPMAIL_DESC= vpopmail support DB_DESC= Database support CDB_DESC= CDB database support FTS_DESC= Full text search plugins ICU_DESC= Use libicu for FTS unicode normalization LUCENE_DESC= CLucene FTS support SOLR_DESC= Solr FTS support TEXTCAT_DESC= Libtextcat FTS support GSSAPI_NONE_DESC= Build without GSSAPI support GSSAPI_BASE_DESC= Use GSSAPI from base GSSAPI_HEIMDAL_DESC= Use Heimdal GSSAPI from security/heimdal GSSAPI_MIT_DESC= Use MIT GSSAPI from security/krb5 # General options LIBWRAP_CONFIGURE_WITH= libwrap LUA_CONFIGURE_WITH= lua LUA_USES= lua LZ4_CONFIGURE_WITH= lz4 LZ4_LIB_DEPENDS= liblz4.so:archivers/liblz4 VPOPMAIL_BUILD_DEPENDS= vpopmail>=0:mail/vpopmail VPOPMAIL_CONFIGURE_WITH=vpopmail # Databases CDB_CONFIGURE_WITH= cdb CDB_LIB_DEPENDS= libcdb.so:databases/tinycdb LDAP_USE= OPENLDAP=yes LDAP_CONFIGURE_WITH= ldap MYSQL_USES= mysql MYSQL_CONFIGURE_WITH= mysql PGSQL_USES= pgsql PGSQL_CONFIGURE_WITH= pgsql SQLITE_USES= sqlite SQLITE_CONFIGURE_WITH= sqlite # FTS ICU_CONFIGURE_WITH= icu ICU_LIB_DEPENDS= libicui18n.so:devel/icu ICU_USES= pkgconfig LUCENE_CONFIGURE_WITH= lucene LUCENE_LIB_DEPENDS= libclucene-core.so:textproc/clucene SOLR_CONFIGURE_WITH= solr SOLR_LIB_DEPENDS= libcurl.so:ftp/curl \ libexpat.so:textproc/expat2 TEXTCAT_CONFIGURE_WITH= textcat TEXTCAT_LIB_DEPENDS= libtextcat.so:textproc/libtextcat # GSSAPI GSSAPI_NONE_CONFIGURE_ON= --without-gssapi GSSAPI_NONE_CONFIGURE_OFF= --with-gssapi ${GSSAPI_CONFIGURE_ARGS} GSSAPI_BASE_USES= gssapi GSSAPI_HEIMDAL_USES= gssapi:heimdal GSSAPI_MIT_USES= gssapi:mit DOCS= AUTHORS COPYING INSTALL NEWS TODO README PORTDOCS= * PORTEXAMPLES= * # Default requirement for dovecot rc script _REQUIRE= LOGIN LDAP_VARS= _REQUIRE+=slapd MYSQL_VARS= _REQUIRE+=mysql PGSQL_VARS= _REQUIRE+=postgresql SUB_LIST+= REQUIRE="${_REQUIRE}" SUB_FILES+= pkg-message CPPFLAGS+= -I${LOCALBASE}/include -I${OPENSSLINC} LDFLAGS+= -L${LOCALBASE}/lib -L${OPENSSLLIB} post-patch: @${REINPLACE_CMD} -e 's,/etc/dovecot,${PREFIX}/etc/dovecot,g; \ s,sysconfdir=/etc,sysconfdir=${PREFIX}/etc,g' \ ${WRKSRC}/doc/example-config/*.conf ${WRKSRC}/doc/example-config/conf.d/* @${REINPLACE_CMD} -e '/^LIBS =/s/$$/ @LTLIBICONV@/' \ ${WRKSRC}/src/lib-mail/Makefile.in # Install the sample config files into ETCDIR/example-config/ @${REINPLACE_CMD} -e '/^exampledir =/s|\$$(docdir)|${ETCDIR}|' \ ${WRKSRC}/doc/example-config/Makefile.in \ ${WRKSRC}/doc/example-config/conf.d/Makefile.in @${REINPLACE_CMD} -e 's|/usr/bin|${LOCALBASE}/bin|' \ ${WRKSRC}/src/plugins/fts/decode2text.sh post-patch-LUA-on: @${REINPLACE_CMD} -e '/^libdovecot_lua_la_DEPENDENCIES =/ s|LUA_LIBS|true|' \ ${WRKSRC}/src/lib-lua/Makefile.in post-install: @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} ${MV} ${STAGEDIR}${DOCSDIR}/dovecot-openssl.cnf ${STAGEDIR}${EXAMPLESDIR} ${MV} ${STAGEDIR}${DOCSDIR}/mkcert.sh ${STAGEDIR}${EXAMPLESDIR} post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} (cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${STAGEDIR}${DOCSDIR}) .include Index: head/mail/dovecot/files/dovecot.in =================================================================== --- head/mail/dovecot/files/dovecot.in (revision 472343) +++ head/mail/dovecot/files/dovecot.in (revision 472344) @@ -1,71 +1,72 @@ #!/bin/sh # # $FreeBSD$ # # PROVIDE: dovecot # REQUIRE: %%REQUIRE%% +# BEFORE: mail # KEYWORD: shutdown # dovecot_enable (bool): Set it to YES to enable dovecot # Default: NO # dovecot_config (str): Path to dovecot.conf # Default: %%ETCDIR%%/dovecot.conf # Set it to a space-separated list to start # multiple dovecot instances # dovecot_flags (str): Extra flags to pass to dovecot # Default: empty # Define dovecot_* variables in one of these files: # /etc/rc.conf # /etc/rc.conf.local # /etc/rc.conf.d/dovecot . /etc/rc.subr name=dovecot rcvar=dovecot_enable # read configuration and set defaults load_rc_config ${name} : ${dovecot_enable:="NO"} : ${dovecot_config:="%%ETCDIR%%/${name}.conf"} command="%%PREFIX%%/sbin/${name}" start_precmd="start_precmd" stop_postcmd="stop_postcmd" restart_cmd="restart_cmd" extra_commands="reload" start_precmd() { # Ensure runtime directory exists with correct permissions /usr/bin/install -o root -g wheel -m 0755 -d ${base_dir} } stop_postcmd() { # Cleanup runtime directory. The dovecot.conf link has to stay. /usr/bin/find ${base_dir} ! -type l -delete } restart_cmd() { # Overriding makes rc.subr run this once for each instance run_rc_command stop run_rc_command start } # To start multiple instances of dovecot set dovecot_config to # a space separated list of configuration files. for config in ${dovecot_config}; do required_files="${config}" command_args="-c ${config}" if [ -s ${config} ]; then base_dir=$(${command} ${command_args} -a | /usr/bin/awk -F '= ' '/^base_dir =/ { print $2 }') pidfile="${base_dir}/master.pid" else echo "==Error==" echo "Config file ${config} does not exist. If this is" echo "a new installation, please create the config files as outlined in" echo " # pkg info -D dovecot" fi run_rc_command "$1" done Index: head/mail/dovecot22/Makefile =================================================================== --- head/mail/dovecot22/Makefile (revision 472343) +++ head/mail/dovecot22/Makefile (revision 472344) @@ -1,160 +1,161 @@ # Created by: Nagy, Attila # $FreeBSD$ ###################################################################### # Anytime PORTVERSION changes please bump PORTREVISION of # # mail/dovecot-pigeonhole. See ports/146029 for an explanation. # # # # Please be careful when updating this port as changes to this port # # can break mail/dovecot-pigeonhole. In order to ensure the least # # amount of breakage possible please consult the maintainer of that # # port before updating this one. # ###################################################################### PORTNAME= dovecot PORTVERSION= 2.2.36 +PORTREVISION= 1 CATEGORIES= mail ipv6 MASTER_SITES= https://www.dovecot.org/releases/2.2/ PKGNAMESUFFIX= 22 MAINTAINER= ler@FreeBSD.org COMMENT= Secure, fast and powerful IMAP and POP3 server LICENSE= LGPL21 MIT LICENSE_COMB= dual LICENSE_FILE_LGPL21= ${WRKSRC}/COPYING.LGPL LICENSE_FILE_MIT= ${WRKSRC}/COPYING.MIT USES= cpe iconv libtool ssl USE_RC_SUBR= dovecot GNU_CONFIGURE= yes CONFIGURE_ARGS= --localstatedir=/var \ --with-statedir=/var/db/dovecot \ --without-shadow \ --with-ssl=openssl \ --with-docs USE_LDCONFIG= ${PREFIX}/lib/dovecot INSTALL_TARGET= install-strip USERS= dovecot dovenull GROUPS= ${USERS} CONFLICTS_INSTALL= dovecot OPTIONS_DEFINE= LIBWRAP LZ4 VPOPMAIL DOCS EXAMPLES OPTIONS_DEFAULT=GSSAPI_NONE LIBWRAP OPTIONS_SUB= yes OPTIONS_GROUP= DB FTS OPTIONS_GROUP_DB= CDB LDAP MYSQL PGSQL SQLITE OPTIONS_GROUP_FTS= ICU LUCENE SOLR TEXTCAT OPTIONS_SINGLE= GSSAPI OPTIONS_SINGLE_GSSAPI= GSSAPI_NONE GSSAPI_BASE GSSAPI_HEIMDAL GSSAPI_MIT LZ4_DESC= LZ4 compression support VPOPMAIL_DESC= vpopmail support DB_DESC= Database support CDB_DESC= CDB database support FTS_DESC= Full text search plugins ICU_DESC= Use libicu for FTS unicode normalization LUCENE_DESC= CLucene FTS support SOLR_DESC= Solr FTS support TEXTCAT_DESC= Libtextcat FTS support GSSAPI_NONE_DESC= Build without GSSAPI support GSSAPI_BASE_DESC= Use GSSAPI from base GSSAPI_HEIMDAL_DESC= Use Heimdal GSSAPI from security/heimdal GSSAPI_MIT_DESC= Use MIT GSSAPI from security/krb5 # General options LIBWRAP_CONFIGURE_WITH= libwrap LZ4_CONFIGURE_WITH= lz4 LZ4_LIB_DEPENDS= liblz4.so:archivers/liblz4 VPOPMAIL_BUILD_DEPENDS= vpopmail>=0:mail/vpopmail VPOPMAIL_CONFIGURE_WITH=vpopmail # Databases CDB_CONFIGURE_WITH= cdb CDB_LIB_DEPENDS= libcdb.so:databases/tinycdb LDAP_USE= OPENLDAP=yes LDAP_CONFIGURE_WITH= ldap MYSQL_USES= mysql MYSQL_CONFIGURE_WITH= mysql PGSQL_USES= pgsql PGSQL_CONFIGURE_WITH= pgsql SQLITE_USES= sqlite SQLITE_CONFIGURE_WITH= sqlite # FTS ICU_CONFIGURE_WITH= icu ICU_LIB_DEPENDS= libicui18n.so:devel/icu ICU_USES= pkgconfig LUCENE_CONFIGURE_WITH= lucene LUCENE_LIB_DEPENDS= libclucene-core.so:textproc/clucene SOLR_CONFIGURE_WITH= solr SOLR_LIB_DEPENDS= libcurl.so:ftp/curl \ libexpat.so:textproc/expat2 TEXTCAT_CONFIGURE_WITH= textcat TEXTCAT_LIB_DEPENDS= libtextcat.so:textproc/libtextcat # GSSAPI GSSAPI_NONE_CONFIGURE_ON= --without-gssapi GSSAPI_NONE_CONFIGURE_OFF= --with-gssapi ${GSSAPI_CONFIGURE_ARGS} GSSAPI_BASE_USES= gssapi GSSAPI_HEIMDAL_USES= gssapi:heimdal GSSAPI_MIT_USES= gssapi:mit DOCS= AUTHORS COPYING INSTALL NEWS TODO README PORTDOCS= * PORTEXAMPLES= * # Default requirement for dovecot rc script _REQUIRE= LOGIN LDAP_VARS= _REQUIRE+=slapd MYSQL_VARS= _REQUIRE+=mysql PGSQL_VARS= _REQUIRE+=postgresql SUB_LIST+= REQUIRE="${_REQUIRE}" SUB_FILES+= pkg-message CPPFLAGS+= -I${LOCALBASE}/include -I${OPENSSLINC} LDFLAGS+= -L${LOCALBASE}/lib -L${OPENSSLLIB} post-patch: @${REINPLACE_CMD} -e 's,/etc/dovecot,${PREFIX}/etc/dovecot,g; \ s,sysconfdir=/etc,sysconfdir=${PREFIX}/etc,g' \ ${WRKSRC}/doc/example-config/*.conf ${WRKSRC}/doc/example-config/conf.d/* @${REINPLACE_CMD} -e '/^LIBS =/s/$$/ @LTLIBICONV@/' \ ${WRKSRC}/src/lib-mail/Makefile.in # Install the sample config files into ETCDIR/example-config/ @${REINPLACE_CMD} -e '/^exampledir =/s|\$$(docdir)|${ETCDIR}|' \ ${WRKSRC}/doc/example-config/Makefile.in \ ${WRKSRC}/doc/example-config/conf.d/Makefile.in @${REINPLACE_CMD} -e 's|/usr/bin|${LOCALBASE}/bin|' \ ${WRKSRC}/src/plugins/fts/decode2text.sh post-install: @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} ${MV} ${STAGEDIR}${DOCSDIR}/dovecot-openssl.cnf ${STAGEDIR}${EXAMPLESDIR} ${MV} ${STAGEDIR}${DOCSDIR}/mkcert.sh ${STAGEDIR}${EXAMPLESDIR} post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} (cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${STAGEDIR}${DOCSDIR}) .include Index: head/mail/dovecot22/files/dovecot.in =================================================================== --- head/mail/dovecot22/files/dovecot.in (revision 472343) +++ head/mail/dovecot22/files/dovecot.in (revision 472344) @@ -1,74 +1,75 @@ #!/bin/sh # # $FreeBSD$ # # PROVIDE: dovecot # REQUIRE: %%REQUIRE%% +# BEFORE: mail # KEYWORD: shutdown # dovecot_enable (bool): Set it to YES to enable dovecot # Default: NO # dovecot_config (str): Path to dovecot.conf # Default: %%ETCDIR%%/dovecot.conf # Set it to a space-separated list to start # multiple dovecot instances # dovecot_flags (str): Extra flags to pass to dovecot # Default: empty # Define dovecot_* variables in one of these files: # /etc/rc.conf # /etc/rc.conf.local # /etc/rc.conf.d/dovecot . /etc/rc.subr name=dovecot rcvar=dovecot_enable # read configuration and set defaults load_rc_config ${name} : ${dovecot_enable:="NO"} : ${dovecot_config:="%%ETCDIR%%/${name}.conf"} command="%%PREFIX%%/sbin/${name}" start_precmd="start_precmd" stop_postcmd="stop_postcmd" restart_cmd="restart_cmd" extra_commands="reload" start_precmd() { # Ensure runtime directories exist with correct permissions local login_user login_gid login_user=$(${command} ${command_args} -a | /usr/bin/awk -F '= ' '/^default_login_user =/ { print $2 }') login_gid=$(/usr/sbin/pw usershow -n "${login_user}" 2>/dev/null | /usr/bin/cut -d: -f4) /usr/bin/install -o root -g wheel -m 0755 -d ${base_dir} } stop_postcmd() { # Cleanup runtime directories rm -rf ${base_dir} 2>/dev/null } restart_cmd() { # Overriding makes rc.subr run this once for each instance run_rc_command stop run_rc_command start } # To start multiple instances of dovecot set dovecot_config to # a space separated list of configuration files. for config in ${dovecot_config}; do required_files="${config}" command_args="-c ${config}" if [ -s ${config} ]; then base_dir=$(${command} ${command_args} -a | /usr/bin/awk -F '= ' '/^base_dir =/ { print $2 }') pidfile="${base_dir}/master.pid" else echo "==Error==" echo "Config file ${config} does not exist. If this is" echo "a new installation, please create the config files as outlined in" echo " # pkg info -D dovecot2" fi run_rc_command "$1" done