summaryrefslogtreecommitdiff
path: root/mail/dovecot-pigeonhole/Makefile
blob: bd09cafff50c60527ca5313d2adcc596090b3325 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
PORTNAME=	dovecot-pigeonhole
PORTVERSION=	0.5.21
PORTREVISION=	2
CATEGORIES=	mail
MASTER_SITES=	http://pigeonhole.dovecot.org/releases/${DOVECOTVERSION}/
DISTNAME=	${PORTNAME:C/-/-${DOVECOTVERSION}-/}-${PORTVERSION}

MAINTAINER=	ler@FreeBSD.org
COMMENT=	Sieve plugin for the Dovecot 'deliver' LDA and LMTP
WWW=		https://wiki2.dovecot.org/Pigeonhole

LICENSE=	LGPL21

BUILD_DEPENDS=	dovecot>=2.3.9:mail/dovecot
RUN_DEPENDS=	dovecot>=2.3.9:mail/dovecot

DOVECOTVERSION=	2.3

GNU_CONFIGURE=	yes
GNU_CONFIGURE_MANPREFIX=	${PREFIX}/share
CONFIGURE_ARGS=	--exec-prefix=${PREFIX} \
		--docdir=${DOCSDIR} \
		--with-dovecot="${LOCALBASE}/lib/dovecot"
LDFLAGS+=	-L${LOCALBASE}/lib
INSTALL_TARGET=	install-strip
USES=		compiler:c11 libtool ssl
USE_LDCONFIG=	${PREFIX}/lib/dovecot

OPTIONS_DEFINE=	DOCS EXAMPLES LDAP MANAGESIEVE
OPTIONS_DEFAULT=EXAMPLES MANAGESIEVE GSSAPI_NONE

OPTIONS_SINGLE=	GSSAPI
OPTIONS_SINGLE_GSSAPI=	GSSAPI_NONE GSSAPI_BASE GSSAPI_HEIMDAL GSSAPI_MIT
OPTIONS_SUB=	yes

GSSAPI_DESC=		GSSAPI Support (*MUST MATCH* mail/dovecot)
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

GSSAPI_BASE_USES=	gssapi
GSSAPI_HEIMDAL_USES=	gssapi:heimdal
GSSAPI_MIT_USES=	gssapi:mit
GSSAPI_NONE_CONFIGURE_OFF=	${GSSAPI_CONFIGURE_ARGS}
BUILD_FAIL_MESSAGE=	Ensure that ${PORTNAME}'s GSSAPI backend is the same as dovecot2 (make config).

MANAGESIEVE_DESC=		ManageSieve support
MANAGESIEVE_CONFIGURE_WITH=	managesieve

LDAP_CONFIGURE_WITH=	ldap
LDAP_CPPFLAGS=		-I${LOCALBASE}/include
LDAP_LDFLAGS=		-L${LOCALBASE}/lib
LDAP_USES=		ldap

PORTDOCS=	sieve/extensions/* sieve/plugins/* sieve/locations/*
PORTEXAMPLES=	*

post-patch:
	@${REINPLACE_CMD} -E '\
	s!^(install-data-am:) install-sieve_docDATA!\1!; \
		s!^(uninstall-am:) uninstall-sieve_docDATA!\1!;' \
		${WRKSRC}/doc/Makefile.in

post-install-EXAMPLES-on:
	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}

	${CP} ${WRKSRC}/examples/elvey.sieve ${STAGEDIR}${EXAMPLESDIR}
	${CP} ${WRKSRC}/examples/jerry.sieve ${STAGEDIR}${EXAMPLESDIR}
	${CP} ${WRKSRC}/examples/mjohnson.sieve ${STAGEDIR}${EXAMPLESDIR}
	${CP} ${WRKSRC}/examples/mklose.sieve ${STAGEDIR}${EXAMPLESDIR}
	${CP} ${WRKSRC}/examples/relational.rfc5231.sieve ${STAGEDIR}${EXAMPLESDIR}
	${CP} ${WRKSRC}/examples/rfc3028.sieve ${STAGEDIR}${EXAMPLESDIR}
	${CP} ${WRKSRC}/examples/sanjay.sieve ${STAGEDIR}${EXAMPLESDIR}
	${CP} ${WRKSRC}/examples/sieve_examples.sieve ${STAGEDIR}${EXAMPLESDIR}
	${CP} ${WRKSRC}/examples/subaddress.rfc5233.sieve ${STAGEDIR}${EXAMPLESDIR}
	${CP} ${WRKSRC}/examples/vacation.sieve ${STAGEDIR}${EXAMPLESDIR}
	${CP} ${WRKSRC}/examples/vivil.sieve ${STAGEDIR}${EXAMPLESDIR}

.include <bsd.port.mk>