aboutsummaryrefslogtreecommitdiffstats
path: root/mail/dovecot2-pigeonhole/Makefile
blob: b047a4804e59a74af572bc374d67830d496bb082 (plain) (blame)
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
# Created by: Nils Vogels <nivo+kw+ports.bfa274@is-root.com>
# $FreeBSD$

PORTNAME=   dovecot-pigeonhole
PORTVERSION=    0.3.4
CATEGORIES= mail
MASTER_SITES=   http://www.rename-it.nl/dovecot/${DOVECOTVERSION}/
DISTNAME=   ${PORTNAME:C/-/-${DOVECOTVERSION}-/}-${PORTVERSION}

MAINTAINER= bra@fsn.hu
COMMENT=    Sieve plugin for the Dovecot 'deliver' LDA and LMTP

LICENSE=    LGPL21

BUILD_DEPENDS:= dovecot>=${DOVECOTVERSION}:${PORTSDIR}/mail/dovecot${DOVECOTVERSION:R}
RUN_DEPENDS:=   dovecot>=${DOVECOTVERSION}:${PORTSDIR}/mail/dovecot${DOVECOTVERSION:R}

DOVECOTVERSION= 2.1

GNU_CONFIGURE=  yes
CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ARGS= --prefix=${PREFIX} \
        --docdir=${DOCSDIR} \
        --with-dovecot="${LOCALBASE}/lib/dovecot"
LDFLAGS+=   -L${LOCALBASE}/lib
USE_LDCONFIG=   ${PREFIX}/lib/dovecot

MAN1=       sieve-dump.1 sieve-filter.1 sieve-test.1 sievec.1 sieved.1
MAN7=       pigeonhole.7

DOCSDIR=    ${PREFIX}/share/doc/${PORTNAME:S/-/\//}

OPTIONS_DEFINE= DOCS EXAMPLES

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MDOCS}
EXTENSIONDOCS=  editheader.txt include.txt spamtest-virustest.txt \
        vacation.txt vnd.dovecot.duplicate.txt
PORTDOCS=   AUTHORS COPYING COPYING.LGPL INSTALL NEWS README TODO \
        script-location-dict.txt ${EXTENSIONDOCS}
.endif

.if ${PORT_OPTIONS:MEXAMPLES}
EXAMPLESDIR=    ${PREFIX}/share/examples/${PORTNAME:S/-/\//}
PORTEXAMPLES=   *.sieve
.endif

post-patch:
    @${REINPLACE_CMD} -E '\
        s!^(install-data-am:) install-sieve_docDATA!\1!; \
        s!^(uninstall-am:) uninstall-sieve_docDATA!\1!;' \
        ${WRKSRC}/doc/Makefile.in
.if ${PORT_OPTIONS:MDOCS}
.for f in ${EXTENSIONDOCS}
    @${LN} -f ${WRKSRC}/doc/extensions/${f} ${WRKSRC}/
.endfor
    @${LN} -f ${WRKSRC}/doc/script-location-dict.txt ${WRKSRC}/
.endif

post-install:
.if ${PORT_OPTIONS:MDOCS}
    @${INSTALL} ${_SHROWNGRP} -m ${BINMODE} -d ${DOCSDIR}
.for f in ${PORTDOCS}
    @${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
.endfor
    @${ECHO_MSG} "===> Documentation installed in ${DOCSDIR}"
.endif
.if ${PORT_OPTIONS:MEXAMPLES}
    @${INSTALL} ${_SHROWNGRP} -m ${BINMODE} -d ${EXAMPLESDIR}
    @${INSTALL_DATA} ${WRKSRC}/examples/*.sieve ${EXAMPLESDIR}
    @${ECHO_MSG} "===> Examples installed in ${EXAMPLESDIR}"
.endif
    @${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>