openbsd-ports/security/cyrus-sasl2/Makefile

149 lines
3.5 KiB
Makefile
Raw Normal View History

# $OpenBSD: Makefile,v 1.57 2010/12/27 14:50:23 ajacoutot Exp $
COMMENT= RFC 2222 SASL (Simple Authentication and Security Layer)
DISTNAME= cyrus-sasl-2.1.23
REVISION= 5
SHARED_LIBS= anonymous 2.22 \
crammd5 2.22 \
digestmd5 2.22 \
gssapiv2 2.22 \
ldapdb 2.22 \
login 2.22 \
ntlm 2.22 \
otp 2.22 \
plain 2.22 \
sasl2 2.22 \
sasldb 2.22 \
sql 2.22
CATEGORIES= security
2002-06-22 04:55:44 -04:00
2010-09-03 11:36:26 -04:00
HOMEPAGE= http://www.cyrusimap.org/
2002-06-22 04:55:44 -04:00
MAINTAINER= Antoine Jacoutot <ajacoutot@openbsd.org>
2002-06-22 04:55:44 -04:00
# see the COPYRIGHT file in package sources
2002-06-22 04:55:44 -04:00
PERMIT_PACKAGE_CDROM= yes
PERMIT_PACKAGE_FTP= yes
PERMIT_DISTFILES_CDROM= yes
PERMIT_DISTFILES_FTP= yes
2010-09-03 11:36:26 -04:00
MASTER_SITES= ftp://ftp.cyrusimap.org/cyrus-sasl/
WANTLIB= asn1 c com_err crypto gssapi krb5
USE_LIBTOOL= Yes
2010-10-18 17:41:44 -04:00
USE_GROFF = Yes
2002-06-22 04:55:44 -04:00
CONFIGURE_STYLE=gnu
CONFIGURE_ENV+= LDFLAGS='${LDFLAGS}'
CONFIGURE_ARGS+=${CONFIGURE_SHARED} \
--with-saslauthd="/var/sasl2" \
--enable-gssapi="/usr" \
--with-gss_impl="heimdal" \
--with-plugindir=${PREFIX}/lib/sasl2 \
--enable-login \
--enable-static \
--enable-ntlm \
--enable-auth-sasldb \
--disable-sample
2002-06-22 04:55:44 -04:00
2004-08-04 10:51:31 -04:00
MODGNU_CONFIG_GUESS_DIRS=${WRKSRC}/config ${WRKSRC}/saslauthd/config
FLAVORS= db4 ldap mysql pgsql sqlite
FLAVOR?=
BRKFLAVORMSG= choose either mysql, pgsql or sqlite
PKG_ARGS?= -Dsql=0
.if ${FLAVOR:L:Mdb4}
CONFIGURE_ARGS+=--with-dblib=berkeley \
--with-bdb-libdir="${LOCALBASE}/lib/db4" \
--with-bdb-incdir="${LOCALBASE}/include/db4"
LIB_DEPENDS+= databases/db/v4
2010-11-20 12:22:40 -05:00
WANTLIB += lib/db4/db>=4
.else
CONFIGURE_ARGS+=--with-dblib=ndbm \
--without-bdb-libdir \
--without-bdb-incdir
.endif
.if ${FLAVOR:L:Mldap}
WANTLIB+= ssl
2010-11-20 12:22:40 -05:00
LIB_DEPENDS+= openldap-client->=2,<3:databases/openldap
CONFIGURE_ARGS+=--with-ldap=${LOCALBASE} \
--enable-ldapdb
WANTLIB += ldap lber
.else
CONFIGURE_ARGS+=--without-ldap
.endif
.if ${FLAVOR:L:Mmysql}
.if ${FLAVOR:L:Mpgsql} || ${FLAVOR:L:Msqlite}
ERRORS+= ${BRKFLAVORMSG}
.endif
PKG_ARGS= -Dsql=1
2010-11-20 12:22:40 -05:00
LIB_DEPENDS+= databases/mysql
WANTLIB+= m ssl z lib/mysql/mysqlclient>=10
CONFIGURE_ARGS+=--enable-sql \
--with-mysql \
--without-pgsql \
--without-sqlite
.endif
.if ${FLAVOR:L:Mpgsql}
.if ${FLAVOR:L:Mmysql} || ${FLAVOR:L:Msqlite}
ERRORS+= ${BRKFLAVORMSG}
.endif
PKG_ARGS= -Dsql=1
2010-11-20 12:22:40 -05:00
LIB_DEPENDS+= databases/postgresql
WANTLIB += pq
CONFIGURE_ARGS+=--enable-sql \
--without-mysql \
--with-pgsql \
--without-sqlite
CFLAGS+= -I${LOCALBASE}/include/postgresql
.endif
.if ${FLAVOR:L:Msqlite}
.if ${FLAVOR:L:Mmysql} || ${FLAVOR:L:Mpgsql}
ERRORS+= ${BRKFLAVORMSG}
.endif
PKG_ARGS= -Dsql=1
2010-11-20 12:22:40 -05:00
LIB_DEPENDS+= databases/sqlite
WANTLIB += sqlite
CONFIGURE_ARGS+=--enable-sql \
--without-mysql \
--without-pgsql \
--with-sqlite
.endif
pre-configure:
@perl -pi -e "s,/usr/local/etc,${SYSCONFDIR},g" \
${WRKSRC}/saslauthd/saslauthd.mdoc \
${WRKSRC}/saslauthd/LDAP_SASLAUTHD
2002-06-22 04:55:44 -04:00
post-build:
2005-12-18 05:37:26 -05:00
cd ${WRKBUILD}/saslauthd; \
${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} \
testsaslauthd saslauthd.8
2002-06-22 04:55:44 -04:00
post-install:
2002-07-26 07:19:01 -04:00
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/sasl2
${INSTALL_DATA} ${WRKSRC}/doc/{*.html,*.txt} ${PREFIX}/share/doc/sasl2
2002-06-22 04:55:44 -04:00
${INSTALL_PROGRAM} ${WRKBUILD}/saslauthd/testsaslauthd ${PREFIX}/sbin
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/sasl2
.if ${FLAVOR:L:Mmysql} || ${FLAVOR:L:Mpgsql} || ${FLAVOR:L:Msqlite}
${INSTALL_DATA} ${FILESDIR}/Sendmail.conf-sql \
${PREFIX}/share/examples/sasl2
.endif
.if ${FLAVOR:L:Mldap}
${INSTALL_DATA} ${WRKSRC}/saslauthd/LDAP_SASLAUTHD \
${PREFIX}/share/doc/sasl2
sed -e 's,!!PREFIX!!,${TRUEPREFIX},g' ${FILESDIR}/saslauthd.conf > \
${PREFIX}/share/examples/sasl2/saslauthd.conf
.endif
2002-06-22 04:55:44 -04:00
.include <bsd.port.mk>