2003-06-01 06:24:15 +02:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= saslauthd
|
2012-12-10 16:10:02 +01:00
|
|
|
PORTVERSION= 2.1.26
|
2009-05-15 03:17:58 +02:00
|
|
|
#PORTREVISION= 0
|
2003-06-01 06:24:15 +02:00
|
|
|
CATEGORIES= security ipv6
|
2013-02-17 17:44:12 +01:00
|
|
|
MASTER_SITES= ftp://ftp.cyrusimap.org/cyrus-sasl/
|
2003-06-01 06:24:15 +02:00
|
|
|
PKGNAMEPREFIX= cyrus-sasl-
|
|
|
|
DISTNAME= ${PKGNAMEPREFIX}${PORTVERSION}
|
|
|
|
|
|
|
|
MAINTAINER= ume@FreeBSD.org
|
|
|
|
COMMENT= SASL authentication server for cyrus-sasl2
|
|
|
|
|
2011-09-24 11:13:35 +02:00
|
|
|
LICENSE= BSD
|
|
|
|
LICENSE_FILE= ${WRKSRC}/COPYING
|
|
|
|
|
2012-12-10 16:10:02 +01:00
|
|
|
LIB_DEPENDS= sasl2:${PORTSDIR}/security/cyrus-sasl2
|
2003-06-01 06:24:15 +02:00
|
|
|
|
|
|
|
CYRUS_SASL2_DIR=${MASTERDIR}/../cyrus-sasl2
|
2010-10-28 23:00:21 +02:00
|
|
|
DISTINFO_FILE= ${CYRUS_SASL2_DIR}/distinfo
|
2003-06-01 06:24:15 +02:00
|
|
|
PATCHDIR= ${CYRUS_SASL2_DIR}/files
|
2011-09-24 11:13:35 +02:00
|
|
|
INSTALL_WRKSRC= ${WRKSRC}/saslauthd
|
2003-06-01 06:24:15 +02:00
|
|
|
DOCSDIR= ${PREFIX}/share/doc/cyrus-sasl2
|
|
|
|
|
2012-12-27 16:37:03 +01:00
|
|
|
|
2013-01-06 17:56:55 +01:00
|
|
|
# This doesn't work due to absence of .al support in our libtool
|
|
|
|
#USE_AUTOTOOLS= libtool
|
|
|
|
#LIBTOOLFILES= ${CONFIGURE_SCRIPT} saslauthd/configure
|
|
|
|
|
2008-10-13 17:10:44 +02:00
|
|
|
MAN8= saslauthd.8
|
|
|
|
|
2012-08-06 01:19:36 +02:00
|
|
|
USE_RC_SUBR= saslauthd
|
2003-08-28 19:44:28 +02:00
|
|
|
|
2003-09-01 12:44:42 +02:00
|
|
|
USE_OPENSSL= yes
|
2005-05-17 18:36:55 +02:00
|
|
|
GNU_CONFIGURE= yes
|
2003-06-01 06:24:15 +02:00
|
|
|
|
|
|
|
CONFIGURE_ARGS= --sysconfdir=${PREFIX}/etc \
|
|
|
|
--with-plugindir=${PREFIX}/lib/sasl2 \
|
|
|
|
--with-dbpath=${PREFIX}/etc/sasldb2 \
|
2013-01-08 16:15:57 +01:00
|
|
|
--with-lib-subdir=lib \
|
2003-06-01 06:24:15 +02:00
|
|
|
--includedir=${PREFIX}/include \
|
|
|
|
--enable-static \
|
|
|
|
--enable-login \
|
|
|
|
--enable-auth-sasldb \
|
|
|
|
--with-rc4=openssl \
|
2010-11-24 12:48:14 +01:00
|
|
|
--with-saslauthd=${SASLAUTHD_RUNPATH} \
|
|
|
|
--disable-krb4
|
2013-01-06 17:56:55 +01:00
|
|
|
CONFIGURE_ENV+= andrew_cv_runpath_switch=none
|
2003-06-01 06:24:15 +02:00
|
|
|
|
2012-06-13 18:47:43 +02:00
|
|
|
OPTIONS_DEFINE= BDB OPENLDAP HTTPFORM
|
|
|
|
OPENLDAP_DESC= Use OpenLDAP
|
|
|
|
HTTPFORM_DESC= Enable HTTP form authentication
|
2007-08-07 18:46:22 +02:00
|
|
|
|
2013-09-21 00:55:24 +02:00
|
|
|
NO_STAGE= yes
|
2007-08-07 18:46:22 +02:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2012-06-13 18:47:43 +02:00
|
|
|
.if ${PORT_OPTIONS:MBDB}
|
2007-08-07 18:46:22 +02:00
|
|
|
USE_BDB= yes
|
2008-10-13 17:10:44 +02:00
|
|
|
INVALID_BDB_VER=2
|
|
|
|
CONFIGURE_ARGS+=--with-dblib=berkeley \
|
|
|
|
--with-bdb-libdir=${BDB_LIB_DIR} \
|
2006-04-16 17:49:24 +02:00
|
|
|
--with-bdb-incdir=${BDB_INCLUDE_DIR} \
|
|
|
|
--with-bdb=${BDB_LIB_NAME}
|
2003-06-01 06:24:15 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--with-dblib=ndbm
|
|
|
|
.endif
|
|
|
|
|
2012-06-13 18:47:43 +02:00
|
|
|
.if ${PORT_OPTIONS:MOPENLDAP}
|
2003-06-01 06:24:15 +02:00
|
|
|
.if defined(WITH_OPENLDAP_VER)
|
2003-08-28 15:11:25 +02:00
|
|
|
WANT_OPENLDAP_VER= ${WITH_OPENLDAP_VER}
|
2003-06-01 06:24:15 +02:00
|
|
|
.endif
|
2003-08-28 15:11:25 +02:00
|
|
|
USE_OPENLDAP= yes
|
2004-05-07 12:13:37 +02:00
|
|
|
CONFIGURE_ARGS+=--with-ldap=${LOCALBASE}
|
2003-06-01 06:24:15 +02:00
|
|
|
.endif
|
|
|
|
|
2012-06-13 18:47:43 +02:00
|
|
|
.if ${PORT_OPTIONS:MHTTPFORM}
|
2006-05-19 22:45:37 +02:00
|
|
|
CONFIGURE_ARGS+=--enable-httpform
|
|
|
|
.endif
|
|
|
|
|
2006-09-17 07:25:21 +02:00
|
|
|
.if !defined(WITHOUT_GSSAPI) && defined(KRB5_HOME) && exists(${KRB5_HOME}/lib/libgssapi_krb5.so)
|
2004-11-24 17:35:34 +01:00
|
|
|
CONFIGURE_ARGS+=--enable-gssapi=${KRB5_HOME} --with-gss_impl=mit
|
2013-01-06 17:56:55 +01:00
|
|
|
LDFLAGS+= -R${KRB5_HOME}/lib
|
2003-06-01 06:24:15 +02:00
|
|
|
.elif !defined(WITHOUT_GSSAPI) && defined(HEIMDAL_HOME) && exists(${HEIMDAL_HOME}/lib/libgssapi.a)
|
2003-12-19 05:29:13 +01:00
|
|
|
CONFIGURE_ARGS+=--enable-gssapi=${HEIMDAL_HOME} --with-gss_impl=heimdal
|
2009-01-06 18:59:31 +01:00
|
|
|
.elif !defined(WITHOUT_GSSAPI) && exists(/usr/lib/libkrb5.a)
|
2013-01-06 17:56:55 +01:00
|
|
|
CONFIGURE_ARGS+=--enable-gssapi=/usr
|
|
|
|
CFLAGS+= -nostdinc -I/usr/include
|
2003-06-01 06:24:15 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-gssapi
|
|
|
|
.endif
|
|
|
|
|
2004-11-28 08:09:12 +01:00
|
|
|
.if ${OPENSSLBASE} == /usr
|
|
|
|
CONFIGURE_ARGS+=--with-openssl=yes
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--with-openssl=${OPENSSLBASE}
|
|
|
|
.endif
|
|
|
|
|
2005-12-26 15:52:22 +01:00
|
|
|
SASLAUTHD_RUNPATH?= /var/run/saslauthd
|
|
|
|
.if ${SASLAUTHD_RUNPATH} != /var/run/saslauthd
|
2004-05-12 18:12:11 +02:00
|
|
|
RUNPATH= "@comment "
|
|
|
|
.endif
|
|
|
|
|
2003-06-01 06:24:15 +02:00
|
|
|
CYRUS_USER?= cyrus
|
|
|
|
|
|
|
|
DOCS= AUTHORS COPYING ChangeLog INSTALL LDAP_SASLAUTHD NEWS README
|
|
|
|
|
|
|
|
PLIST_SUB= PREFIX=${PREFIX} \
|
2004-05-12 18:12:11 +02:00
|
|
|
DOCSDIR=${DOCSDIR:S/^${PREFIX}\///} \
|
|
|
|
RUNPATH=${RUNPATH}
|
2003-06-01 06:24:15 +02:00
|
|
|
|
2005-02-10 20:32:10 +01:00
|
|
|
SUB_LIST+= SASLAUTHD_RUNPATH=${SASLAUTHD_RUNPATH}
|
2003-08-28 19:44:28 +02:00
|
|
|
|
2003-06-01 06:24:15 +02:00
|
|
|
do-build:
|
2004-10-25 14:42:40 +02:00
|
|
|
cd ${WRKSRC}/include && ${MAKE}
|
2003-06-01 06:24:15 +02:00
|
|
|
cd ${WRKSRC}/sasldb && ${MAKE}
|
|
|
|
cd ${WRKSRC}/saslauthd && ${MAKE}
|
2004-11-30 17:42:36 +01:00
|
|
|
cd ${WRKSRC}/saslauthd && ${MAKE} saslcache
|
|
|
|
cd ${WRKSRC}/saslauthd && ${MAKE} testsaslauthd
|
2003-06-01 06:24:15 +02:00
|
|
|
|
|
|
|
post-install:
|
2004-11-30 17:42:36 +01:00
|
|
|
@${INSTALL_PROGRAM} ${WRKSRC}/saslauthd/saslcache \
|
|
|
|
${PREFIX}/sbin/saslcache
|
|
|
|
@${INSTALL_PROGRAM} ${WRKSRC}/saslauthd/testsaslauthd \
|
|
|
|
${PREFIX}/sbin/testsaslauthd
|
2005-12-26 15:52:22 +01:00
|
|
|
.if ${SASLAUTHD_RUNPATH} != /var/run/saslauthd
|
2004-05-12 18:12:11 +02:00
|
|
|
@${ECHO_MSG} ""
|
|
|
|
@${ECHO_MSG} "SASLAUTHD_RUNPATH was specified."
|
2008-10-13 17:10:44 +02:00
|
|
|
@${ECHO_MSG} "Make sure you create ${SASLAUTHD_RUNPATH}."
|
2004-05-12 18:12:11 +02:00
|
|
|
@${ECHO_MSG} ""
|
|
|
|
.else
|
|
|
|
${MKDIR} -m 770 ${SASLAUTHD_RUNPATH}
|
|
|
|
${CHOWN} ${CYRUS_USER}:mail ${SASLAUTHD_RUNPATH}
|
|
|
|
.endif
|
2012-06-13 18:47:43 +02:00
|
|
|
.if ${PORT_OPTIONS:MDOCS}
|
2003-06-01 06:24:15 +02:00
|
|
|
@${MKDIR} ${DOCSDIR}/saslauthd
|
|
|
|
.for file in ${DOCS}
|
|
|
|
@${INSTALL_DATA} ${WRKSRC}/saslauthd/${file} ${DOCSDIR}/saslauthd
|
|
|
|
.endfor
|
|
|
|
.endif
|
2003-07-20 08:29:25 +02:00
|
|
|
@PKG_PREFIX=${PREFIX} BATCH=${BATCH} ${SH} ${PKGINSTALL} ${PKGNAME} \
|
|
|
|
POST-INSTALL
|
2004-03-31 18:32:17 +02:00
|
|
|
@${CAT} ${PKGMESSAGE}
|
2003-06-01 06:24:15 +02:00
|
|
|
|
|
|
|
.include <bsd.port.post.mk>
|