mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 17:59:20 -04:00
Add saslauthd as a separated port from cyrus-sasl2 to avoid
dependency loop between cyrus-sasl2 and openldap.
This commit is contained in:
parent
10a0e3c217
commit
73cde847fe
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=81851
5 changed files with 241 additions and 0 deletions
|
@ -45,6 +45,7 @@
|
|||
SUBDIR += cryptplug
|
||||
SUBDIR += cyrus-sasl
|
||||
SUBDIR += cyrus-sasl2
|
||||
SUBDIR += cyrus-sasl2-saslauthd
|
||||
SUBDIR += ddos_scan
|
||||
SUBDIR += didentd
|
||||
SUBDIR += digest
|
||||
|
|
137
security/cyrus-sasl2-saslauthd/Makefile
Normal file
137
security/cyrus-sasl2-saslauthd/Makefile
Normal file
|
@ -0,0 +1,137 @@
|
|||
# New ports collection makefile for: cyrus-sasl2-saslauthd
|
||||
# Date created: May 27 2003
|
||||
# Whom: ume@FreeBSD.org
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= saslauthd
|
||||
PORTVERSION= 2.1.13
|
||||
#PORTREVISION= 0
|
||||
CATEGORIES= security ipv6
|
||||
MASTER_SITES= ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/ \
|
||||
ftp://ftp.westbend.net/pub/cyrus-mail/ \
|
||||
ftp://ftp.hanse.de/sites/transit/mirror/ftp.andrew.cmu.edu/pub/cyrus-mail/
|
||||
PKGNAMEPREFIX= cyrus-sasl-
|
||||
DISTNAME= ${PKGNAMEPREFIX}${PORTVERSION}
|
||||
|
||||
MAINTAINER= ume@FreeBSD.org
|
||||
COMMENT= SASL authentication server for cyrus-sasl2
|
||||
|
||||
LIB_DEPENDS= sasl2.2:${PORTSDIR}/security/cyrus-sasl2
|
||||
|
||||
CYRUS_SASL2_DIR=${MASTERDIR}/../cyrus-sasl2
|
||||
MD5_FILE= ${CYRUS_SASL2_DIR}/distinfo
|
||||
PATCHDIR= ${CYRUS_SASL2_DIR}/files
|
||||
INSTALL_WRKSRC= ${WRKDIR}/${DISTNAME}/saslauthd
|
||||
DOCSDIR= ${PREFIX}/share/doc/cyrus-sasl2
|
||||
|
||||
GNU_CONFIGURE= YES
|
||||
|
||||
CONFIGURE_ARGS= --sysconfdir=${PREFIX}/etc \
|
||||
--with-plugindir=${PREFIX}/lib/sasl2 \
|
||||
--with-dbpath=${PREFIX}/etc/sasldb2 \
|
||||
--includedir=${PREFIX}/include \
|
||||
--mandir=${MANPREFIX}/man \
|
||||
--enable-static \
|
||||
--enable-login \
|
||||
--enable-auth-sasldb \
|
||||
--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
|
||||
.else
|
||||
CONFIGURE_ARGS+=--with-dblib=ndbm
|
||||
.endif
|
||||
|
||||
.if defined(WITH_OPENLDAP_VER)
|
||||
.if ${WITH_OPENLDAP_VER} == 20 || ${WITH_OPENLDAP_VER} == 21
|
||||
LIB_DEPENDS+= ldap.2:${PORTSDIR}/net/openldap${WITH_OPENLDAP_VER}
|
||||
LIB_DEPENDS+= lber.2:${PORTSDIR}/net/openldap${WITH_OPENLDAP_VER}
|
||||
CONFIGURE_ARGS+=--with-ldap=${PREFIX}
|
||||
.else
|
||||
BROKEN= "WITH_OPENLDAP_VER must be 20 or 21"
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.if !defined(WITHOUT_GSSAPI) && defined(KRB5_HOME) && exists(${KRB5_HOME}/lib/libgssapi_krb5.a)
|
||||
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}
|
||||
.elif !defined(WITHOUT_GSSAPI) && defined(MAKE_KERBEROS5) && exists(/usr/lib/libkrb5.a)
|
||||
CONFIGURE_ARGS+=--enable-gssapi
|
||||
.else
|
||||
CONFIGURE_ARGS+=--disable-gssapi
|
||||
GSSAPI= "@comment "
|
||||
.endif
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
# KERBEROS 4 was removed in FreeBSD 5.0-CURRENT
|
||||
.if ${OSVERSION} > 500105
|
||||
.if defined(WITH_KERBEROS4)
|
||||
LIB_DEPENDS+= krb.2:${PORTSDIR}/security/krb4
|
||||
CONFIGURE_ARGS+=--enable-krb4=${LOCALBASE}/krb4
|
||||
.else
|
||||
CONFIGURE_ARGS+=--disable-krb4
|
||||
EBONES= "@comment "
|
||||
.endif
|
||||
.elif exists(/usr/lib/libkrb.a) && defined(MAKE_KERBEROS4) && !defined(WITHOUT_KERBEROS4)
|
||||
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
|
||||
.else
|
||||
CONFIGURE_ARGS+=--disable-krb4
|
||||
EBONES= "@comment "
|
||||
.endif
|
||||
|
||||
.include "${PORTSDIR}/security/openssl/bsd.openssl.mk"
|
||||
.if !defined(WITH_OPENSSL_BASE)
|
||||
CONFIGURE_ARGS+=--with-openssl=${OPENSSLBASE}
|
||||
.endif
|
||||
|
||||
CONFIGURE_ENV+= LOCALBASE=${LOCALBASE} \
|
||||
OPENSSLINC=${OPENSSLINC} \
|
||||
OPENSSLLIB=${OPENSSLLIB} \
|
||||
LDFLAGS=${LDFLAGS}
|
||||
|
||||
CYRUS_USER?= cyrus
|
||||
|
||||
DOCS= AUTHORS COPYING ChangeLog INSTALL LDAP_SASLAUTHD NEWS README
|
||||
|
||||
PLIST_SUB= PREFIX=${PREFIX} \
|
||||
DOCSDIR=${DOCSDIR:S/^${PREFIX}\///}
|
||||
|
||||
do-build:
|
||||
cd ${WRKSRC}/sasldb && ${MAKE}
|
||||
cd ${WRKSRC}/saslauthd && ${MAKE}
|
||||
|
||||
post-install:
|
||||
${GZIP_CMD} ${MAN8PREFIX}/man/cat8/saslauthd.8
|
||||
@${SED} -e "s;%%PREFIX%%;${PREFIX};g" \
|
||||
${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
|
||||
.if !defined(NOPORTDOCS)
|
||||
@${MKDIR} ${DOCSDIR}/saslauthd
|
||||
.for file in ${DOCS}
|
||||
@${INSTALL_DATA} ${WRKSRC}/saslauthd/${file} ${DOCSDIR}/saslauthd
|
||||
.endfor
|
||||
.endif
|
||||
|
||||
.include <bsd.port.post.mk>
|
74
security/cyrus-sasl2-saslauthd/files/saslauthd.sh
Normal file
74
security/cyrus-sasl2-saslauthd/files/saslauthd.sh
Normal file
|
@ -0,0 +1,74 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD: /tmp/pcvs/ports/security/cyrus-sasl2-saslauthd/files/Attic/saslauthd.sh,v 1.1 2003-06-01 04:24:15 ume Exp $
|
||||
#
|
||||
|
||||
action=$1
|
||||
|
||||
PREFIX=%%PREFIX%%
|
||||
|
||||
# Suck in the configuration variables.
|
||||
if [ -z "${source_rc_confs_defined}" ]; then
|
||||
if [ -r /etc/defaults/rc.conf ]; then
|
||||
. /etc/defaults/rc.conf
|
||||
source_rc_confs
|
||||
elif [ -r /etc/rc.conf ]; then
|
||||
. /etc/rc.conf
|
||||
fi
|
||||
fi
|
||||
|
||||
# The following sasl_saslauthd_* variables may be defined in rc.conf
|
||||
#
|
||||
# sasl_saslauthd_enable - Set to YES to enable saslauthd
|
||||
# Default: YES
|
||||
#
|
||||
# sasl_saslauthd_program - Path to saslauthd program
|
||||
# Default: ${PREFIX}/sbin/saslauthd
|
||||
#
|
||||
# sasl_saslauthd_flags - Flags to saslauthd program
|
||||
# Default: -a pam
|
||||
|
||||
if [ -z "${sasl_saslauthd_enable}" ]; then
|
||||
sasl_saslauthd_enable="YES"
|
||||
fi
|
||||
|
||||
if [ -z "${sasl_saslauthd_program}" ]; then
|
||||
sasl_saslauthd_program="${PREFIX}/sbin/saslauthd"
|
||||
fi
|
||||
|
||||
if [ -z "${sasl_saslauthd_flags}" ]; then
|
||||
sasl_saslauthd_flags="-a pam"
|
||||
fi
|
||||
|
||||
rc=0
|
||||
|
||||
case "${sasl_saslauthd_enable}" in
|
||||
[Yy][Ee][Ss])
|
||||
case "${action}" in
|
||||
|
||||
start)
|
||||
if [ -x ${sasl_saslauthd_program} ] ; then
|
||||
${sasl_saslauthd_program} ${sasl_saslauthd_flags} \
|
||||
&& echo -n " saslauthd"
|
||||
fi
|
||||
;;
|
||||
|
||||
stop)
|
||||
if [ -r /var/state/saslauthd/saslauthd.pid ]; then
|
||||
kill `cat /var/state/saslauthd/saslauthd.pid` && \
|
||||
echo -n " saslauthd"
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "usage: $0 {start|stop}" 1>&2
|
||||
rc=64
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
rc=0
|
||||
;;
|
||||
esac
|
||||
|
||||
exit $rc
|
10
security/cyrus-sasl2-saslauthd/pkg-descr
Normal file
10
security/cyrus-sasl2-saslauthd/pkg-descr
Normal file
|
@ -0,0 +1,10 @@
|
|||
saslauthd is a daemon process that handles plaintext authentication
|
||||
requests on behalf of the SASL library.
|
||||
|
||||
The server fulfills two roles: it isolates all code requiring
|
||||
superuser privileges into a single process, and it can be used to
|
||||
provide proxy authentication services to clients that do not
|
||||
understand SASL based authentication.
|
||||
|
||||
|
||||
WWW: http://asg.web.cmu.edu/sasl/
|
19
security/cyrus-sasl2-saslauthd/pkg-plist
Normal file
19
security/cyrus-sasl2-saslauthd/pkg-plist
Normal file
|
@ -0,0 +1,19 @@
|
|||
etc/rc.d/saslauthd.sh
|
||||
man/cat8/saslauthd.8.gz
|
||||
sbin/saslauthd
|
||||
%%PORTDOCS%%%%DOCSDIR%%/saslauthd/AUTHORS
|
||||
%%PORTDOCS%%%%DOCSDIR%%/saslauthd/COPYING
|
||||
%%PORTDOCS%%%%DOCSDIR%%/saslauthd/ChangeLog
|
||||
%%PORTDOCS%%%%DOCSDIR%%/saslauthd/INSTALL
|
||||
%%PORTDOCS%%%%DOCSDIR%%/saslauthd/LDAP_SASLAUTHD
|
||||
%%PORTDOCS%%%%DOCSDIR%%/saslauthd/NEWS
|
||||
%%PORTDOCS%%%%DOCSDIR%%/saslauthd/README
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%/saslauthd
|
||||
@mode ug=rwx,o=
|
||||
@exec mkdir -p /var/state/saslauthd
|
||||
@exec chown -R cyrus:cyrus /var/state
|
||||
@exec chmod -R o= /var/state
|
||||
@comment This file gets created by the state/saslauthd program
|
||||
@unexec rm -fr /var/state/saslauthd
|
||||
@unexec rmdir /var/state
|
||||
@cwd %%PREFIX%%
|
Loading…
Add table
Reference in a new issue