summaryrefslogtreecommitdiff
path: root/security/cyrus-sasl/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'security/cyrus-sasl/Makefile')
-rw-r--r--security/cyrus-sasl/Makefile129
1 files changed, 102 insertions, 27 deletions
diff --git a/security/cyrus-sasl/Makefile b/security/cyrus-sasl/Makefile
index 1221fc6c8a3..a7aa43156b9 100644
--- a/security/cyrus-sasl/Makefile
+++ b/security/cyrus-sasl/Makefile
@@ -1,50 +1,125 @@
-# $NetBSD: Makefile,v 1.4 2000/12/08 14:32:00 wiz Exp $
+# $NetBSD: Makefile,v 1.5 2000/12/10 09:43:36 jlam Exp $
-DISTNAME= cyrus-sasl-1.5.24
-PKGNAME= ${DISTNAME}nb1
-CATEGORIES= security
-MASTER_SITES= ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/
+DISTNAME= cyrus-sasl-1.5.24
+PKGNAME= ${DISTNAME}nb2
+CATEGORIES= security
+MASTER_SITES= ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/ \
+ ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/OLD-VERSIONS/sasl/
-MAINTAINER= packages@netbsd.org
-HOMEPAGE= http://asg.web.cmu.edu/cyrus/imapd/
+MAINTAINER= jlam@netbsd.org
+HOMEPAGE= http://asg.web.cmu.edu/cyrus/imapd/
-GNU_CONFIGURE= yes
-USE_LIBTOOL= yes
+BUILD_DEPENDS+= automake:../../devel/automake
+
+GNU_CONFIGURE= # defined
+USE_SSL= # defined
+USE_GMAKE= # defined
+USE_LIBTOOL= # defined
LTCONFIG_OVERRIDE= ${WRKSRC}/config/ltconfig
.include "../../mk/bsd.prefs.mk"
-.if !exists(/usr/include/openssl/rc4.h)
-DEPENDS+= openssl-0.9.*:../../security/openssl
-CONFIGURE_ENV+= CPPFLAGS="-I${PREFIX}/include"
-.endif
+# CYRUS_USER username of the Cyrus administrator
+# CYRUS_GROUP group of the Cyrus administrator
+#
+CYRUS_USER?= cyrus
+CYRUS_GROUP?= mail
+
+BUILD_DEFS+= CYRUS_USER CYRUS_GROUP
+PLIST_SRC= ${PKGDIR}/PLIST.common
+
+CONFIGURE_ARGS+= --with-pwcheck=/var/pwcheck
+CONFIGURE_ARGS+= --with-dblib=ndbm
+CONFIGURE_ARGS+= --with-dbpath=/etc/sasldb
CONFIGURE_ARGS+= --with-plugindir=${PREFIX}/lib/sasl
+CONFIGURE_ARGS+= --with-rc4=${SSLBASE}
.if defined(USE_PAM)
CONFIGURE_ARGS+= --with-pam=${PREFIX}
DEPENDS+= PAM-*:../../security/PAM
.endif
-.if defined(CYRUS_USE_PWCHECK)
-CONFIGURE_ARGS+= --with-pwcheck
-.endif
-.if defined(KERBEROS) && (${KERBEROS} == 4)
-CONFIGURE_ARGS+= --enable-krb4=${PREFIX}
+
+# Authentication mechanisms
+CONFIGURE_ARGS+= --enable-anon # ANONYMOUS
+CONFIGURE_ARGS+= --enable-cram # CRAM-MD5
+CONFIGURE_ARGS+= --enable-digest # DIGEST-MD5
+CONFIGURE_ARGS+= --disable-login # --- no LOGIN
+CONFIGURE_ARGS+= --enable-plain # PLAIN
+CONFIGURE_ARGS+= --disable-scram # --- no SCRAM-MD5
+CONFIGURE_ARGS+= --disable-sia # --- no SIA
+CONFIGURE_ARGS+= --disable-srp # --- no SRP
+CONFIGURE_ARGS+= --disable-x509 # --- no X.509
+
+.if defined(KERBEROS) && ${KERBEROS} == 4
+CONFIGURE_ARGS+= --enable-krb4=${PREFIX} # KERBEROS_V4
DEPENDS+= kth-krb4-*:../../security/kth-krb4
+PLIST_SRC+= ${PKGDIR}/PLIST.krb4
.else
-CONFIGURE_ARGS+= --disable-krb4
+CONFIGURE_ARGS+= --disable-krb4 # --- no KERBEROS_V4
.endif
-PLIST_SRC= ${WRKDIR}/.PLIST_SRC
+.if ${OPSYS} == "SunOS" || (defined(KERBEROS) && ${KERBEROS} == 5)
+USE_KERBEROS= # defined
+CONFIGURE_ARGS+= --enable-gssapi=/usr # GSSAPI
+PLIST_SRC+= ${PKGDIR}/PLIST.krb5
+.else
+CONFIGURE_ARGS+= --disable-gssapi # --- no GSSAPI
+.endif
-post-build:
- ${ECHO} > ${PLIST_SRC}
-.if defined(CYRUS_USE_PWCHECK)
- ${CAT} ${PKGDIR}/PLIST.pwcheck >> ${PLIST_SRC}
+PLIST_SRC+= ${PKGDIR}/PLIST.plugins
+
+.if ${OPSYS} == "NetBSD"
+.if exists(/usr/sbin/user)
+ADDUSER= /usr/sbin/useradd
+ADDGROUP= /usr/sbin/groupadd
+.else
+DEPENDS+= user>=20000313:../../sysutils/user
+ADDUSER= ${LOCALBASE}/sbin/useradd
+ADDGROUP= ${LOCALBASE}/sbin/groupadd
.endif
-.if defined(KERBEROS) && (${KERBEROS} == 4)
- ${CAT} ${PKGDIR}/PLIST.krb4 >> ${PLIST_SRC}
+.elif ${OPSYS} == "SunOS"
+ADDUSER= useradd
+ADDGROUP= groupadd
.endif
- ${CAT} ${PKGDIR}/PLIST.common ${PKGDIR}/PLIST.${LOWER_OPSYS} >> ${PLIST_SRC}
+
+DEINSTALL_FILE= ${WRKDIR}/DEINSTALL
+INSTALL_FILE= ${WRKDIR}/INSTALL
+
+HTMLDIR= ${PREFIX}/share/doc/html/cyrus-sasl
+
+post-extract:
+ cd ${WRKSRC}; ${RM} -f include/md5.h
+ ${CP} ${FILESDIR}/sasl-config.in ${WRKSRC}/plugins
+
+pre-configure:
+ cd ${WRKSRC} && autoheader && autoconf && automake --gnu
+
+post-build:
+ ${SED} -e "s,@PREFIX@,${PREFIX},g" \
+ < ${FILESDIR}/pwcheck.sh > ${WRKDIR}/pwcheck.sh
+
+pre-install:
+ ${SED} -e "s,@CYRUS_USER@,${CYRUS_USER},g" \
+ -e "s,@CYRUS_GROUP@,${CYRUS_GROUP},g" \
+ < ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE}
+ ${SED} -e "s,@CYRUS_USER@,${CYRUS_USER},g" \
+ -e "s,@CYRUS_GROUP@,${CYRUS_GROUP},g" \
+ -e "s,@ADDUSER@,${ADDUSER},g" \
+ -e "s,@CHGRP@,${CHGRP},g" \
+ -e "s,@CHMOD@,${CHMOD},g" \
+ -e "s,@CHOWN@,${CHOWN},g" \
+ -e "s,@GREP@,${GREP},g" \
+ -e "s,@MKDIR@,${MKDIR},g" \
+ -e "s,@RM@,${RM},g" \
+ -e "s,@TOUCH@,${TOUCH},g" \
+ < ${PKGDIR}/INSTALL > ${INSTALL_FILE}
+ PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} PRE-INSTALL
+
+post-install:
+ ${INSTALL_SCRIPT} ${WRKDIR}/pwcheck.sh ${PREFIX}/etc/rc.d/pwcheck
+ ${INSTALL_DATA_DIR} ${HTMLDIR}
+ cd ${WRKSRC}/doc; ${INSTALL_DATA} *.html *.txt ${HTMLDIR}
+ PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL
.include "../../mk/bsd.pkg.mk"