From 10a0e3c21753d93a0561ee29069fa88d6971c514 Mon Sep 17 00:00:00 2001 From: Hajimu UMEMOTO Date: Sun, 1 Jun 2003 04:21:06 +0000 Subject: - Make saslauthd a separate port to avoid dependency loop between cyrus-sasl2 and openldap. - Stop using configuration menu. I believe it ease to maintain consistency with other SASL related ports. --- security/cyrus-sasl2/Makefile | 127 +++++++------- security/cyrus-sasl2/files/patch-configure | 19 ++- security/cyrus-sasl2/files/saslauthd.sh | 74 --------- security/cyrus-sasl2/pkg-deinstall | 2 +- security/cyrus-sasl2/pkg-install | 2 +- security/cyrus-sasl2/pkg-message | 12 +- security/cyrus-sasl2/pkg-plist | 18 -- security/cyrus-sasl2/scripts/configure.sasl | 245 ---------------------------- 8 files changed, 80 insertions(+), 419 deletions(-) delete mode 100644 security/cyrus-sasl2/files/saslauthd.sh delete mode 100644 security/cyrus-sasl2/scripts/configure.sasl (limited to 'security/cyrus-sasl2') diff --git a/security/cyrus-sasl2/Makefile b/security/cyrus-sasl2/Makefile index 24e45ff218f0..e7cf12dc4366 100644 --- a/security/cyrus-sasl2/Makefile +++ b/security/cyrus-sasl2/Makefile @@ -7,7 +7,7 @@ PORTNAME= cyrus-sasl PORTVERSION= 2.1.13 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= security ipv6 MASTER_SITES= ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/ \ ftp://ftp.westbend.net/pub/cyrus-mail/ \ @@ -16,8 +16,6 @@ MASTER_SITES= ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/ \ MAINTAINER= ume@FreeBSD.org COMMENT= RFC 2222 SASL (Simple Authentication and Security Layer) -USE_SUBMAKE= yes - INSTALLS_SHLIB= yes DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}2 @@ -49,60 +47,75 @@ CONFIGURE_ARGS= --sysconfdir=${PREFIX}/etc \ --enable-static \ --enable-login \ --enable-auth-sasldb \ - --with-rc4=openssl - -SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \ - PREFIX="${PREFIX}" \ - TOUCH="${TOUCH}" \ - MKDIR="${MKDIR}" \ - REALCURDIR="${.CURDIR}" \ - WITHOUT_SASLAUTHD="${WITHOUT_SASLAUTHD}" \ - WITH_DB3="${WITH_DB3}" \ - WITH_DB4="${WITH_DB4}" \ - WITH_DB41="${WITH_DB41}" \ - WITH_MYSQL="${WITH_MYSQL}" \ - WITH_MYSQL40="${WITH_MYSQL40}" \ - WITH_MYSQL41="${WITH_MYSQL41}" \ - WITH_LDAP="${WITH_LDAP}" \ - WITH_LDAP21="${WITH_LDAP21}" + --with-rc4=openssl \ + --with-saslauthd + +.if defined(WITH_BDB_VER) +.if ${WITH_BDB_VER} == 41 +LIB_DEPENDS+= db41.1:${PORTSDIR}/databases/db41 +CONFIGURE_ARGS+=--with-bdb=db41 --with-bdb-incdir=${PREFIX}/include/db41 +.elif ${WITH_BDB_VER} == 4 +LIB_DEPENDS+= db4.0:${PORTSDIR}/databases/db4 +CONFIGURE_ARGS+=--with-bdb=db4 --with-bdb-incdir=${PREFIX}/include/db4 +.elif ${WITH_BDB_VER} == 3 +LIB_DEPENDS+= db3.3:${PORTSDIR}/databases/db3 +CONFIGURE_ARGS+=--with-bdb=db3 --with-bdb-incdir=${PREFIX}/include/db3 +.else +BROKEN= "WITH_BDB_VER must be 3, 4 or 41" +.endif +CONFIGURE_ARGS+=--with-dblib=berkeley --with-bdb-libdir=${PREFIX}/lib +SASLDB_NAME= sasldb2 +.else +CONFIGURE_ARGS+=--with-dblib=ndbm +SASLDB_NAME= sasldb2.db +.endif + +.if defined(WITH_MYSQL_VER) +.if ${WITH_MYSQL_VER} == 41 +LIB_DEPENDS+= mysqlclient.14:${PORTSDIR}/databases/mysql41-client +.elif ${WITH_MYSQL_VER} == 40 +LIB_DEPENDS+= mysqlclient.12:${PORTSDIR}/databases/mysql40-client +.elif ${WITH_MYSQL_VER} == 3 +LIB_DEPENDS+= mysqlclient.10:${PORTSDIR}/databases/mysql323-client +.else +BROKEN= "WITH_MYSQL_VER must be 3, 40 or 41" +.endif +CONFIGURE_ARGS+=--with-mysql=${PREFIX} +PLIST_SUB+= MYSQL="" +.else +PLIST_SUB+= MYSQL="@comment " +.endif .if defined(WITHOUT_OTP) -CONFIGURE_ARGS+= --disable-otp +CONFIGURE_ARGS+=--disable-otp OTP= "@comment " .endif .if defined(WITHOUT_CRAM) -CONFIGURE_ARGS+= --disable-cram +CONFIGURE_ARGS+=--disable-cram CRAM= "@comment " .endif .if defined(WITHOUT_DIGEST) -CONFIGURE_ARGS+= --disable-digest +CONFIGURE_ARGS+=--disable-digest DIGEST= "@comment " .endif .if defined(WITHOUT_NTLM) -CONFIGURE_ARGS+= --disable-ntlm +CONFIGURE_ARGS+=--disable-ntlm NTLM= "@comment " .else -CONFIGURE_ARGS+= --enable-ntlm -.endif - -.if defined(WITHOUT_SASLAUTHD) -CONFIGURE_ARGS+= --without-saslauthd -SASLAUTHD= "@comment " -.else -CONFIGURE_ARGS+= --with-saslauthd +CONFIGURE_ARGS+=--enable-ntlm .endif .if !defined(WITHOUT_GSSAPI) && defined(KRB5_HOME) && exists(${KRB5_HOME}/lib/libgssapi_krb5.a) -CONFIGURE_ARGS+= --enable-gssapi=${KRB5_HOME} +CONFIGURE_ARGS+=--enable-gssapi=${KRB5_HOME} .elif !defined(WITHOUT_GSSAPI) && defined(HEIMDAL_HOME) && exists(${HEIMDAL_HOME}/lib/libgssapi.a) -CONFIGURE_ARGS+= --enable-gssapi=${HEIMDAL_HOME} +CONFIGURE_ARGS+=--enable-gssapi=${HEIMDAL_HOME} .elif !defined(WITHOUT_GSSAPI) && defined(MAKE_KERBEROS5) && exists(/usr/lib/libkrb5.a) -CONFIGURE_ARGS+= --enable-gssapi +CONFIGURE_ARGS+=--enable-gssapi .else -CONFIGURE_ARGS+= --disable-gssapi +CONFIGURE_ARGS+=--disable-gssapi GSSAPI= "@comment " .endif @@ -112,24 +125,24 @@ GSSAPI= "@comment " .if ${OSVERSION} > 500105 .if defined(WITH_KERBEROS4) LIB_DEPENDS+= krb.2:${PORTSDIR}/security/krb4 -CONFIGURE_ARGS+= --enable-krb4=${LOCALBASE}/krb4 +CONFIGURE_ARGS+=--enable-krb4=${LOCALBASE}/krb4 .else -CONFIGURE_ARGS+= --disable-krb4 +CONFIGURE_ARGS+=--disable-krb4 EBONES= "@comment " .endif .elif exists(/usr/lib/libkrb.a) && defined(MAKE_KERBEROS4) && !defined(WITHOUT_KERBEROS4) -CONFIGURE_ARGS+= --enable-krb4 +CONFIGURE_ARGS+=--enable-krb4 .elif !exists(/usr/lib/libkrb.a) && defined(WITH_KERBEROS4) LIB_DEPENDS+= krb.2:${PORTSDIR}/security/krb4 -CONFIGURE_ARGS+= --enable-krb4=${LOCALBASE}/krb4 +CONFIGURE_ARGS+=--enable-krb4=${LOCALBASE}/krb4 .else -CONFIGURE_ARGS+= --disable-krb4 +CONFIGURE_ARGS+=--disable-krb4 EBONES= "@comment " .endif .include "${PORTSDIR}/security/openssl/bsd.openssl.mk" .if !defined(WITH_OPENSSL_BASE) -CONFIGURE_ARGS+= --with-openssl=${OPENSSLBASE} +CONFIGURE_ARGS+=--with-openssl=${OPENSSLBASE} .endif CONFIGURE_ENV+= LOCALBASE=${LOCALBASE} \ @@ -152,13 +165,10 @@ DOC2= ONEWS TODO draft-burdis-cat-srp-sasl-06.txt \ rfc2831.txt rfc2945.txt rfc3174.txt server-plugin-flow.fig \ testing.txt -SASLAUTHD_DOCS= AUTHORS COPYING ChangeLog INSTALL LDAP_SASLAUTHD NEWS README - HTDOCS= advanced appconvert gssapi index install macosx mechanisms \ options plugprog programming readme sysadmin upgrading PLIST_SUB= PREFIX=${PREFIX} \ - SASLAUTHD=${SASLAUTHD} \ OTP=${OTP} \ CRAM=${CRAM} \ DIGEST=${DIGEST} \ @@ -171,27 +181,17 @@ PKGDEINSTALL= ${WRKDIR}/pkg-deinstall PKGINSTALL= ${WRKDIR}/pkg-install PKGMESSAGE= ${WRKDIR}/pkg-message -pre-fetch: - @${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.sasl - -.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc) -.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc" -.endif - # Fix sasldb name in pkg-install/deinstall scripts post-patch: @${SED} -e "s;%%SASLDB%%;${SASLDB_NAME};g" \ - -e "s;%%PWCHECK_METHOD%%;${PWCHECK_METHOD};g" \ -e "s;%%CYRUS_USER%%;${CYRUS_USER};g" \ -e "s;%%CYRUS_GROUP%%;${CYRUS_GROUP};g" \ ${.CURDIR}/pkg-install > ${PKGINSTALL} @${SED} -e "s;%%SASLDB%%;${SASLDB_NAME};g" \ - -e "s;%%PWCHECK_METHOD%%;${PWCHECK_METHOD};g" \ -e "s;%%CYRUS_USER%%;${CYRUS_USER};g" \ -e "s;%%CYRUS_GROUP%%;${CYRUS_GROUP};g" \ ${.CURDIR}/pkg-deinstall > ${PKGDEINSTALL} - @${SED} -e "s;%%PWCHECK_METHOD%%;${PWCHECK_METHOD};g" \ - -e "s;%%PREFIX%%;${PREFIX};g" \ + @${SED} -e "s;%%PREFIX%%;${PREFIX};g" \ ${.CURDIR}/pkg-message > ${PKGMESSAGE} # Create Cyrus user and group @@ -203,14 +203,6 @@ post-install: ${MAN8PREFIX}/man/man8/saslpasswd2.8 ${INSTALL_MAN} ${WRKSRC}/utils/sasldblistusers2.8 \ ${MAN8PREFIX}/man/man8/sasldblistusers2.8 -.if !defined(WITHOUT_SASLAUTHD) - ${GZIP_CMD} ${MAN8PREFIX}/man/cat8/saslauthd.8 - @${SED} -e "s;%%PREFIX%%;${PREFIX};g" ${PWCHECK_SUB} \ - ${FILESDIR}/saslauthd.sh > ${PREFIX}/etc/rc.d/saslauthd.sh - @${CHMOD} 755 ${PREFIX}/etc/rc.d/saslauthd.sh - ${MKDIR} -m 770 /var/state/saslauthd - ${CHOWN} ${CYRUS_USER}:mail /var/state/saslauthd -.endif .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} @${MKDIR} ${DOCSDIR}/html @@ -223,18 +215,9 @@ post-install: .for file in ${HTDOCS} @${INSTALL_DATA} ${WRKSRC}/doc/${file}.html ${DOCSDIR}/html .endfor -.if !defined(WITHOUT_SASLAUTHD) - @${MKDIR} ${DOCSDIR}/saslauthd -.for file in ${SASLAUTHD_DOCS} - @${INSTALL_DATA} ${WRKSRC}/saslauthd/${file} ${DOCSDIR}/saslauthd -.endfor -.endif @${INSTALL_DATA} ${FILESDIR}/Sendmail.README ${DOCSDIR} .endif @PKG_PREFIX=${PREFIX} BATCH=${BATCH} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL @${CAT} ${PKGMESSAGE} -post-clean: - @${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc - .include diff --git a/security/cyrus-sasl2/files/patch-configure b/security/cyrus-sasl2/files/patch-configure index 10f6faea803e..f80f687b22b2 100644 --- a/security/cyrus-sasl2/files/patch-configure +++ b/security/cyrus-sasl2/files/patch-configure @@ -1,5 +1,7 @@ ---- configure.orig Mon Apr 14 20:07:48 2003 -+++ configure Tue Apr 15 01:39:33 2003 +Index: configure +diff -u configure.orig configure +--- configure.orig Tue Apr 15 03:07:48 2003 ++++ configure Tue May 27 17:29:16 2003 @@ -2652,7 +2652,7 @@ BDB_LIBADD="" fi @@ -18,7 +20,16 @@ do echo $ac_n "checking for db_create in -l$dbname""... $ac_c" 1>&6 echo "configure:3050: checking for db_create in -l$dbname" >&5 -@@ -5456,7 +5456,7 @@ +@@ -3761,6 +3761,8 @@ + SASLAUTHD_TRUE='#' + SASLAUTHD_FALSE= + fi ++SASLAUTHD_TRUE='#' ++SASLAUTHD_FALSE= + echo $ac_n "checking if I should include saslauthd""... $ac_c" 1>&6 + echo "configure:3766: checking if I should include saslauthd" >&5 + echo "$ac_t""$with_saslauthd" 1>&6 +@@ -5456,7 +5458,7 @@ echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" @@ -27,7 +38,7 @@ cat > conftest.$ac_ext <&2 - rc=64 - ;; - esac - ;; - *) - rc=0 - ;; -esac - -exit $rc diff --git a/security/cyrus-sasl2/pkg-deinstall b/security/cyrus-sasl2/pkg-deinstall index 605204426f06..7e4bb9b77a1a 100644 --- a/security/cyrus-sasl2/pkg-deinstall +++ b/security/cyrus-sasl2/pkg-deinstall @@ -41,7 +41,7 @@ delete_user() { sendmail_conf() { if [ -f ${PKG_PREFIX}/lib/sasl2/Sendmail.conf ]; then - echo "pwcheck_method: %%PWCHECK_METHOD%%" > ${PKG_PREFIX}/lib/sasl2/Sendmail.conf.tmp + echo "pwcheck_method: auxprop" > ${PKG_PREFIX}/lib/sasl2/Sendmail.conf.tmp if cmp -s ${PKG_PREFIX}/lib/sasl2/Sendmail.conf ${PKG_PREFIX}/lib/sasl2/Sendmail.conf.tmp; then rm -f ${PKG_PREFIX}/lib/sasl2/Sendmail.conf fi diff --git a/security/cyrus-sasl2/pkg-install b/security/cyrus-sasl2/pkg-install index 0ba4edab6ede..751b555b0bb3 100644 --- a/security/cyrus-sasl2/pkg-install +++ b/security/cyrus-sasl2/pkg-install @@ -95,7 +95,7 @@ create_sasldb() { sendmail_conf() { if [ ! -f ${PKG_PREFIX}/lib/sasl2/Sendmail.conf ]; then - echo "pwcheck_method: %%PWCHECK_METHOD%%" > ${PKG_PREFIX}/lib/sasl2/Sendmail.conf + echo "pwcheck_method: auxprop" > ${PKG_PREFIX}/lib/sasl2/Sendmail.conf fi } diff --git a/security/cyrus-sasl2/pkg-message b/security/cyrus-sasl2/pkg-message index fca1fb6b24cb..ab3dd8241a9a 100644 --- a/security/cyrus-sasl2/pkg-message +++ b/security/cyrus-sasl2/pkg-message @@ -8,10 +8,14 @@ or you can use sasldb2 for authentication, to add users use: saslpasswd2 -c username -If you want to enable SMTP AUTH with the system Sendmail, read Sendmail.README +If you want to enable SMTP AUTH with the system Sendmail, read +Sendmail.README NOTE: This port has been compiled with a default pwcheck_method of - %%PWCHECK_METHOD%%. Set sasl_pwcheck_method to %%PWCHECK_METHOD%%, - after installing the Cyrus-IMAPd 2.1.7 port. You should also check - the %%PREFIX%%/lib/sasl2/*.conf files for the correct pwcheck_method. + auxprop. If you want to authenticate your user by /etc/passwd, + PAM or LDAP, install ports/security/cyrus-sasl2-saslauthd and + set sasl_pwcheck_method to saslauthd after installing the + Cyrus-IMAPd 2.X port. You should also check the + %%PREFIX%%/lib/sasl2/*.conf files for the correct + pwcheck_method. diff --git a/security/cyrus-sasl2/pkg-plist b/security/cyrus-sasl2/pkg-plist index 96218d37e922..d6d8a6eb9d74 100644 --- a/security/cyrus-sasl2/pkg-plist +++ b/security/cyrus-sasl2/pkg-plist @@ -1,4 +1,3 @@ -%%SASLAUTHD%%etc/rc.d/saslauthd.sh include/sasl/hmac-md5.h include/sasl/md5.h include/sasl/md5global.h @@ -43,8 +42,6 @@ lib/sasl2/libplain.so.2 lib/sasl2/libsasldb.a lib/sasl2/libsasldb.so lib/sasl2/libsasldb.so.2 -%%SASLAUTHD%%man/cat8/saslauthd.8.gz -%%SASLAUTHD%%sbin/saslauthd sbin/sasldblistusers2 sbin/saslpasswd2 %%PORTDOCS%%%%DOCSDIR%%/AUTHORS @@ -93,22 +90,7 @@ sbin/saslpasswd2 %%PORTDOCS%%%%DOCSDIR%%/html/readme.html %%PORTDOCS%%%%DOCSDIR%%/html/sysadmin.html %%PORTDOCS%%%%DOCSDIR%%/html/upgrading.html -%%SASLAUTHD%%%%PORTDOCS%%%%DOCSDIR%%/saslauthd/AUTHORS -%%SASLAUTHD%%%%PORTDOCS%%%%DOCSDIR%%/saslauthd/COPYING -%%SASLAUTHD%%%%PORTDOCS%%%%DOCSDIR%%/saslauthd/ChangeLog -%%SASLAUTHD%%%%PORTDOCS%%%%DOCSDIR%%/saslauthd/INSTALL -%%SASLAUTHD%%%%PORTDOCS%%%%DOCSDIR%%/saslauthd/LDAP_SASLAUTHD -%%SASLAUTHD%%%%PORTDOCS%%%%DOCSDIR%%/saslauthd/NEWS -%%SASLAUTHD%%%%PORTDOCS%%%%DOCSDIR%%/saslauthd/README %%PORTDOCS%%@dirrm %%DOCSDIR%%/html -%%SASLAUTHD%%%%PORTDOCS%%@dirrm %%DOCSDIR%%/saslauthd %%PORTDOCS%%@dirrm %%DOCSDIR%% @dirrm lib/sasl2 -%%SASLAUTHD%%@mode ug=rwx,o= -%%SASLAUTHD%%@exec mkdir -p /var/state/saslauthd -%%SASLAUTHD%%@exec chown -R cyrus:cyrus /var/state -%%SASLAUTHD%%@exec chmod -R o= /var/state -%%SASLAUTHD%%@comment This file gets created by the state/saslauthd program -%%SASLAUTHD%%@unexec rm -fr /var/state/saslauthd -%%SASLAUTHD%%@unexec rmdir /var/state @cwd %%PREFIX%% diff --git a/security/cyrus-sasl2/scripts/configure.sasl b/security/cyrus-sasl2/scripts/configure.sasl deleted file mode 100644 index 76e2bf19dde7..000000000000 --- a/security/cyrus-sasl2/scripts/configure.sasl +++ /dev/null @@ -1,245 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -if [ -f ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc ]; then - exit -fi - -tempfile=`mktemp -t checklist` - -if [ "${BATCH}" ]; then - if [ "${WITH_DB41}" ]; then - OPTIONS="\"DB41\"" - elif [ "${WITH_DB4}" ]; then - OPTIONS="\"DB4\"" - elif [ "${WITH_DB3}" ]; then - OPTIONS="\"DB3\"" - else - OPTIONS="\"NDBM\"" - fi - if [ "${WITH_MYSQL41}" ]; then - OPTIONS="${OPTIONS} \"MySQL41\"" - elif [ "${WITH_MYSQL40}" ]; then - OPTIONS="${OPTIONS} \"MySQL40\"" - elif [ "${WITH_MYSQL}" ]; then - OPTIONS="${OPTIONS} \"MySQL\"" - fi - if [ "${WITH_LDAP21}" ]; then - OPTIONS="${OPTIONS} \"OpenLDAP21\"" - elif [ "${WITH_LDAP}" ]; then - OPTIONS="${OPTIONS} \"OpenLDAP\"" - fi - if [ "${OPTIONS}" != "x" ]; then - OPTIONS="${OPTIONS} \"SASLAUTHD\"" - set ${OPTIONS} - fi -else - SET_DB41="OFF" - SET_DB4="OFF" - SET_DB3="OFF" - SET_NDBM="OFF" - if [ "${WITH_DB41}" -o -f ${PREFIX}/lib/libdb41.so ] ; then - SET_DB41="ON" - elif [ "${WITH_DB4}" -o -f ${PREFIX}/lib/libdb4.so ] ; then - SET_DB4="ON" - elif [ "${WITH_DB3}" -o -f ${PREFIX}/lib/libdb3.so ] ; then - SET_DB3="ON" - else - SET_NDBM="ON" - fi - SET_MYSQL41="OFF" - SET_MYSQL40="OFF" - SET_MYSQL="OFF" - if [ "${WITH_MYSQL41}" -o -f ${PREFIX}/lib/mysql/libmysqlclient.so.14 ] ; then - SET_MYSQL41="ON" - elif [ "${WITH_MYSQL40}" -o -f ${PREFIX}/lib/mysql/libmysqlclient.so.12 ] ; then - SET_MYSQL40="ON" - elif [ "${WITH_MYSQL}" -o -f ${PREFIX}/lib/mysql/libmysqlclient.so ] ; then - SET_MYSQL="ON" - fi - SET_LDAP21="OFF" - SET_LDAP="OFF" - if [ "${WITH_LDAP21}" -o -f ${PREFIX}/lib/libldap.so.2 -a -f ${PREFIX}/lib/liblber.so.2 \ - -a -f ${PREFIX}/bin/ldapwhoami ] ; then - SET_LDAP21="ON" - elif [ "${WITH_LDAP}" -o -f ${PREFIX}/lib/libldap.so.2 -a -f ${PREFIX}/lib/liblber.so.2 ] ; then - SET_LDAP="ON" - fi - - /usr/bin/dialog --title "Additional SASL2 options" --clear \ - --checklist "\n\ -Please select desired options:" -1 -1 16 \ -NDBM "ndbm DB" ${SET_NDBM} \ -DB3 "Berkeley DB, revision 3" ${SET_DB3} \ -DB4 "Berkeley DB, revision 4" ${SET_DB4} \ -DB41 "Berkeley DB, revision 4.1" ${SET_DB41} \ -MySQL "MySQL 3.23 password Authentication" ${SET_MYSQL} \ -MySQL40 "MySQL 4.0 password Authentication" ${SET_MYSQL40} \ -MySQL41 "MySQL 4.1 password Authentication" ${SET_MYSQL41} \ -OpenLDAP "OpenLDAP 2.0 password Authentication w/TLS" ${SET_LDAP} \ -OpenLDAP21 "OpenLDAP 2.1 password Authentication w/TLS" ${SET_LDAP21} \ -SASLAUTHD "Use saslauthd for password Authentication" ON \ -2> $tempfile - - retval=$? - - if [ -s $tempfile ]; then - set `cat $tempfile` - fi - rm -f $tempfile - - case $retval in - 0) if [ -z "$*" ]; then - echo "Nothing selected" - OPTIONS="\"NDBM\"" - set ${OPTIONS} - fi - ;; - 1) echo "Cancel pressed." - exit 1 - ;; - esac -fi - -${MKDIR} ${WRKDIRPREFIX}${REALCURDIR} -exec > ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc - -echo "PREFIX= ${PREFIX}" - -while [ "$1" ]; do - case $1 in - \"NDBM\") - if [ "${DBLIB}" ]; then - echo "ndbm, db3, db4 and db41 are mutually exclusive." > /dev/stderr - rm -f ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc - exit 1 - fi - echo "CONFIGURE_ARGS+= --with-dblib=ndbm" - echo "SASLDB_NAME= sasldb2.db" - DBLIB=1 - ;; - \"DB41\") - if [ "${DBLIB}" ]; then - echo "ndbm, db3, db4 and db41 are mutually exclusive." > /dev/stderr - rm -f ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc - exit 1 - fi - echo "LIB_DEPENDS+= db41.1:\${PORTSDIR}/databases/db41" - echo "CONFIGURE_ARGS+= --with-dblib=berkeley --with-bdb=db41 --with-bdb-incdir=${PREFIX}/include/db41 --with-bdb-libdir=${PREFIX}/lib" - echo "SASLDB_NAME= sasldb2" - DBLIB=1 - ;; - \"DB4\") - if [ "${DBLIB}" ]; then - echo "ndbm, db3, db4 and db41 are mutually exclusive." > /dev/stderr - rm -f ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc - exit 1 - fi - echo "LIB_DEPENDS+= db4.0:\${PORTSDIR}/databases/db4" - echo "CONFIGURE_ARGS+= --with-dblib=berkeley --with-bdb=db4 --with-bdb-incdir=${PREFIX}/include/db4 --with-bdb-libdir=${PREFIX}/lib" - echo "SASLDB_NAME= sasldb2" - DBLIB=1 - ;; - \"DB3\") - if [ "${DBLIB}" ]; then - echo "ndbm, db3, db4 and db41 are mutually exclusive." > /dev/stderr - rm -f ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc - exit 1 - fi - echo "LIB_DEPENDS+= db3.3:\${PORTSDIR}/databases/db3" - echo "CONFIGURE_ARGS+= --with-dblib=berkeley --with-bdb=db3 --with-bdb-incdir=${PREFIX}/include/db3 --with-bdb-libdir=${PREFIX}/lib" - echo "SASLDB_NAME= sasldb2" - DBLIB=1 - ;; - \"MySQL41\") - if [ "${DEFMYSQL}" ]; then - echo "MySQL 3.23, 4.0 and 4.1 are mutually exclusive." > /dev/stderr - rm -f ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc - exit 1 - fi - echo "LIB_DEPENDS+= mysqlclient.14:\${PORTSDIR}/databases/mysql41-client" - DEFMYSQL=1 - ;; - \"MySQL40\") - if [ "${DEFMYSQL}" ]; then - echo "MySQL 3.23, 4.0 and 4.1 are mutually exclusive." > /dev/stderr - rm -f ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc - exit 1 - fi - echo "LIB_DEPENDS+= mysqlclient.12:\${PORTSDIR}/databases/mysql40-client" - DEFMYSQL=1 - ;; - \"MySQL\") - if [ "${DEFMYSQL}" ]; then - echo "MySQL 3.23, 4.0 and 4.1 are mutually exclusive." > /dev/stderr - rm -f ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc - exit 1 - fi - echo "LIB_DEPENDS+= mysqlclient.10:\${PORTSDIR}/databases/mysql323-client" - DEFMYSQL=1 - ;; - \"OpenLDAP21\") - if [ -n "${WITHOUT_SASLAUTHD}" ]; then - shift - continue - fi - if [ "${OPENLDAP}" ]; then - echo "OpenLDAP 2.0 and 2.1 are mutually exclusive." > /dev/stderr - rm -f ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc - exit 1 - fi - echo "LIB_DEPENDS+= ldap.2:\${PORTSDIR}/net/openldap21" - echo "LIB_DEPENDS+= lber.2:\${PORTSDIR}/net/openldap21" - echo "CONFIGURE_ARGS+= --with-ldap=\${PREFIX}" - OPENLDAP=1 - ;; - \"OpenLDAP\") - if [ -n "${WITHOUT_SASLAUTHD}" ]; then - shift - continue - fi - if [ "${OPENLDAP}" ]; then - echo "OpenLDAP 2.0 and 2.1 are mutually exclusive." > /dev/stderr - rm -f ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc - exit 1 - fi - echo "LIB_DEPENDS+= ldap.2:\${PORTSDIR}/net/openldap20" - echo "LIB_DEPENDS+= lber.2:\${PORTSDIR}/net/openldap20" - echo "CONFIGURE_ARGS+= --with-ldap=\${PREFIX}" - OPENLDAP=1 - ;; - \"SASLAUTHD\") - if [ -n "${WITHOUT_SASLAUTHD}" ]; then - shift - continue - fi - echo "PWCHECK_SUB+= -e \"s;%%PWCHECK%%;saslauthd;g\"" - PWCHECK=1 - ;; - *) - echo "Invalid option(s): $*" > /dev/stderr - rm -f ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc - exit 1 - ;; - esac - shift -done - -if [ "$PWCHECK" ]; then - echo "PWCHECK_SUB+= -e \"s;%%ENABLEPWCHECK%%;yes;g\"" - echo "PWCHECK_METHOD= saslauthd" -else - echo "PWCHECK_SUB+= -e \"s;%%PWCHECK%%;saslauthd;g\" \\" - echo " -e \"s;%%ENABLEPWCHECK%%;no;g\"" - echo "PWCHECK_METHOD= auxprop" -fi -if [ ! "${DBLIB}" ]; then - echo "CONFIGURE_ARGS+= --with-dblib=ndbm" - echo "SASLDB_NAME= sasldb2.db" -fi -if [ "${DEFMYSQL}" ]; then - echo "CONFIGURE_ARGS+= --with-mysql=\${PREFIX}" - echo "PLIST_SUB+= MYSQL=\"\"" -else - echo "PLIST_SUB+= MYSQL=\"@comment \"" -fi -- cgit v1.2.3