From ab399f9c20387f0e8629125679f97e82613cc5a9 Mon Sep 17 00:00:00 2001 From: jlam Date: Fri, 30 Jul 2004 21:05:41 +0000 Subject: Convert to use bsd.options.mk. The relevant options variable to set for each package can be determined by invoking: make show-var VARNAME=PKG_OPTIONS_VAR The old options are still supported unless the variable named in PKG_OPTIONS_VAR is set within make(1) (usually via /etc/mk.conf). --- security/cyrus-saslauthd/Makefile | 35 ++-------------- security/cyrus-saslauthd/Makefile.options | 68 +++++++++++++++++++++++++++++++ security/cyrus-saslauthd/PLIST | 4 +- security/cyrus-saslauthd/PLIST.ldap | 3 -- 4 files changed, 75 insertions(+), 35 deletions(-) create mode 100644 security/cyrus-saslauthd/Makefile.options delete mode 100644 security/cyrus-saslauthd/PLIST.ldap (limited to 'security/cyrus-saslauthd') diff --git a/security/cyrus-saslauthd/Makefile b/security/cyrus-saslauthd/Makefile index ee328de2feb..7b849e5dd62 100644 --- a/security/cyrus-saslauthd/Makefile +++ b/security/cyrus-saslauthd/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.15 2004/07/25 04:35:14 grant Exp $ +# $NetBSD: Makefile,v 1.16 2004/07/30 21:05:42 jlam Exp $ DISTNAME= cyrus-sasl-2.1.18 PKGNAME= ${DISTNAME:S/sasl/saslauthd/} @@ -23,41 +23,15 @@ COMMENT= Cyrus SASL plaintext authentication daemon USE_BUILDLINK3= yes GNU_CONFIGURE= yes CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR} -PLIST_SRC= ${PKGDIR}/PLIST ALL_TARGET= all saslcache testsaslauthd -BUILD_DEFS+= USE_PAM USE_OPENLDAP SASL_USE_GSSAPI - SASLSOCKETDIR?= ${VARBASE}/run/saslauthd BUILD_DEFS+= SASLSOCKETDIR FILES_SUBST+= SASLSOCKETDIR=${SASLSOCKETDIR} CONFIGURE_ARGS+= --with-saslauthd="${SASLSOCKETDIR}" -.if defined(USE_PAM) -. include "../../security/PAM/buildlink3.mk" -CONFIGURE_ARGS+= --with-pam=${BUILDLINK_PREFIX.pam} -.endif - -.if defined(USE_OPENLDAP) && !empty(USE_OPENLDAP:M[Yy][Ee][Ss]) -. include "../../databases/openldap/buildlink3.mk" -. include "../../security/cyrus-sasl2/buildlink3.mk" -BUILDLINK_INCDIRS.cyrus-sasl= include/sasl -CONFIGURE_ARGS+= --with-ldap=${BUILDLINK_PREFIX.openldap} -CONFIGURE_ARGS+= --with-openssl=${SSLBASE} -PLIST_SRC+= ${PKGDIR}/PLIST.ldap -.endif - -.if defined(KERBEROS) -SASL_USE_GSSAPI= yes -.endif -.if (defined(SASL_USE_GSSAPI) && !empty(SASL_USE_GSSAPI:M[yY][eE][sS])) -. include "../../mk/krb5.buildlink3.mk" -CONFIGURE_ARGS+= --enable-gssapi=${KRB5BASE} -CONFIGURE_ARGS+= --with-gss_impl=${GSSIMPL.${KRB5_TYPE}} -GSSIMPL.heimdal= heimdal -GSSIMPL.mit-krb5= mit -.endif +.include "Makefile.options" USE_PKGINSTALL= yes DEINSTALL_EXTRA_TMPL= ${PKGDIR}/DEINSTALL @@ -80,11 +54,10 @@ post-install: for f in saslcache testsaslauthd; do \ ${INSTALL_PROGRAM} ${WRKSRC}/$$f ${PREFIX}/bin/$$f; \ done -.if defined(USE_OPENLDAP) && !empty(USE_OPENLDAP:M[Yy][Ee][Ss]) +.if !empty(PKG_OPTIONS:Mldap) ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/cyrus-saslauthd - ${INSTALL_DATA} ${WRKSRC}/LDAP_SASLAUTHD \ + ${INSTALL_DATA} ${WRKSRC}/LDAP_SASLAUTHD \ ${PREFIX}/share/doc/cyrus-saslauthd .endif -.include "../../security/openssl/buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/security/cyrus-saslauthd/Makefile.options b/security/cyrus-saslauthd/Makefile.options new file mode 100644 index 00000000000..25bb5dc61a7 --- /dev/null +++ b/security/cyrus-saslauthd/Makefile.options @@ -0,0 +1,68 @@ +# $NetBSD: Makefile.options,v 1.1 2004/07/30 21:05:42 jlam Exp $ + +# Global and legacy options +.if defined(KERBEROS) || defined(USE_PAM) || defined(USE_OPENLDAP) || \ + defined(SASL_USE_GSSAPI) +. if !defined(PKG_OPTIONS.cyrus-saslauthd) +. if defined(KERBEROS) +PKG_OPTIONS.cyrus-saslauthd+= kerberos +. endif +. if defined(USE_PAM) && !empty(USE_PAM:M[yY][eE][sS]) +PKG_OPTIONS.cyrus-saslauthd+= PAM +. endif +. if defined(USE_OPENLDAP) && !empty(USE_OPENLDAP:M[yY][eE][sS]) +PKG_OPTIONS.cyrus-saslauthd+= ldap +. endif +. if defined(SASL_USE_GSSAPI) && !empty(SASL_USE_GSSAPI:M[yY][eE][sS]) +PKG_OPTIONS.cyrus-saslauthd+= gssapi +. endif +. endif +.endif + +PKG_OPTIONS_VAR= PKG_OPTIONS.cyrus-saslauthd +PKG_SUPPORTED_OPTIONS= PAM kerberos ldap gssapi +.include "../../mk/bsd.options.mk" + +### +### PAM (Pluggable Authentication Mechanism) +### +.if !empty(PKG_OPTIONS:MPAM) +. include "../../security/PAM/buildlink3.mk" +CONFIGURE_ARGS+= --with-pam=${BUILDLINK_PREFIX.pam} +.endif + +### +### Authentication against information stored in an LDAP directory +### +.if !empty(PKG_OPTIONS:Mldap) +. include "../../databases/openldap/buildlink3.mk" +. include "../../security/cyrus-sasl2/buildlink3.mk" +. include "../../security/openssl/buildlink3.mk" +BUILDLINK_INCDIRS.cyrus-sasl= include/sasl +CONFIGURE_ARGS+= --with-ldap=${BUILDLINK_PREFIX.openldap} +CONFIGURE_ARGS+= --with-openssl=${SSLBASE} +PLIST_SUBST+= LDAP= +.else +CONFIGURE_ARGS+= --without-openssl +PLIST_SUBST+= LDAP="@comment " +.endif + +### +### Kerberos authentication is via GSSAPI. +### +.if !empty(PKG_OPTIONS:Mkerberos) +. if empty(PKG_OPTIONS:Mgssapi) +PKG_OPTIONS+= gssapi +. endif +.endif + +### +### Authentication via GSSAPI (which supports primarily Kerberos 5) +### +.if !empty(PKG_OPTIONS:Mgssapi) +. include "../../mk/krb5.buildlink3.mk" +CONFIGURE_ARGS+= --enable-gssapi=${KRB5BASE} +CONFIGURE_ARGS+= --with-gss_impl=${GSSIMPL.${KRB5_TYPE}} +GSSIMPL.heimdal= heimdal +GSSIMPL.mit-krb5= mit +.endif diff --git a/security/cyrus-saslauthd/PLIST b/security/cyrus-saslauthd/PLIST index 578a945e3b2..e68e6f3ad14 100644 --- a/security/cyrus-saslauthd/PLIST +++ b/security/cyrus-saslauthd/PLIST @@ -1,5 +1,7 @@ -@comment $NetBSD: PLIST,v 1.4 2004/04/23 22:07:58 reed Exp $ +@comment $NetBSD: PLIST,v 1.5 2004/07/30 21:05:42 jlam Exp $ bin/saslcache bin/testsaslauthd man/man8/saslauthd.8 sbin/saslauthd +${LDAP}share/doc/cyrus-saslauthd/LDAP_SASLAUTHD +${LDAP}@dirrm share/doc/cyrus-saslauthd diff --git a/security/cyrus-saslauthd/PLIST.ldap b/security/cyrus-saslauthd/PLIST.ldap deleted file mode 100644 index 85d4f30be66..00000000000 --- a/security/cyrus-saslauthd/PLIST.ldap +++ /dev/null @@ -1,3 +0,0 @@ -@comment $NetBSD: PLIST.ldap,v 1.2 2004/01/13 08:13:42 jlam Exp $ -share/doc/cyrus-saslauthd/LDAP_SASLAUTHD -@dirrm share/doc/cyrus-saslauthd -- cgit v1.2.3