blob: be6e54a406713f6b102843e7023a29ef2daa022e (
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
|
# $NetBSD: options.mk,v 1.10 2014/02/13 11:39:05 fhajny Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.dbmail
PKG_SUPPORTED_OPTIONS= ldap sieve
PKG_OPTIONS_NONEMPTY_SETS= sql
PKG_OPTIONS_SET.sql= mysql pgsql sqlite
PKG_SUGGESTED_OPTIONS= mysql sieve
.include "../../mk/bsd.options.mk"
PLIST_VARS+= ldap mysql pgsql sieve sqlite
###
### MySQL database support
###
.if !empty(PKG_OPTIONS:Mmysql)
.include "../../mk/mysql.buildlink3.mk"
CONFIGURE_ARGS+= --with-mysql
PLIST.mysql= yes
INSTALLATION_DIRS+= ${DATADIR}/sql/mysql
.endif
###
### PostgreSQL database support
###
.if !empty(PKG_OPTIONS:Mpgsql)
.include "../../mk/pgsql.buildlink3.mk"
CONFIGURE_ARGS+= --with-pgsql
PLIST.pgsql= yes
INSTALLATION_DIRS+= ${DATADIR}/sql/postgresql
.endif
###
### SQLite database support
###
.if !empty(PKG_OPTIONS:Msqlite)
.include "../../databases/sqlite3/buildlink3.mk"
CONFIGURE_ARGS+= --with-sqlite
PLIST.sqlite= yes
INSTALLATION_DIRS+= ${DATADIR}/sql/sqlite
.endif
###
### Sieve support
###
.if !empty(PKG_OPTIONS:Msieve)
.include "../../mail/libsieve/buildlink3.mk"
CONFIGURE_ARGS+= --with-sieve=${BUILDLINK_PREFIX.libsieve}
PLIST.sieve= yes
FILES_SUBST+= TIMSIEVED="dbmailtimsieved"
RCD_SCRIPTS+= dbmailtimsieved
.else
FILES_SUBST+= TIMSIEVED=""
.endif
###
### LDAP support
###
.if !empty(PKG_OPTIONS:Mldap)
.include "../../databases/openldap-client/buildlink3.mk"
CONFIGURE_ARGS+= --with-ldap=${BUILDLINK_PREFIX.openldap-client}
PLIST.ldap= yes
.endif
###
### Migration scripts
###
post-install: dbmail-install-scripts
.PHONY: dbmail-install-scripts
dbmail-install-scripts:
.if !empty(PKG_OPTIONS:Mmysql)
${INSTALL_DATA} ${WRKSRC}/sql/mysql/* ${DESTDIR}${DATADIR}/sql/mysql
.endif
.if !empty(PKG_OPTIONS:Mpgsql)
${INSTALL_DATA} ${WRKSRC}/sql/postgresql/* ${DESTDIR}${DATADIR}/sql/postgresql
.endif
.if !empty(PKG_OPTIONS:Msqlite)
${INSTALL_DATA} ${WRKSRC}/sql/sqlite/* ${DESTDIR}${DATADIR}/sql/sqlite
.endif
|