1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-05 06:27:37 +00:00
freebsd-ports/mail/dovecot/Makefile
Tijl Coosemans 37f54e0f66 net/openldap24-*:
- Convert to USES=libtool and bump dependent ports
- Avoid USE_AUTOTOOLS
- Don't use PTHREAD_LIBS
- Use MAKE_CMD

databases/glom:
- Drop :keepla
- Add INSTALL_TARGET=install-strip

databases/libgda4* databases/libgda5*:
- Convert to USES=libtool and bump dependent ports
- USES=tar:xz
- Use INSTALL_TARGET=install-strip
- Use @sample

databases/libgdamm:
- Drop :keepla
- USES=tar:bzip2
- Use INSTALL_TARGET=install-strip

databases/libgdamm5:
- Add INSTALL_TARGET=install-strip
- Drop --enable-static (inherited from old repocopy)

devel/anjuta x11-toolkits/py-gnome-extras:
- Drop :keepla

dns/powerdns dns/powerdns-devel:
- Convert to USES=libtool
- Add INSTALL_TARGET=install-strip
- Disable static modules
- Stop creating library symlinks with .0 suffix, not needed for dynamically
  opened modules

mail/dovecot2:
- Add USES=libtool

mail/dovecot2-pigeonhole:
- Drop CONFIGURE_TARGET (incorrect for Dragonfly)
- Add USES=libtool and INSTALL_TARGET=install-strip

math/gnumeric:
- USES=libtool tar:xz

Approved by:	portmgr (implicit, bump unstaged ports)
2014-07-24 18:34:16 +00:00

169 lines
5.3 KiB
Makefile

# Created by: Dominic Marks <dominic.marks@btinternet.com>
# $FreeBSD$
PORTNAME= dovecot
PORTVERSION= 1.2.17
PORTREVISION= 4
CATEGORIES= mail ipv6
MASTER_SITES= http://www.dovecot.org/releases/${PORTVERSION:R}/ \
http://www.rename-it.nl/dovecot/${PORTVERSION:R}/
MAINTAINER= bdrewery@FreeBSD.org
COMMENT= Secure and compact IMAP and POP3 servers
LICENSE= LGPL21 MIT
LICENSE_COMB= dual
CONFLICTS= dovecot2-2.[0-9].*
######################################################################
# Anytime PORTVERSION changes please bump PORTREVISIONs of #
# mail/dovecot-antispam, mail/dovecot-managesieve and #
# mail/dovecot-sieve. Please see ports/135311 and ports/146029 for #
# an explanation. #
# #
# Please be careful when updating this port as changes to this port #
# can break mail/dovecot-sieve and mail/dovecot-managesieve. In #
# order to ensure the least amount of breakage possible please #
# consult the maintainer of those ports before updating this one. #
######################################################################
USES= iconv libtool:keepla
USE_RC_SUBR= dovecot
PORTSCOUT= limit:^1\.2
GNU_CONFIGURE= yes
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
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 DOCS
OPTIONS_DEFAULT= KQUEUE SSL MANAGESIEVE
KQUEUE_DESC= kqueue(2) support
MANAGESIEVE_DESC= ManageSieve support
VPOPMAIL_DESC= VPopMail support
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
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;\
s!/usr/!${PREFIX}/!g;\
s!=/usr!=${PREFIX}!g;\
s!=/etc !=${PREFIX}/etc !g;\
s!/etc/dovecot!${PREFIX}&!g;\
s![[:<:]]doc/(dovecot-[^-]+)-example.conf[[:>:]]!${EXAMPLESDIR}/\1.conf!g;\
s!\#sendmail_path = /usr/.*!sendmail_path = /usr/sbin/sendmail!g;
.if ${PORT_OPTIONS:MBDB}
REINPLACE+= s!^\#(dict_db_config)!\1!;
.endif
.if ${PORT_OPTIONS:MMANAGESIEVE}
MANAGESIEVEVERSION!= ${MAKE} -C ${.CURDIR}/../dovecot-managesieve -V PORTVERSION
PATCH_SITES!= ${MAKE} -C ${.CURDIR}/../dovecot-managesieve -V MASTER_SITES
PATCHFILES+= dovecot-${PORTVERSION}-managesieve-${MANAGESIEVEVERSION}.diff.gz
PATCH_DIST_STRIP= -p1
PROTOCOLS+= managesieve
DOCS+= README.managesieve
.endif
.if ${PORT_OPTIONS:MPGSQL} || ${PORT_OPTIONS:MMYSQL} || ${PORT_OPTIONS:MSQLITE}
PLIST_SUB+= SQL=""
.else
PLIST_SUB+= SQL="@comment "
.endif
post-patch:
@${REINPLACE_CMD} -E -e '${REINPLACE}' \
${WRKSRC}/dovecot-example.conf
@${REINPLACE_CMD} -E -e'\
s!-example\.conf[[:>:]]!.conf!g;\
s!^(confdir[[:space:]]+=[[:space:]]+)\$$\(sysconfdir\)!\1${EXAMPLESDIR}!g;\
' ${WRKSRC}/*/Makefile.in ${WRKSRC}/Makefile.in
@${LN} -f ${WRKSRC}/dovecot-example.conf ${WRKSRC}/dovecot.conf
@${LN} -f ${WRKSRC}/doc/dovecot-db-example.conf ${WRKSRC}/doc/dovecot-db.conf
@${LN} -f ${WRKSRC}/doc/dovecot-dict-sql-example.conf ${WRKSRC}/doc/dovecot-dict-sql.conf
@${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
post-install:
${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}
.if ${PORT_OPTIONS:MDOCS}
${INSTALL_DATA} ${DOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
.endif
.include <bsd.port.mk>