Update mail/dovecot2-pigeonhole to version 0.4.0
[dports.git] / mail / dovecot2-pigeonhole / Makefile
1 # Created by: Nils Vogels <nivo+kw+ports.bfa274@is-root.com>
2 # $FreeBSD: mail/dovecot2-pigeonhole/Makefile 318892 2013-05-23 17:58:48Z miwi $
3
4 PORTNAME=       dovecot-pigeonhole
5 PORTVERSION=    0.4.0
6 CATEGORIES=     mail
7 MASTER_SITES=   http://www.rename-it.nl/dovecot/${DOVECOTVERSION}/
8 DISTNAME=       ${PORTNAME:C/-/-${DOVECOTVERSION}-/}-${PORTVERSION}
9
10 MAINTAINER=     bra@fsn.hu
11 COMMENT=        Sieve plugin for the Dovecot 'deliver' LDA and LMTP
12
13 LICENSE=        LGPL21
14
15 BUILD_DEPENDS:= dovecot>=${DOVECOTVERSION}:${PORTSDIR}/mail/dovecot${DOVECOTVERSION:R}
16 RUN_DEPENDS:=   dovecot>=${DOVECOTVERSION}:${PORTSDIR}/mail/dovecot${DOVECOTVERSION:R}
17
18 DOVECOTVERSION= 2.2
19
20 GNU_CONFIGURE=  yes
21 CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
22 CONFIGURE_ARGS= --prefix=${PREFIX} \
23                 --docdir=${DOCSDIR} \
24                 --with-dovecot="${LOCALBASE}/lib/dovecot"
25 LDFLAGS+=       -L${LOCALBASE}/lib
26 USE_LDCONFIG=   ${PREFIX}/lib/dovecot
27
28 MAN1=           sieve-dump.1 sieve-filter.1 sieve-test.1 sievec.1 sieved.1
29 MAN7=           pigeonhole.7
30
31 DOCSDIR=        ${PREFIX}/share/doc/${PORTNAME:S/-/\//}
32
33 OPTIONS_DEFINE= DOCS EXAMPLES
34
35 .include <bsd.port.options.mk>
36
37 .if ${PORT_OPTIONS:MDOCS}
38 EXTENSIONDOCS=  editheader.txt include.txt spamtest-virustest.txt \
39                 vacation.txt vnd.dovecot.duplicate.txt
40 PORTDOCS=       AUTHORS COPYING COPYING.LGPL INSTALL NEWS README TODO \
41                 script-location-dict.txt ${EXTENSIONDOCS}
42 .endif
43
44 .if ${PORT_OPTIONS:MEXAMPLES}
45 EXAMPLESDIR=    ${PREFIX}/share/examples/${PORTNAME:S/-/\//}
46 PORTEXAMPLES=   *.sieve
47 .endif
48
49 post-patch:
50         @${REINPLACE_CMD} -E '\
51                 s!^(install-data-am:) install-sieve_docDATA!\1!; \
52                 s!^(uninstall-am:) uninstall-sieve_docDATA!\1!;' \
53                 ${WRKSRC}/doc/Makefile.in
54 .if ${PORT_OPTIONS:MDOCS}
55 .for f in ${EXTENSIONDOCS}
56         @${LN} -f ${WRKSRC}/doc/extensions/${f} ${WRKSRC}/
57 .endfor
58         @${LN} -f ${WRKSRC}/doc/script-location-dict.txt ${WRKSRC}/
59 .endif
60
61 post-install:
62 .if ${PORT_OPTIONS:MDOCS}
63         @${INSTALL} ${_SHROWNGRP} -m ${BINMODE} -d ${DOCSDIR}
64 .for f in ${PORTDOCS}
65         @${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
66 .endfor
67         @${ECHO_MSG} "===> Documentation installed in ${DOCSDIR}"
68 .endif
69 .if ${PORT_OPTIONS:MEXAMPLES}
70         @${INSTALL} ${_SHROWNGRP} -m ${BINMODE} -d ${EXAMPLESDIR}
71         @${INSTALL_DATA} ${WRKSRC}/examples/*.sieve ${EXAMPLESDIR}
72         @${ECHO_MSG} "===> Examples installed in ${EXAMPLESDIR}"
73 .endif
74         @${CAT} ${PKGMESSAGE}
75
76 .include <bsd.port.mk>