2015-04-03 03:15:24 +02:00
|
|
|
# $NetBSD: options.mk,v 1.37 2015/04/03 01:15:24 hiramatsu Exp $
|
2004-07-30 23:05:41 +02:00
|
|
|
|
|
|
|
# Global and legacy options
|
|
|
|
|
|
|
|
PKG_OPTIONS_VAR= PKG_OPTIONS.postfix
|
2011-05-10 15:38:23 +02:00
|
|
|
PKG_SUPPORTED_OPTIONS= bdb ldap mysql pcre pgsql sasl sqlite tls cdb
|
2007-04-29 21:27:35 +02:00
|
|
|
PKG_SUGGESTED_OPTIONS= tls
|
|
|
|
|
2004-07-30 23:05:41 +02:00
|
|
|
.include "../../mk/bsd.options.mk"
|
2004-07-19 21:59:16 +02:00
|
|
|
|
2004-11-30 21:54:38 +01:00
|
|
|
###
|
|
|
|
### Support "hash" (Berkeley DB) map type.
|
|
|
|
###
|
|
|
|
.if empty(PKG_OPTIONS:Mbdb)
|
|
|
|
PKG_OPTIONS+= bdb # "hash" map type is mandatory
|
|
|
|
.endif
|
|
|
|
.if !empty(PKG_OPTIONS:Mbdb)
|
|
|
|
. include "../../mk/bdb.buildlink3.mk"
|
|
|
|
CCARGS+= -DHAS_DB
|
2005-07-31 05:46:05 +02:00
|
|
|
AUXLIBS+= ${BDB_LIBS}
|
2004-11-30 21:54:38 +01:00
|
|
|
.endif
|
|
|
|
|
2004-08-07 19:05:00 +02:00
|
|
|
###
|
2005-03-28 09:07:49 +02:00
|
|
|
### STARTTLS support
|
2004-08-07 19:05:00 +02:00
|
|
|
###
|
2004-08-07 18:56:53 +02:00
|
|
|
.if !empty(PKG_OPTIONS:Mtls)
|
|
|
|
. include "../../security/openssl/buildlink3.mk"
|
2005-03-22 11:43:50 +01:00
|
|
|
CCARGS+= -DUSE_TLS
|
2004-07-19 21:59:16 +02:00
|
|
|
AUXLIBS+= -L${BUILDLINK_PREFIX.openssl}/lib \
|
2004-08-27 08:29:06 +02:00
|
|
|
${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.openssl}/lib \
|
2004-07-19 21:59:16 +02:00
|
|
|
-lssl -lcrypto
|
|
|
|
.endif
|
|
|
|
|
|
|
|
###
|
|
|
|
### Support "pcre" map type for regular expressions.
|
|
|
|
###
|
2004-07-30 23:05:41 +02:00
|
|
|
.if !empty(PKG_OPTIONS:Mpcre)
|
2004-07-19 21:59:16 +02:00
|
|
|
. include "../../devel/pcre/buildlink3.mk"
|
|
|
|
CCARGS+= -DHAS_PCRE
|
|
|
|
AUXLIBS+= -L${BUILDLINK_PREFIX.pcre}/lib \
|
2004-08-27 08:29:06 +02:00
|
|
|
${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.pcre}/lib \
|
2004-07-19 21:59:16 +02:00
|
|
|
-lpcre
|
|
|
|
.else
|
|
|
|
CCARGS+= -DNO_PCRE
|
|
|
|
.endif
|
|
|
|
|
|
|
|
###
|
|
|
|
### Support LDAP directories for table lookups.
|
|
|
|
###
|
2004-07-30 23:05:41 +02:00
|
|
|
.if !empty(PKG_OPTIONS:Mldap)
|
2006-05-31 20:22:23 +02:00
|
|
|
. include "../../databases/openldap-client/buildlink3.mk"
|
2004-07-19 21:59:16 +02:00
|
|
|
CCARGS+= -DHAS_LDAP
|
2006-05-31 20:22:23 +02:00
|
|
|
AUXLIBS+= -L${BUILDLINK_PREFIX.openldap-client}/lib \
|
|
|
|
${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.openldap-client}/lib \
|
2004-07-19 21:59:16 +02:00
|
|
|
-lldap -llber
|
|
|
|
.endif
|
|
|
|
|
|
|
|
###
|
|
|
|
### Support using a MySQL database server for table lookups.
|
|
|
|
###
|
2011-05-10 15:38:23 +02:00
|
|
|
.if !empty(PKG_OPTIONS:Mmysql)
|
2004-10-29 09:07:44 +02:00
|
|
|
. include "../../mk/mysql.buildlink3.mk"
|
2004-07-19 21:59:16 +02:00
|
|
|
CCARGS+= -DHAS_MYSQL -I${BUILDLINK_PREFIX.mysql-client}/include/mysql
|
|
|
|
AUXLIBS+= -L${BUILDLINK_PREFIX.mysql-client}/lib/mysql \
|
2004-08-27 08:29:06 +02:00
|
|
|
${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.mysql-client}/lib/mysql \
|
2004-07-19 21:59:16 +02:00
|
|
|
-lmysqlclient -lz -lm
|
|
|
|
.endif
|
|
|
|
|
2004-07-30 23:44:43 +02:00
|
|
|
###
|
|
|
|
### Support using a PostgreSQL database server for table lookups.
|
|
|
|
###
|
|
|
|
.if !empty(PKG_OPTIONS:Mpgsql)
|
|
|
|
. include "../../mk/pgsql.buildlink3.mk"
|
|
|
|
CCARGS+= -DHAS_PGSQL -I${PGSQL_PREFIX}/include/pgsql
|
2015-04-03 03:15:24 +02:00
|
|
|
AUXLIBS+= -L${PGSQL_PREFIX}/lib -lpq
|
2004-07-30 23:44:43 +02:00
|
|
|
.endif
|
2008-10-16 11:40:20 +02:00
|
|
|
|
|
|
|
###
|
|
|
|
### Support using a SQLite database for table lookups.
|
2008-10-16 11:49:13 +02:00
|
|
|
### See http://www.treibsand.com/postfix-sqlite/
|
2008-10-16 11:40:20 +02:00
|
|
|
###
|
|
|
|
.if !empty(PKG_OPTIONS:Msqlite)
|
|
|
|
. include "../../databases/sqlite3/buildlink3.mk"
|
|
|
|
CCARGS+= -DHAS_SQLITE -I${SQLITE3_PREFIX}/include/sqlite3
|
|
|
|
AUXLIBS+= -L${SQLITE3_PREFIX}/lib -lsqlite3
|
|
|
|
.endif
|
2004-07-19 21:59:16 +02:00
|
|
|
|
|
|
|
###
|
2008-01-16 15:21:39 +01:00
|
|
|
### Cyrus SASL support for SMTP authentication.
|
2008-01-17 14:47:01 +01:00
|
|
|
### (Dovecot SASL support is built in by default.)
|
2004-07-19 21:59:16 +02:00
|
|
|
###
|
2008-04-13 00:42:57 +02:00
|
|
|
PLIST_VARS+= csasl
|
2004-07-30 23:05:41 +02:00
|
|
|
.if !empty(PKG_OPTIONS:Msasl)
|
2006-04-13 23:45:12 +02:00
|
|
|
. include "../../security/cyrus-sasl/buildlink3.mk"
|
2004-08-07 09:58:32 +02:00
|
|
|
BUILDLINK_INCDIRS.cyrus-sasl= include/sasl
|
2004-07-19 22:34:50 +02:00
|
|
|
SASLLIBDIR= ${PREFIX}/lib/sasl2
|
|
|
|
PWCHECK_METHOD= auxprop
|
2008-01-16 15:21:39 +01:00
|
|
|
CCARGS+= -DUSE_CYRUS_SASL
|
2004-07-19 22:34:50 +02:00
|
|
|
AUXLIBS+= -L${BUILDLINK_PREFIX.cyrus-sasl}/lib \
|
2004-08-27 08:29:06 +02:00
|
|
|
${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.cyrus-sasl}/lib \
|
2004-07-19 22:34:50 +02:00
|
|
|
-lsasl2
|
2008-04-13 00:42:57 +02:00
|
|
|
PLIST.csasl= yes
|
2004-07-19 21:59:16 +02:00
|
|
|
MESSAGE_SRC+= ${PKGDIR}/MESSAGE.sasl
|
|
|
|
MESSAGE_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
|
|
|
|
MESSAGE_SUBST+= SASLLIBDIR=${SASLLIBDIR}
|
2008-01-25 10:42:54 +01:00
|
|
|
MAKE_DIRS+= ${SASLLIBDIR}
|
|
|
|
CONF_FILES+= ${EXAMPLEDIR}/smtpd.conf ${SASLLIBDIR}/smtpd.conf
|
2005-03-28 10:53:07 +02:00
|
|
|
.else
|
2008-01-16 15:21:39 +01:00
|
|
|
CCARGS+= -DDEF_SERVER_SASL_TYPE=\"dovecot\"
|
2007-02-20 17:49:29 +01:00
|
|
|
.endif
|
2008-06-03 12:30:51 +02:00
|
|
|
|
|
|
|
###
|
|
|
|
### Support CDB (Constant Database) map type.
|
|
|
|
###
|
|
|
|
.if !empty(PKG_OPTIONS:Mcdb)
|
|
|
|
. include "../../databases/tinycdb/buildlink3.mk"
|
|
|
|
CCARGS+= -DHAS_CDB
|
|
|
|
AUXLIBS+= -L${BUILDLINK_PREFIX.tinycdb}/lib \
|
|
|
|
${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.tinycdb}/lib \
|
|
|
|
-lcdb
|
|
|
|
.endif
|