Lines 1-12
Link Here
|
1 |
# New ports collection makefile for: opendkim |
1 |
# Created by: Hirohisa Yamaguchi <umq@ueo.co.jp> |
2 |
# Date created: 2009-08-26 |
|
|
3 |
# Whom: Hirohisa Yamaguchi <umq@ueo.co.jp> |
4 |
# |
5 |
# $FreeBSD$ |
2 |
# $FreeBSD$ |
6 |
# |
|
|
7 |
|
3 |
|
8 |
PORTNAME= opendkim |
4 |
PORTNAME= opendkim |
9 |
PORTVERSION= 2.5.2 |
5 |
PORTVERSION= 2.7.1 |
10 |
CATEGORIES= mail security |
6 |
CATEGORIES= mail security |
11 |
MASTER_SITES= SF |
7 |
MASTER_SITES= SF |
12 |
MASTER_SITE_SUBDIR= ${PORTNAME} \ |
8 |
MASTER_SITE_SUBDIR= ${PORTNAME} \ |
Lines 17-23
Link Here
|
17 |
|
13 |
|
18 |
LICENSE= BSD SENDMAIL |
14 |
LICENSE= BSD SENDMAIL |
19 |
LICENSE_COMB= multi |
15 |
LICENSE_COMB= multi |
20 |
LICENSE_FILE= ${WRKSRC}/LICENSE |
|
|
21 |
|
16 |
|
22 |
LICENSE_FILE_SENDMAIL= ${WRKSRC}/LICENSE.Sendmail |
17 |
LICENSE_FILE_SENDMAIL= ${WRKSRC}/LICENSE.Sendmail |
23 |
LICENSE_GROUPS_SENDMAIL= FSF OSI |
18 |
LICENSE_GROUPS_SENDMAIL= FSF OSI |
Lines 25-53
Link Here
|
25 |
LICENSE_PERMS_SENDMAIL= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept |
20 |
LICENSE_PERMS_SENDMAIL= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept |
26 |
|
21 |
|
27 |
GNU_CONFIGURE= yes |
22 |
GNU_CONFIGURE= yes |
|
|
23 |
MAKE_JOBS_SAFE= yes |
24 |
NO_OPTIONS_SORT=yes |
28 |
USE_OPENSSL= yes |
25 |
USE_OPENSSL= yes |
29 |
USE_LDCONFIG= yes |
26 |
USE_LDCONFIG= yes |
30 |
|
27 |
|
31 |
MAN8= opendkim-genkey.8 opendkim-genzone.8 opendkim-testadsp.8 \ |
28 |
MAN8= opendkim-genkey.8 opendkim-genzone.8 opendkim-testadsp.8 \ |
32 |
opendkim-testkey.8 opendkim-testmsg.8 |
29 |
opendkim-testkey.8 opendkim-testmsg.8 |
|
|
30 |
PORTDOCS= * |
33 |
|
31 |
|
34 |
OPTIONS= \ |
32 |
OPTIONS_SINGLE= RESOLV |
35 |
ARLIB "Asynchronous thread-safe DNS library" On \ |
33 |
OPTIONS_SINGLE_RESOLV= STOCK_RESOLVER UNBOUND |
36 |
FILTER "OpenDKIM filter, requires libmilter/Sendmail" On \ |
34 |
OPTIONS_DEFINE= FILTER GNUTLS LUA MEMCACHED BDB_BASE OPENDBX OPENLDAP \ |
37 |
GNUTLS "Use GnuTLS instead of OpenSSL" Off \ |
35 |
POPAUTH QUERY_CACHE STATS XML |
38 |
LUA "Describe filter policy with lua" Off \ |
36 |
OPTIONS_DEFAULT= FILTER LUA UNBOUND |
39 |
MEMCACHED "Use memcached as a data set" Off \ |
|
|
40 |
OPENDBX "Store filter policies via OpenDBX" Off \ |
41 |
OPENLDAP "Store filter policies in LDAP" Off \ |
42 |
POPAUTH "Use POP authentication DB" Off \ |
43 |
QUERY_CACHE "Cache DNS query results locally" Off \ |
44 |
UNBOUND "Use unbound DNS library" Off |
45 |
|
37 |
|
|
|
38 |
STOCK_RESOLVER_DESC= Use the stock resolver library |
39 |
UNBOUND_DESC= Use unbound DNS library |
40 |
FILTER_DESC= OpenDKIM filter, requires libmilter/Sendmail |
41 |
GNUTLS_DESC= Use GnuTLS instead of OpenSSL |
42 |
LUA_DESC= Describe filter policy with lua |
43 |
MEMCACHED_DESC= Use memcached as a data set |
44 |
BDB_BASE_DESC= Use Berkeley DB from base |
45 |
OPENDBX_DESC= Store filter policies via OpenDBX |
46 |
OPENLDAP_DESC= Store filter policies in LDAP |
47 |
POPAUTH_DESC= Use POP authentication DB |
48 |
QUERY_CACHE_DESC= Cache DNS query results locally |
49 |
STATS_DESC= Setup statistics tools |
50 |
|
46 |
MAKE_ARGS+= pkgconfigdir="${PREFIX}/libdata/pkgconfig" |
51 |
MAKE_ARGS+= pkgconfigdir="${PREFIX}/libdata/pkgconfig" |
47 |
|
52 |
|
48 |
.include <bsd.port.pre.mk> |
53 |
.include "${.CURDIR}/Makefile.options" |
|
|
54 |
.include <bsd.port.options.mk> |
49 |
|
55 |
|
50 |
.if defined(WITH_FILTER) && !defined(WITHOUT_FILTER) |
56 |
.if ${PORT_OPTIONS:MFILTER} |
51 |
USE_RC_SUBR= milter-opendkim |
57 |
USE_RC_SUBR= milter-opendkim |
52 |
MAN5+= opendkim.conf.5 |
58 |
MAN5+= opendkim.conf.5 |
53 |
MAN8+= opendkim.8 |
59 |
MAN8+= opendkim.8 |
Lines 62-69
Link Here
|
62 |
PLIST_SUB+= FILTER="@comment " |
68 |
PLIST_SUB+= FILTER="@comment " |
63 |
.endif |
69 |
.endif |
64 |
|
70 |
|
65 |
.if defined(WITH_GNUTLS) |
71 |
.if ${PORT_OPTIONS:MGNUTLS} |
66 |
LIB_DEPENDS+= gnutls.47:${PORTSDIR}/security/gnutls |
72 |
LIB_DEPENDS+= gnutls:${PORTSDIR}/security/gnutls |
67 |
CONFIGURE_ARGS+= --with-gnutls=${LOCALBASE} |
73 |
CONFIGURE_ARGS+= --with-gnutls=${LOCALBASE} |
68 |
.else |
74 |
.else |
69 |
CONFIGURE_ARGS+= --with-openssl=${OPENSSLBASE} |
75 |
CONFIGURE_ARGS+= --with-openssl=${OPENSSLBASE} |
Lines 71-136
Link Here
|
71 |
|
77 |
|
72 |
.include "${.CURDIR}/Makefile.features" |
78 |
.include "${.CURDIR}/Makefile.features" |
73 |
|
79 |
|
74 |
.if defined(WITH_DEBUG) |
80 |
.if ${PORT_OPTIONS:MDEBUG} |
75 |
CONFIGURE_ARGS+= --enable-debug |
81 |
CONFIGURE_ARGS+= --enable-debug |
76 |
.endif |
82 |
.endif |
77 |
|
83 |
|
78 |
.if !defined(NOPORTDOCS) |
84 |
.if ! ${PORT_OPTIONS:MDOCS} |
79 |
PORTDOCS= * |
|
|
80 |
.else |
81 |
CONFIGURE_ARGS+=--docdir=${WRKDIR}/doc |
85 |
CONFIGURE_ARGS+=--docdir=${WRKDIR}/doc |
82 |
.endif |
86 |
.endif |
83 |
|
87 |
|
84 |
.if (defined(WITH_POPAUTH) \ |
88 |
.if ${PORT_OPTIONS:MSTATS} || ${PORT_OPTIONS:MSTATSEXT} |
85 |
|| defined(WITH_QUERY_CACHE) \ |
89 |
CONFIGURE_ARGS+= --enable-stats |
86 |
|| defined(WITH_BODYLENGTH_DB) \ |
90 |
MAN8+= opendkim-expire.8 opendkim-gengraphs.8 \ |
87 |
|| defined(WITH_LDAP_CACHING) \ |
91 |
opendkim-genstats.8 opendkim-stats.8 |
88 |
|| defined(WITH_STATS)) \ |
92 |
. if ${PORT_OPTIONS:MOPENDBX} |
89 |
&& !defined(WITH_BDB_BASE) |
93 |
MAN1+= opendkim-spam.1 |
|
|
94 |
MAN8+= opendkim-importstats.8 |
95 |
. endif |
96 |
PLIST_SUB+= STATS="" |
97 |
.else |
98 |
PLIST_SUB+= STATS="@comment " |
99 |
.endif |
100 |
.if ( ${PORT_OPTIONS:MPOPAUTH} \ |
101 |
|| ${PORT_OPTIONS:MQUERY_CACHE} \ |
102 |
|| ${PORT_OPTIONS:MLDAP_CACHING} \ |
103 |
|| ${PORT_OPTIONS:MREPUTATION} \ |
104 |
|| ${PORT_OPTIONS:MSTATS} ) && ! ${PORT_OPTIONS:MBDB_BASE} |
90 |
CONFIGURE_ARGS+= --with-db-incdir=${BDB_INCLUDE_DIR} \ |
105 |
CONFIGURE_ARGS+= --with-db-incdir=${BDB_INCLUDE_DIR} \ |
91 |
--with-db-libdir=${BDB_LIB_DIR} \ |
106 |
--with-db-libdir=${BDB_LIB_DIR} \ |
92 |
--with-db-lib=${BDB_LIB_NAME} |
107 |
--with-db-lib=${BDB_LIB_NAME} |
93 |
USE_BDB= 41+ |
108 |
USE_BDB= 41+ |
94 |
.endif |
109 |
.endif |
95 |
.if defined(WITH_UNBOUND) && !defined(WITHOUT_UNBOUND) |
110 |
.if ${PORT_OPTIONS:MUNBOUND} |
96 |
.if defined(WITH_ARLIB) |
111 |
CONFIGURE_ARGS+= --with-unbound |
97 |
IGNORE= libar cannot be used simultaneously with libunbound |
|
|
98 |
.endif |
99 |
CONFIGURE_ARGS+= --with-unbound \ |
100 |
--disable-arlib |
101 |
LIB_DEPENDS+= unbound:${PORTSDIR}/dns/unbound |
112 |
LIB_DEPENDS+= unbound:${PORTSDIR}/dns/unbound |
102 |
PLIST_SUB+= ARLIB="@comment " |
|
|
103 |
.else |
104 |
.if defined(WITH_ARLIB) |
105 |
PLIST_SUB+= ARLIB="" |
106 |
CONFIGURE_ARGS+= --enable-arlib |
107 |
MAN3= ar.3 |
108 |
.else |
109 |
CONFIGURE_ARGS+= --disable-arlib |
110 |
PLIST_SUB+= ARLIB="@comment " |
111 |
.endif |
113 |
.endif |
112 |
.endif |
114 |
.if ${PORT_OPTIONS:MPOPAUTH} |
113 |
.if defined(WITH_POPAUTH) && !defined(WITHOUT_POPAUTH) |
|
|
114 |
CONFIGURE_ARGS+= --enable-popauth |
115 |
CONFIGURE_ARGS+= --enable-popauth |
115 |
.endif |
116 |
.endif |
116 |
.if defined(WITH_QUERY_CACHE) && !defined(WITHOUT_QUERY_CACHE) |
117 |
.if ${PORT_OPTIONS:MQUERY_CACHE} |
117 |
CONFIGURE_ARGS+= --enable-query_cache |
118 |
CONFIGURE_ARGS+= --enable-query_cache |
118 |
.endif |
119 |
.endif |
119 |
.if defined(WITH_MEMCACHED) |
120 |
.if ${PORT_OPTIONS:MMEMCACHED} |
120 |
CONFIGURE_ARGS+= --with-libmemcached |
121 |
CONFIGURE_ARGS+= --with-libmemcached |
121 |
LIB_DEPENDS+= memcached:${PORTSDIR}/databases/libmemcached |
122 |
LIB_DEPENDS+= memcached:${PORTSDIR}/databases/libmemcached |
|
|
123 |
.else |
124 |
CONFIGURE_ARGS+= --without-libmemcached |
122 |
.endif |
125 |
.endif |
123 |
.if defined(WITH_OPENDBX) |
126 |
.if ${PORT_OPTIONS:MOPENDBX} |
124 |
CONFIGURE_ARGS+= --with-odbx |
127 |
CONFIGURE_ARGS+= --with-odbx |
125 |
LIB_DEPENDS+= opendbx:${PORTSDIR}/databases/opendbx |
128 |
LIB_DEPENDS+= opendbx:${PORTSDIR}/databases/opendbx |
|
|
129 |
PLIST_SUB+= ODBX="" |
130 |
.else |
131 |
CONFIGURE_ARGS+= --without-odbx |
132 |
PLIST_SUB+= ODBX="@comment " |
126 |
.endif |
133 |
.endif |
127 |
.if defined(WITH_OPENLDAP) |
134 |
.if ${PORT_OPTIONS:MOPENLDAP} |
128 |
CONFIGURE_ARGS+= --with-openldap |
135 |
CONFIGURE_ARGS+= --with-openldap |
|
|
136 |
LIB_DEPENDS+= ldap:${PORTSDIR}/net/openldap24-sasl-client |
129 |
USE_OPENLDAP= yes |
137 |
USE_OPENLDAP= yes |
|
|
138 |
.else |
139 |
CONFIGURE_ARGS+= --without-openldap |
130 |
.endif |
140 |
.endif |
131 |
.if defined(WITH_LUA) || defined(WITH_RBL) || defined(WITH_STATSEXT) |
141 |
.if ${PORT_OPTIONS:MLUA} || ${PORT_OPTIONS:MRBL} || ${PORT_OPTIONS:MSTATSEXT} |
132 |
CONFIGURE_ARGS+= --with-lua |
142 |
CONFIGURE_ARGS+= --with-lua |
133 |
. if !defined(WITHOUT_FILTER) |
143 |
. if ${PORT_OPTIONS:MFILTER} |
134 |
MAN3+= opendkim-lua.3 |
144 |
MAN3+= opendkim-lua.3 |
135 |
. endif |
145 |
. endif |
136 |
MAN8+= miltertest.8 |
146 |
MAN8+= miltertest.8 |
Lines 141-156
Link Here
|
141 |
.endif |
151 |
.endif |
142 |
|
152 |
|
143 |
post-install: |
153 |
post-install: |
144 |
.if !defined(WITH_DEBUG) && defined(WITH_FILTER) && !defined(WITHOUT_FILTER) |
154 |
.if ! ${PORT_OPTIONS:MDEBUG} && ${PORT_OPTIONS:MFILTER} |
145 |
@${STRIP_CMD} ${PREFIX}/sbin/opendkim |
155 |
@${STRIP_CMD} ${PREFIX}/sbin/opendkim |
146 |
.endif |
156 |
.endif |
147 |
@${MKDIR} ${PREFIX}/etc/mail |
157 |
@${MKDIR} ${PREFIX}/etc/mail |
148 |
${INSTALL_DATA} ${WRKSRC}/opendkim/opendkim.conf.sample ${PREFIX}/etc/mail/ |
158 |
${INSTALL_DATA} ${WRKSRC}/opendkim/opendkim.conf.sample ${PREFIX}/etc/mail/ |
149 |
.if !defined(WITHOUT_FILTER) |
159 |
.if ${PORT_OPTIONS:MFILTER} |
150 |
@${CAT} ${PKGMESSAGE} |
160 |
@${CAT} ${PKGMESSAGE} |
151 |
.endif |
161 |
.endif |
152 |
|
162 |
|
153 |
regression-test: build |
163 |
regression-test: build |
154 |
cd ${WRKSRC} ; ${MAKE} check |
164 |
cd ${WRKSRC} ; ${MAKE} check |
155 |
|
165 |
|
156 |
.include <bsd.port.post.mk> |
166 |
.include <bsd.port.mk> |