Convert SASL_DBTYPE variable to option framework, and add gdbm support. Fixes db name extension in DEINSTALL script for other than ndbm. Bump PKGREVISION.diff -r1.9 -r1.10 pkgsrc/security/cyrus-sasl/DEINSTALL
(obache)
@@ -1,18 +1,18 @@ | @@ -1,18 +1,18 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh | |
2 | # | 2 | # | |
3 | # $NetBSD: DEINSTALL,v 1.9 2006/04/18 17:41:30 jlam Exp $ | 3 | # $NetBSD: DEINSTALL,v 1.10 2013/03/13 03:31:40 obache Exp $ | |
4 | 4 | |||
5 | SASLDB=@PKG_SYSCONFDIR@/sasldb.db | 5 | SASLDB=@PKG_SYSCONFDIR@/sasldb@DBEXT@ | |
6 | 6 | |||
7 | case ${STAGE} in | 7 | case ${STAGE} in | |
8 | POST-DEINSTALL) | 8 | POST-DEINSTALL) | |
9 | if ${TEST} -f ${SASLDB}; then | 9 | if ${TEST} -f ${SASLDB}; then | |
10 | ${CAT} << EOF | 10 | ${CAT} << EOF | |
11 | =========================================================================== | 11 | =========================================================================== | |
12 | You may want to remove the SASL password data file: | 12 | You may want to remove the SASL password data file: | |
13 | 13 | |||
14 | ${SASLDB} | 14 | ${SASLDB} | |
15 | =========================================================================== | 15 | =========================================================================== | |
16 | EOF | 16 | EOF | |
17 | fi | 17 | fi | |
18 | ;; | 18 | ;; |
@@ -1,38 +1,24 @@ | @@ -1,38 +1,24 @@ | |||
1 | # $NetBSD: Makefile,v 1.66 2012/12/20 22:52:37 joerg Exp $ | 1 | # $NetBSD: Makefile,v 1.67 2013/03/13 03:31:40 obache Exp $ | |
2 | 2 | |||
3 | PKGREVISION= 1 | 3 | PKGREVISION= 2 | |
4 | SVR4_PKGNAME= csasl | 4 | SVR4_PKGNAME= csasl | |
5 | COMMENT= Simple Authentication and Security Layer | 5 | COMMENT= Simple Authentication and Security Layer | |
6 | 6 | |||
7 | .include "Makefile.common" | 7 | .include "Makefile.common" | |
8 | 8 | |||
9 | CPPFLAGS+= -DPIC -fPIC | 9 | CPPFLAGS+= -DPIC -fPIC | |
10 | 10 | |||
11 | .if exists(/usr/include/ndbm.h) && ${OPSYS} != "Linux" | 11 | .include "options.mk" | |
12 | SASL_DBTYPE?= ndbm | |||
13 | .else | |||
14 | SASL_DBTYPE?= berkeley | |||
15 | .endif | |||
16 | BUILD_DEFS+= SASL_DBTYPE | |||
17 | ||||
18 | .if ${SASL_DBTYPE} == "berkeley" | |||
19 | BDB_ACCEPTED= db3 db4 db5 | |||
20 | . include "../../mk/bdb.buildlink3.mk" | |||
21 | CONFIGURE_ENV+= with_bdb=${BDB_TYPE} | |||
22 | .endif | |||
23 | ||||
24 | CONFIGURE_ARGS+= --with-dblib=${SASL_DBTYPE:Q} | |||
25 | CONFIGURE_ARGS+= --with-dbpath=${PKG_SYSCONFDIR}/sasldb | |||
26 | 12 | |||
27 | BUILD_DEFS+= VARBASE | 13 | BUILD_DEFS+= VARBASE | |
28 | 14 | |||
29 | # Support using Cyrus saslauthd (security/cyrus-saslauthd) for plaintext | 15 | # Support using Cyrus saslauthd (security/cyrus-saslauthd) for plaintext | |
30 | # password authentication. | 16 | # password authentication. | |
31 | # | 17 | # | |
32 | SASLSOCKETDIR?= ${VARBASE}/run/saslauthd | 18 | SASLSOCKETDIR?= ${VARBASE}/run/saslauthd | |
33 | CONFIGURE_ARGS+= --with-saslauthd=${SASLSOCKETDIR:Q} | 19 | CONFIGURE_ARGS+= --with-saslauthd=${SASLSOCKETDIR:Q} | |
34 | BUILD_DEFS+= SASLSOCKETDIR | 20 | BUILD_DEFS+= SASLSOCKETDIR | |
35 | # let not to build & install saslauthd here. | 21 | # let not to build & install saslauthd here. | |
36 | SUBST_CLASSES+= saslauthd | 22 | SUBST_CLASSES+= saslauthd | |
37 | SUBST_STAGE.saslauthd= pre-configure | 23 | SUBST_STAGE.saslauthd= pre-configure | |
38 | SUBST_FILES.saslauthd= Makefile.in | 24 | SUBST_FILES.saslauthd= Makefile.in |
# $NetBSD: options.mk,v 1.1 2013/03/13 03:31:40 obache Exp $
#
PKG_OPTIONS_VAR= PKG_OPTIONS.cyrus-sasl
PKG_OPTIONS_REQUIRED_GROUPS= database
PKG_OPTIONS_GROUP.database= ndbm bdb gdbm
.if defined(SASL_DBTYPE)
PKG_OPTIONS_DEPRECATED_WARNINGS+= "Deprecated SASL_DBTYPE variable used, use ${PKG_OPTIONS_VAR:Q} instead (${PKG_OPTIONS_GROUP.database:ts,:Q})."
. if !empty(SASL_DBTYPE:Mndbm)
PKG_SUGGESTED_OPTIONS+= ndbm
. elif !empty(SASL_DBTYPE:Mberkeley)
PKG_SUGGESTED_OPTIONS+= bdb
. else
PKG_FAIL_REASON+= "Unknown SASL_DBTYPE: ${SASL_DBTYPE:Q}"
. endif
.elif exists(/usr/include/ndbm.h) && ${OPSYS} != "Linux"
PKG_SUGGESTED_OPTIONS+= ndbm
.else
PKG_SUGGESTED_OPTIONS+= bdb
.endif
.include "../../mk/bsd.options.mk"
.if !empty(PKG_OPTIONS:Mndbm)
SASL_DBTYPE= ndbm
FILES_SUBST+= DBEXT=.db
.elif !empty(PKG_OPTIONS:Mbdb)
SASL_DBTYPE= berkeley
FILES_SUBST+= DBEXT=
BDB_ACCEPTED= db3 db4 db5
. include "../../mk/bdb.buildlink3.mk"
CONFIGURE_ENV+= with_bdb=${BDB_TYPE}
.elif !empty(PKG_OPTIONS:Mgdbm)
SASL_DBTYPE= gdbm
FILES_SUBST+= DBEXT=
. include "../../databases/gdbm/buildlink3.mk"
.endif
CONFIGURE_ARGS+= --with-dblib=${SASL_DBTYPE:Q}
CONFIGURE_ARGS+= --with-dbpath=${PKG_SYSCONFDIR}/sasldb