1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-26 09:46:09 +00:00

- add stage support

- bump PORTREVISION
- add USES=libtool:keepla
- sort pkg-plist
- use USER/GROUP support from framework (remove pkg-install)

PR:		ports/188868
Submitted by:	ohauer
Approved by:	maintainer timeout (4 weeks)
This commit is contained in:
Olli Hauer 2014-05-18 17:05:12 +00:00
parent f0e50bc9c8
commit f5e93ef638
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=354439
4 changed files with 113 additions and 316 deletions

View File

@ -3,16 +3,18 @@
PORTNAME= dovecot
PORTVERSION= 1.2.17
PORTREVISION= 1
CATEGORIES= mail ipv6
MASTER_SITES= http://www.dovecot.org/releases/${DOVECOTVERSION}/ \
http://www.rename-it.nl/dovecot/${DOVECOTVERSION}/
MASTER_SITES= http://www.dovecot.org/releases/${PORTVERSION:R}/ \
http://www.rename-it.nl/dovecot/${PORTVERSION:R}/
MAINTAINER= yds@CoolRat.org
COMMENT= Secure and compact IMAP and POP3 servers
CONFLICTS= dovecot2-*
LICENSE= LGPL21 MIT
LICENSE_COMB= dual
DOVECOTVERSION= 1.2
CONFLICTS= dovecot2-2.[0-9].*
######################################################################
# Anytime PORTVERSION changes please bump PORTREVISIONs of #
@ -26,48 +28,85 @@ DOVECOTVERSION= 1.2
# consult the maintainer of those ports before updating this one. #
######################################################################
USES= iconv
USES= iconv libtool:keepla
USE_RC_SUBR= dovecot
GNU_CONFIGURE= yes
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ARGS= --localstatedir=/var \
--with-statedir=/var/db/dovecot \
--without-shadow
CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ARGS= --localstatedir=/var \
--with-statedir=/var/db/dovecot \
--without-shadow
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
USE_LDCONFIG= ${PREFIX}/lib/dovecot \
${PREFIX}/lib/dovecot/imap \
${PREFIX}/lib/dovecot/pop3 \
${PREFIX}/lib/dovecot/lda
.if defined(NOPORTDOCS)
CONFIGURE_ARGS+= --without-docs
.else
DOCS= AUTHORS COPYING COPYING.LGPL COPYING.MIT INSTALL NEWS TODO README
PORTDOCS= *.txt wiki ${DOCS}
.endif
DOVECOT_UID?= 143
DOVECOT_GID?= 143
USERS= dovecot
GROUPS= ${USERS}
PROTOCOLS= imap pop3
# Default requirement for dovecot rc script
_REQUIRE= LOGIN
OPTIONS_DEFINE= KQUEUE SSL MANAGESIEVE GSSAPI VPOPMAIL BDB LDAP PGSQL MYSQL SQLITE
OPTIONS_DEFAULT= KQUEUE SSL MANAGESIEVE
KQUEUE_DESC= kqueue(2) support
MANAGESIEVE_DESC= ManageSieve support
VPOPMAIL_DESC= VPopMail support
NO_STAGE= yes
.include <bsd.port.pre.mk>
OPTIONS_SUB= yes
BDB_CFLAGS= -I${BDB_INCLUDE_DIR} -L${BDB_LIB_DIR}
BDB_CONFIGURE_WITH= db
BDB_USE= BDB=48+
DOCS_CONFIGURE_WITH= docs
GSSAPI_CONFIGURE_WITH= gssapi
GSSAPI_LDFLAGS= -lgssapi_krb5
KQUEUE_CONFIGURE_ON= --with-ioloop=kqueue
LDAP_CONFIGURE_WITH= ldap
LDAP_USE= OPENLDAP=yes
MYSQL_CONFIGURE_WITH= mysql
MYSQL_USE= MYSQL=yes
PGSQL_CONFIGURE_WITH= pgsql
PGSQL_USE= PGSQL=yes
SQLITE_CONFIGURE_WITH= sqlite
SQLITE_USE= SQLITE=3
SSL_CONFIGURE_OFF= --without-ssl
SSL_CONFIGURE_ON= --with-ssl=openssl
VPOPMAIL_BUILD_DEPENDS= ${LOCALBASE}/vpopmail/bin/vchkpw:${PORTSDIR}/mail/vpopmail
VPOPMAIL_CONFIGURE_WITH=vpopmail
.include <bsd.port.options.mk>
.if ${ARCH} == "arm"
BROKEN= Does not build on arm
.endif
# Default requirement for dovecot rc script
_REQUIRE= LOGIN
DOCS= AUTHORS COPYING COPYING.LGPL COPYING.MIT INSTALL NEWS TODO README
PORTDOCS= *
.if ${PORT_OPTIONS:MSSL}
PROTOCOLS+= imaps pop3s
.endif
.if ${PORT_OPTIONS:MLDAP}
_REQUIRE+= slapd
.endif
.if ${PORT_OPTIONS:MPGSQL}
_REQUIRE+= postgresql
.endif
.if ${PORT_OPTIONS:MMYSQL}
_REQUIRE+= mysql
.endif
SUB_LIST+= REQUIRE="${_REQUIRE}"
SUB_FILES+= pkg-deinstall pkg-message
# sed script for dovecot.conf
REINPLACE= s!%%PROTOCOLS%%!${PROTOCOLS}!g;\
@ -78,22 +117,10 @@ REINPLACE= s!%%PROTOCOLS%%!${PROTOCOLS}!g;\
s![[:<:]]doc/(dovecot-[^-]+)-example.conf[[:>:]]!${EXAMPLESDIR}/\1.conf!g;\
s!\#sendmail_path = /usr/.*!sendmail_path = /usr/sbin/sendmail!g;
## kqueue(2) support
#
.if ${PORT_OPTIONS:MKQUEUE}
CONFIGURE_ARGS+= --with-ioloop=kqueue
.if ${PORT_OPTIONS:MBDB}
REINPLACE+= s!^\#(dict_db_config)!\1!;
.endif
## SSL support
#
.if ${PORT_OPTIONS:MSSL}
PROTOCOLS+= imaps pop3s
.else
CONFIGURE_ARGS+= --without-ssl
.endif
## ManageSieve support
#
.if ${PORT_OPTIONS:MMANAGESIEVE}
MANAGESIEVEVERSION!= ${MAKE} -C ${.CURDIR}/../dovecot-managesieve -V PORTVERSION
PATCH_SITES!= ${MAKE} -C ${.CURDIR}/../dovecot-managesieve -V MASTER_SITES
@ -103,87 +130,12 @@ PROTOCOLS+= managesieve
DOCS+= README.managesieve
.endif
## GSSAPI support
#
.if ${PORT_OPTIONS:MGSSAPI}
CONFIGURE_ARGS+= --with-gssapi
LDFLAGS+= -lgssapi_krb5
.if ${PORT_OPTIONS:MPGSQL} || ${PORT_OPTIONS:MMYSQL} || ${PORT_OPTIONS:MSQLITE}
PLIST_SUB+= SQL=""
.else
CONFIGURE_ARGS+= --without-gssapi
PLIST_SUB+= SQL="@comment "
.endif
## VPopMail Support
#
.if ${PORT_OPTIONS:MVPOPMAIL}
VPOPMAIL= ${LOCALBASE}/vpopmail/bin/vchkpw
BUILD_DEPENDS+= ${VPOPMAIL}:${PORTSDIR}/mail/vpopmail
CONFIGURE_ARGS+= --with-vpopmail
.else
CONFIGURE_ARGS+= --without-vpopmail
.endif
## BDB Support
#
.if ${PORT_OPTIONS:MBDB}
USE_BDB= 42+
CONFIGURE_ARGS+= --with-db
CFLAGS+= -I${BDB_INCLUDE_DIR} -L${BDB_LIB_DIR}
PLIST_SUB+= BDB=""
REINPLACE+= s!^\#(dict_db_config)!\1!;
.else
PLIST_SUB+= BDB="@comment "
.endif
## OpenLDAP Support
#
.if ${PORT_OPTIONS:MLDAP}
USE_OPENLDAP= yes
CONFIGURE_ARGS+= --with-ldap
PLIST_SUB+= LDAP=""
_REQUIRE+= slapd
.else
CONFIGURE_ARGS+= --without-ldap
PLIST_SUB+= LDAP="@comment "
.endif
## PostgreSQL Support
#
.if ${PORT_OPTIONS:MPGSQL}
USE_PGSQL= yes
CONFIGURE_ARGS+= --with-pgsql
PLIST_SUB+= SQL=""
_REQUIRE+= postgresql
.else
CONFIGURE_ARGS+= --without-pgsql
PLIST_SUB+= SQL="@comment "
.endif
## MySQL Support
#
.if ${PORT_OPTIONS:MMYSQL}
USE_MYSQL= yes
CONFIGURE_ARGS+= --with-mysql
PLIST_SUB+= SQL=""
_REQUIRE+= mysql
.else
CONFIGURE_ARGS+= --without-mysql
PLIST_SUB+= SQL="@comment "
.endif
## SQLite Support
#
.if ${PORT_OPTIONS:MSQLITE}
USE_SQLITE= 3
CONFIGURE_ARGS+= --with-sqlite
PLIST_SUB+= SQL=""
.else
CONFIGURE_ARGS+= --without-sqlite
PLIST_SUB+= SQL="@comment "
.endif
SUB_LIST+= REQUIRE="${_REQUIRE}" DOVECOT_UID=${DOVECOT_UID} DOVECOT_GID=${DOVECOT_GID}
SUB_FILES+= pkg-install pkg-deinstall pkg-message
post-patch:
@${REINPLACE_CMD} -E -e '${REINPLACE}' \
${WRKSRC}/dovecot-example.conf
@ -197,27 +149,18 @@ post-patch:
@${LN} -f ${WRKSRC}/doc/dovecot-ldap-example.conf ${WRKSRC}/doc/dovecot-ldap.conf
@${LN} -f ${WRKSRC}/doc/dovecot-sql-example.conf ${WRKSRC}/doc/dovecot-sql.conf
pre-su-install:
@${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
post-install:
${INSTALL_DATA} ${WRKSRC}/dovecot.conf ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/doc/dovecot-db.conf ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/doc/dovecot-dict-sql.conf ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/doc/dovecot-ldap.conf ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/doc/dovecot-sql.conf ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/doc/dovecot-openssl.cnf ${EXAMPLESDIR}
${INSTALL_SCRIPT} ${WRKSRC}/doc/mkcert.sh ${EXAMPLESDIR}
@${GREP} '^@exec ' ${TMPPLIST} \
| ${SED} -e 's:^@exec ::; s:%D:${PREFIX}:g;' \
> ${WRKDIR}/.PLIST.exec \
&& ${SH} ${WRKDIR}/.PLIST.exec
.if ${PORT_OPTIONS:MDOCS}
.for f in ${DOCS}
${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
.endfor
.endif
@${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${CAT} ${PKGMESSAGE}
${FIND} ${STAGEDIR}${PREFIX}/lib/ -name \*.so | ${XARGS} strip
${INSTALL_DATA} ${WRKSRC}/dovecot.conf ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/doc/dovecot-db.conf ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/doc/dovecot-dict-sql.conf ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/doc/dovecot-ldap.conf ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/doc/dovecot-sql.conf ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/doc/dovecot-openssl.cnf ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_SCRIPT} ${WRKSRC}/doc/mkcert.sh ${STAGEDIR}${EXAMPLESDIR}
.include <bsd.port.post.mk>
.if ${PORT_OPTIONS:MDOCS}
${INSTALL_DATA} ${DOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
.endif
.include <bsd.port.mk>

View File

@ -3,62 +3,8 @@
# $FreeBSD: /tmp/pcvs/ports/mail/dovecot/files/pkg-deinstall.in,v 1.2 2008-11-28 14:38:26 wxs Exp $
#
PKG_PREFIX=${PKG_PREFIX:=/usr/local}
ask() {
local question default answer
question=$1
default=$2
if [ -z "${PACKAGE_BUILDING}" -a -z "${BATCH}" ]; then
read -p "${question} [${default}]? " answer
fi
echo ${answer:-${default}}
}
yesno() {
local question default answer
question=$1
default=$2
while :; do
answer=$(ask "${question}" "${default}")
case "${answer}" in
[Yy]*) return 0;;
[Nn]*) return 1;;
esac
echo "Please answer yes or no."
done
}
delete_account() {
local port user uid group gid
port=$1
user=${2%:*}
uid=${2#*:}
group=${3%:*}
gid=${3#*:}
echo "If you do not intend to reinstall ${port}, you should manually"
echo "remove user '${user}' (uid='${uid}') and group '${group}' (gid='${gid}')."
}
case $2 in
DEINSTALL)
if ps -axc | grep -qw dovecot; then
if yesno "Dovecot is still running. Shall I stop it?" y; then
${PKG_PREFIX}/etc/rc.d/dovecot stop
sleep 2
else
echo "OK ... I hope you know what you are doing."
fi
fi
delete_account Dovecot dovecot:${DOVECOT_UID:-%%DOVECOT_UID%%} dovecot:${DOVECOT_GID:-%%DOVECOT_GID%%}
echo "Also manually 'rm -rf /var/db/dovecot' if anything was stored there."
echo "If you don't intend on reinstalling this port you should manually 'rm -rf /var/db/dovecot' if anything was stored there."
;;
esac

View File

@ -1,92 +0,0 @@
#!/bin/sh
#
# $FreeBSD: /tmp/pcvs/ports/mail/dovecot/files/pkg-install.in,v 1.2 2008-11-28 14:38:26 wxs Exp $
#
PKG_PREFIX=${PKG_PREFIX:=/usr/local}
ask() {
local question default answer
question=$1
default=$2
if [ -z "${PACKAGE_BUILDING}" -a -z "${BATCH}" ]; then
read -p "${question} [${default}]? " answer
fi
echo ${answer:-${default}}
}
yesno() {
local question default answer
question=$1
default=$2
while :; do
answer=$(ask "${question}" "${default}")
case "${answer}" in
[Yy]*) return 0;;
[Nn]*) return 1;;
esac
echo "Please answer yes or no."
done
}
create_account() {
local port user uid group gid gcos home shell
port=$1
user=${2%:*}
uid=${2#*:}
group=${3%:*}
gid=${3#*:}
gcos=$4
home=$5
shell=$6
pw_user_uid=$(pw usershow -n "${user}" 2>/dev/null | cut -d: -f3)
pw_uid_user=$(pw usershow -u "${uid}" 2>/dev/null | cut -d: -f1)
pw_group_gid=$(pw groupshow -n "${group}" 2>/dev/null | cut -d: -f3)
pw_gid_group=$(pw groupshow -g "${gid}" 2>/dev/null | cut -d: -f1)
if [ -z "${pw_group_gid}" -a -z "${pw_gid_group}" ]; then
echo "You need a ${group} group; creating it..."
pw groupadd "${group}" -g "${gid}" || exit
echo "Done."
elif [ "${gid}" = "${pw_group_gid}" -a "${group}" = "${pw_gid_group}" ]; then
echo "Using existing ${group} group."
else
echo "${port} has reserved the groupname '${group}' and gid '${gid}':"
[ -n "${pw_group_gid}" -a "${gid}" != "${pw_group_gid}" ] \
&& echo "ERROR: groupname '${group}' already in use by gid '${pw_group_gid}'"
[ -n "${pw_gid_group}" -a "${group}" != "${pw_gid_group}" ] \
&& echo "ERROR: gid '${gid}' already in use by group '${pw_gid_group}'"
echo "Please resolve these issues and try again:"
echo "Either remove the conflicting group or if you wish to continue using a legacy group override DOVECOT_GID."
exit 1
fi
if [ -z "${pw_user_uid}" -a -z "${pw_uid_user}" ]; then
echo "You need a ${user} user; creating it..."
pw useradd "${user}" -u "${uid}" -g "${group}" -c "${gcos}" -d "${home}" -s "${shell}"
echo "Done."
elif [ "${uid}" = "${pw_user_uid}" -a "${user}" = "${pw_uid_user}" ]; then
echo "Using existing ${user} user."
else
echo "${port} has reserved the username '${user}' and uid '${uid}':"
[ -n "${pw_user_uid}" -a "${uid}" != "${pw_user_uid}" ] \
&& echo "ERROR: username '${user}' already in use by uid '${pw_user_uid}'"
[ -n "${pw_uid_user}" -a "${user}" != "${pw_uid_user}" ] \
&& echo "ERROR: uid '${uid}' already in use by user '${pw_uid_user}'"
echo "Please resolve these issues and try again:"
echo "Either remove the conflicting user or if you wish to continue using a legacy user override DOVECOT_UID."
exit 1
fi
}
case $2 in
PRE-INSTALL)
create_account Dovecot dovecot:${DOVECOT_UID:-%%DOVECOT_UID%%} dovecot:${DOVECOT_GID:-%%DOVECOT_GID%%} "Dovecot User" /var/empty /usr/sbin/nologin
;;
esac

View File

@ -1,8 +1,7 @@
@dirrmtry include/dovecot
lib/dovecot/imap/lib01_acl_plugin.so
lib/dovecot/imap/lib02_imap_acl_plugin.so
lib/dovecot/imap/lib02_imap_acl_plugin.la
lib/dovecot/imap/lib02_imap_acl_plugin.a
lib/dovecot/imap/lib02_imap_acl_plugin.la
lib/dovecot/imap/lib02_imap_acl_plugin.so
lib/dovecot/imap/lib02_lazy_expunge_plugin.so
lib/dovecot/imap/lib10_quota_plugin.so
lib/dovecot/imap/lib11_imap_quota_plugin.a
@ -19,7 +18,6 @@ lib/dovecot/imap/lib20_mbox_snarf_plugin.so
lib/dovecot/imap/lib20_virtual_plugin.so
lib/dovecot/imap/lib20_zlib_plugin.so
lib/dovecot/imap/lib21_fts_squat_plugin.so
@dirrm lib/dovecot/imap
lib/dovecot/lda/lib01_acl_plugin.so
lib/dovecot/lda/lib10_quota_plugin.so
lib/dovecot/lda/lib11_trash_plugin.so
@ -31,22 +29,6 @@ lib/dovecot/lda/lib20_listescape_plugin.so
lib/dovecot/lda/lib20_mail_log_plugin.so
lib/dovecot/lda/lib20_virtual_plugin.so
lib/dovecot/lda/lib21_fts_squat_plugin.so
@dirrmtry lib/dovecot/lda
lib/dovecot/pop3/lib20_autocreate_plugin.so
lib/dovecot/pop3/lib02_lazy_expunge_plugin.so
lib/dovecot/pop3/lib10_quota_plugin.so
lib/dovecot/pop3/lib20_convert_plugin.so
lib/dovecot/pop3/lib20_expire_plugin.so
lib/dovecot/pop3/lib20_fts_plugin.so
lib/dovecot/pop3/lib20_listescape_plugin.so
lib/dovecot/pop3/lib20_mail_log_plugin.so
lib/dovecot/pop3/lib20_mbox_snarf_plugin.so
lib/dovecot/pop3/lib20_virtual_plugin.so
lib/dovecot/pop3/lib20_zlib_plugin.so
lib/dovecot/pop3/lib21_fts_squat_plugin.so
@dirrm lib/dovecot/pop3
@exec install -o root -g wheel -m 0755 -d %D/lib/dovecot/auth
@dirrm lib/dovecot/auth
lib/dovecot/lib01_acl_plugin.a
lib/dovecot/lib01_acl_plugin.la
lib/dovecot/lib01_acl_plugin.so
@ -59,9 +41,9 @@ lib/dovecot/lib10_quota_plugin.so
lib/dovecot/lib11_trash_plugin.a
lib/dovecot/lib11_trash_plugin.la
lib/dovecot/lib11_trash_plugin.so
lib/dovecot/lib20_autocreate_plugin.so
lib/dovecot/lib20_autocreate_plugin.la
lib/dovecot/lib20_autocreate_plugin.a
lib/dovecot/lib20_autocreate_plugin.la
lib/dovecot/lib20_autocreate_plugin.so
lib/dovecot/lib20_convert_plugin.a
lib/dovecot/lib20_convert_plugin.la
lib/dovecot/lib20_convert_plugin.so
@ -71,25 +53,36 @@ lib/dovecot/lib20_expire_plugin.so
lib/dovecot/lib20_fts_plugin.a
lib/dovecot/lib20_fts_plugin.la
lib/dovecot/lib20_fts_plugin.so
lib/dovecot/lib20_listescape_plugin.so
lib/dovecot/lib20_listescape_plugin.la
lib/dovecot/lib20_listescape_plugin.a
lib/dovecot/lib20_listescape_plugin.la
lib/dovecot/lib20_listescape_plugin.so
lib/dovecot/lib20_mail_log_plugin.a
lib/dovecot/lib20_mail_log_plugin.la
lib/dovecot/lib20_mail_log_plugin.so
lib/dovecot/lib20_mbox_snarf_plugin.a
lib/dovecot/lib20_mbox_snarf_plugin.la
lib/dovecot/lib20_mbox_snarf_plugin.so
lib/dovecot/lib20_virtual_plugin.so
lib/dovecot/lib20_virtual_plugin.la
lib/dovecot/lib20_virtual_plugin.a
lib/dovecot/lib20_zlib_plugin.so
lib/dovecot/lib20_virtual_plugin.la
lib/dovecot/lib20_virtual_plugin.so
lib/dovecot/lib20_zlib_plugin.a
lib/dovecot/lib20_zlib_plugin.la
lib/dovecot/lib20_zlib_plugin.so
lib/dovecot/lib21_fts_squat_plugin.a
lib/dovecot/lib21_fts_squat_plugin.la
lib/dovecot/lib21_fts_squat_plugin.so
@dirrmtry lib/dovecot
lib/dovecot/pop3/lib02_lazy_expunge_plugin.so
lib/dovecot/pop3/lib10_quota_plugin.so
lib/dovecot/pop3/lib20_autocreate_plugin.so
lib/dovecot/pop3/lib20_convert_plugin.so
lib/dovecot/pop3/lib20_expire_plugin.so
lib/dovecot/pop3/lib20_fts_plugin.so
lib/dovecot/pop3/lib20_listescape_plugin.so
lib/dovecot/pop3/lib20_mail_log_plugin.so
lib/dovecot/pop3/lib20_mbox_snarf_plugin.so
lib/dovecot/pop3/lib20_virtual_plugin.so
lib/dovecot/pop3/lib20_zlib_plugin.so
lib/dovecot/pop3/lib21_fts_squat_plugin.so
libexec/dovecot/authtest
libexec/dovecot/checkpassword-reply
libexec/dovecot/convert-tool
@ -110,12 +103,8 @@ libexec/dovecot/pop3-login
libexec/dovecot/rawlog
libexec/dovecot/ssl-build-param
libexec/dovecot/threadview
@dirrmtry libexec/dovecot
sbin/dovecot
sbin/dovecotpw
@unexec if cmp -s %D/%%EXAMPLESDIR%%/dovecot.conf %D/etc/dovecot.conf; then rm -f %D/etc/dovecot.conf; fi
%%EXAMPLESDIR%%/dovecot.conf
@exec if [ ! -f %D/etc/dovecot.conf ]; then cp -p %D/%%EXAMPLESDIR%%/dovecot.conf %D/etc/dovecot.conf; fi
%%BDB%%@unexec if cmp -s %D/%%EXAMPLESDIR%%/dovecot-db.conf %D/etc/dovecot-db.conf; then rm -f %D/etc/dovecot-db.conf; fi
%%EXAMPLESDIR%%/dovecot-db.conf
%%BDB%%@exec if [ ! -f %D/etc/dovecot-db.conf ]; then cp -p %D/%%EXAMPLESDIR%%/dovecot-db.conf %D/etc/dovecot-db.conf; fi
@ -125,9 +114,20 @@ sbin/dovecotpw
%%LDAP%%@unexec if cmp -s %D/%%EXAMPLESDIR%%/dovecot-ldap.conf %D/etc/dovecot-ldap.conf; then rm -f %D/etc/dovecot-ldap.conf; fi
%%EXAMPLESDIR%%/dovecot-ldap.conf
%%LDAP%%@exec if [ ! -f %D/etc/dovecot-ldap.conf ]; then cp -p %D/%%EXAMPLESDIR%%/dovecot-ldap.conf %D/etc/dovecot-ldap.conf; fi
%%EXAMPLESDIR%%/dovecot-openssl.cnf
%%SQL%%@unexec if cmp -s %D/%%EXAMPLESDIR%%/dovecot-sql.conf %D/etc/dovecot-sql.conf; then rm -f %D/etc/dovecot-sql.conf; fi
%%EXAMPLESDIR%%/dovecot-sql.conf
%%SQL%%@exec if [ ! -f %D/etc/dovecot-sql.conf ]; then cp -p %D/%%EXAMPLESDIR%%/dovecot-sql.conf %D/etc/dovecot-sql.conf; fi
%%EXAMPLESDIR%%/dovecot-openssl.cnf
@unexec if cmp -s %D/%%EXAMPLESDIR%%/dovecot.conf %D/etc/dovecot.conf; then rm -f %D/etc/dovecot.conf; fi
%%EXAMPLESDIR%%/dovecot.conf
@exec if [ ! -f %D/etc/dovecot.conf ]; then cp -p %D/%%EXAMPLESDIR%%/dovecot.conf %D/etc/dovecot.conf; fi
%%EXAMPLESDIR%%/mkcert.sh
@dirrmtry include/dovecot
@dirrmtry lib/dovecot/auth
@dirrmtry lib/dovecot/imap
@dirrmtry lib/dovecot/lda
@dirrmtry lib/dovecot/pop3
@dirrmtry lib/dovecot
@dirrmtry libexec/dovecot
@dirrm %%EXAMPLESDIR%%
@exec install -o root -g wheel -m 0755 -d %D/lib/dovecot/auth