summaryrefslogtreecommitdiff
path: root/mail/postfix-current/options.mk
blob: 960ebccf95edd565aeede0d961784cc713da1294 (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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# $NetBSD: options.mk,v 1.6 2004/10/29 07:07:44 xtraeme Exp $

# Global and legacy options
#
# XXX Support for the following variables will be removed after the
# XXX pkgsrc-2004Q3 branch is released:
# XXX
# XXX	POSTFIX_USE_INET6	POSTFIX_USE_TLS
# XXX	POSTFIX_USE_PCRE	POSTFIX_USE_MYSQL
# XXX	POSTFIX_USE_PGSQL	POSTFIX_OPTIONS
# XXX	POSTFIX_USE_SASL_AUTH
#
.if defined(POSTFIX_USE_INET6) && !empty(POSTFIX_USE_INET6:M[yY][eE][sS])
PKG_DEFAULT_OPTIONS+=	inet6
.endif
.if defined(POSTFIX_USE_TLS) && !empty(POSTFIX_USE_TLS:M[yY][eE][sS])
PKG_DEFAULT_OPTIONS+=	tls
.endif
.if defined(POSTFIX_USE_PCRE) && !empty(POSTFIX_USE_PCRE:M[yY][eE][sS])
PKG_DEFAULT_OPTIONS+=	pcre 
.endif
.if defined(POSTFIX_USE_MYSQL) && !empty(POSTFIX_USE_MYSQL:M[yY][eE][sS])
PKG_DEFAULT_OPTIONS+=	mysql
.endif
.if defined(POSTFIX_USE_PGSQL) && !empty(POSTFIX_USE_PGSQL:M[yY][eE][sS])
PKG_DEFAULT_OPTIONS+=	pgsql
.endif
.if defined(POSTFIX_USE_SASL_AUTH) && defined(POSTFIX_USE_SASL_AUTH)
PKG_DEFAULT_OPTIONS+=	sasl
.endif
.if defined(POSTFIX_OPTIONS)
PKG_DEFAULT_OPTIONS=	${POSTFIX_OPTIONS}
.endif

PKG_OPTIONS_VAR=	PKG_OPTIONS.postfix
#PKG_SUPPORTED_OPTIONS=	inet6 ldap mysql mysql4 pcre pgsql sasl tls
PKG_SUPPORTED_OPTIONS=	ldap mysql mysql4 pcre pgsql sasl
.include "../../mk/bsd.options.mk"

# ###
# ### IPv6 and STARTTLS support (http://www.ipnet6.org/postfix/)
# ###
# .if !empty(PKG_OPTIONS:Minet6)
# .  if empty(PKG_OPTIONS:Mtls)
# PKG_OPTIONS+=		tls
# .  endif
# IPV6TLS_PATCH=		tls+ipv6-1.25-pf-2.2-20040616.patch.gz
# PATCHFILES+=		${IPV6TLS_PATCH}
# SITES_${IPV6TLS_PATCH}=	ftp://ftp.stack.nl/pub/postfix/tls+ipv6/1.25/
# PATCH_DIST_STRIP.${IPV6TLS_PATCH}=	-p1
# PLIST_SRC+=		${PKGDIR}/PLIST.inet6
# .endif
#
# ###
# ### STARTTLS support (http://mirrors.loonybin.net/postfix_tls/)
# ###
# .if !empty(PKG_OPTIONS:Mtls)
# .  include "../../security/openssl/buildlink3.mk"
# .  if empty(PKG_OPTIONS:Minet6)
# TLS_PATCH=		pfixtls-0.8.18-2.1.3-0.9.7d.tar.gz
# PATCHFILES+=		${TLS_PATCH}
# SITES_${TLS_PATCH}=	http://mirrors.loonybin.net/postfix_tls/	\
# 			ftp://mirrors.loonybin.net/pub/postfix_tls/	\
# 			ftp://ftp.aet.tu-cottbus.de/pub/postfix_tls/
# PATCH_DIST_CAT.${TLS_PATCH}=	${TAR} -zxOf ${TLS_PATCH} "*/pfixtls.diff"
# PATCH_DIST_STRIP.${TLS_PATCH}=	-p1
# .  endif
# CCARGS+=	-DHAS_SSL
# AUXLIBS+=	-L${BUILDLINK_PREFIX.openssl}/lib			\
# 		${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.openssl}/lib	\
# 		-lssl -lcrypto
# PLIST_SRC+=	${PKGDIR}/PLIST.tls
# MESSAGE_SRC+=	${PKGDIR}/MESSAGE.tls
# .endif

###
### Support "pcre" map type for regular expressions.
###
.if !empty(PKG_OPTIONS:Mpcre)
.  include "../../devel/pcre/buildlink3.mk"
CCARGS+=	-DHAS_PCRE
AUXLIBS+=	-L${BUILDLINK_PREFIX.pcre}/lib				\
		${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.pcre}/lib	\
		-lpcre
.else
CCARGS+=	-DNO_PCRE
.endif

###
### Support LDAP directories for table lookups.
###
.if !empty(PKG_OPTIONS:Mldap)
.  include "../../databases/openldap/buildlink3.mk"
CCARGS+=	-DHAS_LDAP
AUXLIBS+=	-L${BUILDLINK_PREFIX.openldap}/lib			\
		${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.openldap}/lib	\
		-lldap -llber
.  if ${OPSYS} != "Linux"
.    include "../../databases/db4/buildlink3.mk"
CCARGS+=	-I${BUILDLINK_PREFIX.db4}/include/db4
AUXLIBS+=	-L${BUILDLINK_PREFIX.db4}/lib				\
		${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.db4}/lib	\
		-ldb4
.  endif
.endif

###
### Support using a MySQL database server for table lookups.
###
.if !empty(PKG_OPTIONS:Mmysql4)
.  include "../../mk/mysql.buildlink3.mk"
CCARGS+=	-DHAS_MYSQL
CCARGS+=	`${BUILDLINK_PREFIX.mysql-client}/bin/mysql_config --include`
AUXLIBS+=	`${BUILDLINK_PREFIX.mysql-client}/bin/mysql_config --libs`
.elif !empty(PKG_OPTIONS:Mmysql)
.  include "../../mk/mysql.buildlink3.mk"
CCARGS+=	-DHAS_MYSQL -I${BUILDLINK_PREFIX.mysql-client}/include/mysql
AUXLIBS+=	-L${BUILDLINK_PREFIX.mysql-client}/lib/mysql		\
		${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.mysql-client}/lib/mysql \
		-lmysqlclient -lz -lm
.endif

###
### Support using a PostgreSQL database server for table lookups.
###
.if !empty(PKG_OPTIONS:Mpgsql)
.  include "../../mk/pgsql.buildlink3.mk"
.  include "../../security/openssl/buildlink3.mk"
CCARGS+=	-DHAS_PGSQL -I${PGSQL_PREFIX}/include/pgsql
AUXLIBS+=	-L${PGSQL_PREFIX}/lib -lpq \
		-L${BUILDLINK_PREFIX.openssl}/lib -lcrypt -lssl -lcrypto
.endif

###
### SASL support for SMTP authentication.  If neither SASLv1 or SASLv2 is
### explicitly specified, then build with SASLv2.
###
.if !empty(PKG_OPTIONS:Msasl)
.  if !defined(USE_SASL2) && !defined(USE_SASL)
.    include "../../security/cyrus-sasl2/buildlink3.mk"
BUILDLINK_INCDIRS.cyrus-sasl=	include/sasl
SASLLIBDIR=	${PREFIX}/lib/sasl2
PWCHECK_METHOD=	auxprop
CCARGS+=	-DUSE_SASL_AUTH
AUXLIBS+=	-L${BUILDLINK_PREFIX.cyrus-sasl}/lib			\
		${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.cyrus-sasl}/lib \
		-lsasl2
.  elif defined(USE_SASL2) && !empty(USE_SASL2:M[yY][eE][sS])
.    include "../../security/cyrus-sasl2/buildlink3.mk"
BUILDLINK_INCDIRS.cyrus-sasl=	include/sasl
SASLLIBDIR=	${PREFIX}/lib/sasl2
PWCHECK_METHOD=	auxprop
CCARGS+=	-DUSE_SASL_AUTH
AUXLIBS+=	-L${BUILDLINK_PREFIX.cyrus-sasl}/lib			\
		${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.cyrus-sasl}/lib \
		-lsasl2
.  elif defined(USE_SASL) && !empty(USE_SASL:M[yY][eE][sS])
.    include "../../security/cyrus-sasl/buildlink3.mk"
SASLLIBDIR=	${PREFIX}/lib/sasl
PWCHECK_METHOD=	sasldb
CCARGS+=	-DUSE_SASL_AUTH
AUXLIBS+=	-L${BUILDLINK_PREFIX.cyrus-sasl}/lib			\
		${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.cyrus-sasl}/lib \
		-lsasl
.  endif
PLIST_SRC+=	${PKGDIR}/PLIST.sasl
MESSAGE_SRC+=	${PKGDIR}/MESSAGE.sasl
MESSAGE_SUBST+=	PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
MESSAGE_SUBST+=	SASLLIBDIR=${SASLLIBDIR}
.endif

.if ${OPSYS} == "Linux"
.  include "../../databases/db/buildlink3.mk"
CCARGS+=	-I${BUILDLINK_PREFIX.db2}/include/db2
AUXLIBS+=	-L${BUILDLINK_PREFIX.db2}/lib				\
		${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.db2}/lib	\
		-ldb2
.endif