- clean the Makefile a bit so it is easier for me to read it

- zap $VERSION
- tweak post-install
- post-extract -> pre-configure
- add available FLAVORS to DESCR
no functionnal changes
This commit is contained in:
ajacoutot 2007-06-01 15:24:26 +00:00
parent 99232c25fb
commit f2d3c7696f
2 changed files with 60 additions and 56 deletions

View File

@ -1,12 +1,9 @@
# $OpenBSD: Makefile,v 1.37 2007/02/13 13:00:14 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.38 2007/06/01 15:24:26 ajacoutot Exp $
COMMENT= "RFC 2222 SASL (Simple Authentication and Security Layer)"
VERSION= 2.1.21
DISTNAME= cyrus-sasl-${VERSION}
PKGNAME= ${DISTNAME}p3
CATEGORIES= security
DISTNAME= cyrus-sasl-2.1.21
PKGNAME= ${DISTNAME}p4
SHARED_LIBS= anonymous 2.21 \
crammd5 2.21 \
digestmd5 2.21 \
@ -17,32 +14,35 @@ SHARED_LIBS= anonymous 2.21 \
sasl2 2.21 \
sasldb 2.21 \
sql 2.21
MASTER_SITES= ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/ \
ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/OLD-VERSIONS/sasl/
CATEGORIES= security
HOMEPAGE= http://asg.web.cmu.edu/sasl/
MAINTAINER= Antoine Jacoutot <ajacoutot@openbsd.org>
# see the COPYRIGHT file in package sources
PERMIT_PACKAGE_CDROM= yes
PERMIT_PACKAGE_FTP= yes
PERMIT_DISTFILES_CDROM= yes
PERMIT_DISTFILES_FTP= yes
WANTLIB= asn1 c com_err crypto gssapi krb5
USE_LIBTOOL= Yes
CONFIGURE_STYLE= gnu
CONFIGURE_ENV+= LDFLAGS='${LDFLAGS}'
CONFIGURE_ARGS+= ${CONFIGURE_SHARED}
MASTER_SITES= ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/ \
ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/OLD-VERSIONS/sasl/
CONFIGURE_ARGS+= --with-saslauthd="/var/sasl2" \
--enable-gssapi="/usr" \
--with-gss_impl="heimdal" \
--with-plugindir=${PREFIX}/lib/sasl2 \
--enable-login \
--enable-static \
--disable-sample
WANTLIB= asn1 c com_err crypto gssapi krb5
USE_LIBTOOL= Yes
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 \
--disable-sample
MODGNU_CONFIG_GUESS_DIRS=${WRKSRC}/config ${WRKSRC}/saslauthd/config
@ -50,71 +50,70 @@ FLAVORS= db4 ldap mysql pgsql sqlite
FLAVOR?=
.if ${FLAVOR:L:Mdb4}
CONFIGURE_ARGS+= --with-dblib=berkeley \
--with-bdb-libdir="${LOCALBASE}/lib/db4" \
--with-bdb-incdir="${LOCALBASE}/include/db4"
LIB_DEPENDS= lib/db4/db.=4:db-4.*:databases/db/v4
CONFIGURE_ARGS+=--with-dblib=berkeley \
--with-bdb-libdir="${LOCALBASE}/lib/db4" \
--with-bdb-incdir="${LOCALBASE}/include/db4"
LIB_DEPENDS+= lib/db4/db.=4:db-4.*:databases/db/v4
.else
CONFIGURE_ARGS+= --with-dblib=ndbm \
--without-bdb-libdir \
--without-bdb-incdir
CONFIGURE_ARGS+=--with-dblib=ndbm \
--without-bdb-libdir \
--without-bdb-incdir
.endif
.if ${FLAVOR:L:Mldap}
LIB_DEPENDS+= ldap.>=2,lber:openldap-client-2.*:databases/openldap
CONFIGURE_ARGS+= --with-ldap=${LOCALBASE}
LIB_DEPENDS+= ldap.>=2,lber:openldap-client-2.*:databases/openldap
CONFIGURE_ARGS+=--with-ldap=${LOCALBASE}
.else
CONFIGURE_ARGS+= --without-ldap
CONFIGURE_ARGS+=--without-ldap
.endif
.if ${FLAVOR:L:Mmysql}
.if ${FLAVOR:L:Mpgsql} || ${FLAVOR:L:Msqlite}
BROKEN= choose either mysql or pgsql or sqlite
BROKEN= choose either mysql or pgsql or sqlite
.endif
LIB_DEPENDS+= lib/mysql/mysqlclient.>=10::databases/mysql
WANTLIB+= m ssl z
CONFIGURE_ARGS+= --enable-sql \
--with-mysql \
--without-pgsql \
--without-sqlite
LIB_DEPENDS+= lib/mysql/mysqlclient.>=10::databases/mysql
WANTLIB+= m ssl z
CONFIGURE_ARGS+=--enable-sql \
--with-mysql \
--without-pgsql \
--without-sqlite
.endif
.if ${FLAVOR:L:Mpgsql}
.if ${FLAVOR:L:Mmysql} || ${FLAVOR:L:Msqlite}
BROKEN= choose either mysql or pgsql or sqlite
BROKEN= choose either mysql or pgsql or sqlite
.endif
LIB_DEPENDS+= pq.>=3:postgresql-client-*:databases/postgresql
CONFIGURE_ARGS+= --enable-sql \
--without-mysql \
--with-pgsql \
--without-sqlite
CFLAGS+= -I${LOCALBASE}/include/postgresql
LIB_DEPENDS+= pq.>=3:postgresql-client-*:databases/postgresql
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}
BROKEN= choose either mysql or pgsql or sqlite
BROKEN= choose either mysql or pgsql or sqlite
.endif
LIB_DEPENDS= sqlite.>=8.6::databases/sqlite
CONFIGURE_ARGS+= --enable-sql \
--without-mysql \
--without-pgsql \
--with-sqlite
LIB_DEPENDS= sqlite.>=8.6::databases/sqlite
CONFIGURE_ARGS+=--enable-sql \
--without-mysql \
--without-pgsql \
--with-sqlite
.endif
post-extract:
perl -pi -e "s,/usr/local/etc,${SYSCONFDIR},g" \
@perl -pi -e "s,/usr/local/etc,${SYSCONFDIR},g" \
${WRKSRC}/saslauthd/saslauthd.mdoc
post-build:
cd ${WRKBUILD}/saslauthd; \
${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} testsaslauthd \
saslauthd.8
${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} \
testsaslauthd saslauthd.8
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/sasl2
${INSTALL_DATA} ${WRKSRC}/doc/*.html ${PREFIX}/share/doc/sasl2
${INSTALL_DATA} ${WRKSRC}/doc/*.txt ${PREFIX}/share/doc/sasl2
${INSTALL_DATA} ${WRKSRC}/doc/{*.html,*.txt} ${PREFIX}/share/doc/sasl2
${INSTALL_PROGRAM} ${WRKBUILD}/saslauthd/testsaslauthd ${PREFIX}/sbin
.include <bsd.port.mk>

View File

@ -6,3 +6,8 @@ protocol includes a command for identifying and authenticating a user to a
server and for optionally negotiating protection of subsequent protocol
interactions. If its use is negotiated, a security layer is inserted
between the protocol and the connection.
Available flavors:
db4 - use Berkeley DB v4 for SASLDB (instead of ndbm)
ldap - enable LDAPDB auxprop plugin and LDAP enabled saslauthd
mysql pgsql sqlite - enable SQL auxprop plugin (choose one)