2006-11-11 08:36:30 -05:00
|
|
|
# $OpenBSD: Makefile,v 1.21 2006/11/11 13:36:30 mbalmer Exp $
|
2005-01-11 11:06:04 -05:00
|
|
|
|
|
|
|
COMMENT= "anti-spam filter"
|
|
|
|
|
2006-06-08 10:41:08 -04:00
|
|
|
VERSION= 3.6.8
|
2005-01-11 11:06:04 -05:00
|
|
|
DISTNAME= dspam-${VERSION}
|
2006-11-11 08:36:30 -05:00
|
|
|
PKGNAME= ${DISTNAME}p3
|
2006-04-20 11:59:42 -04:00
|
|
|
SHARED_LIBS= dspam 7.0
|
2005-01-11 11:06:04 -05:00
|
|
|
CATEGORIES= mail
|
|
|
|
|
|
|
|
MASTER_SITES= http://dspam.nuclearelephant.com/sources/
|
|
|
|
|
|
|
|
HOMEPAGE= http://dspam.nuclearelephant.com/
|
|
|
|
|
2006-03-23 12:17:40 -05:00
|
|
|
MAINTAINER= Todd T. Fries <todd@OpenBSD.org>
|
2005-01-11 11:06:04 -05:00
|
|
|
|
|
|
|
# GPL
|
|
|
|
PERMIT_PACKAGE_CDROM= Yes
|
|
|
|
PERMIT_PACKAGE_FTP= Yes
|
|
|
|
PERMIT_DISTFILES_CDROM= Yes
|
|
|
|
PERMIT_DISTFILES_FTP= Yes
|
2005-02-13 12:55:48 -05:00
|
|
|
WANTLIB= c m
|
2005-01-11 11:06:04 -05:00
|
|
|
|
|
|
|
CONFIGURE_STYLE= gnu
|
|
|
|
SEPARATE_BUILD= concurrent
|
|
|
|
|
2005-11-30 03:33:16 -05:00
|
|
|
USE_LIBTOOL= Yes
|
|
|
|
|
2005-01-11 11:06:04 -05:00
|
|
|
CONFIGURE_ARGS+= --with-dspam-home=/var/dspam \
|
|
|
|
--with-dspam-home-owner=_dspam \
|
|
|
|
--with-dspam-home-group=_dspam \
|
|
|
|
--with-dspam-home-mode=0755 \
|
|
|
|
--with-dspam-owner=root \
|
|
|
|
--with-dspam-group=bin \
|
|
|
|
--with-dspam-mode=0555 \
|
|
|
|
--enable-long-usernames
|
|
|
|
|
2005-10-26 02:18:38 -04:00
|
|
|
DOCS= ${WRKSRC}/README ${WRKSRC}/UPGRADING ${WRKSRC}/RELEASE.NOTES \
|
|
|
|
${WRKSRC}/doc/courier.txt ${WRKSRC}/doc/exim.txt \
|
|
|
|
${WRKSRC}/doc/markov.txt ${WRKSRC}/doc/pop3filter.txt \
|
|
|
|
${WRKSRC}/doc/postfix.txt ${WRKSRC}/doc/qmail.txt \
|
|
|
|
${WRKSRC}/doc/relay.txt ${WRKSRC}/doc/sendmail.txt
|
|
|
|
|
2005-01-11 11:06:04 -05:00
|
|
|
EXAMPLESDIR= ${PREFIX}/share/examples/dspam
|
|
|
|
DRIVER=
|
2005-11-30 03:33:16 -05:00
|
|
|
DAEMON_SUPPORT=
|
2005-01-11 11:06:04 -05:00
|
|
|
|
2006-05-15 08:01:25 -04:00
|
|
|
FLAVORS= sqlite3 sqlite mysql pgsql hash clamav ldap preferences
|
2005-10-26 02:18:38 -04:00
|
|
|
FLAVOR?= sqlite3
|
2005-01-11 11:06:04 -05:00
|
|
|
|
|
|
|
.if ${FLAVOR:L:Mmysql}
|
|
|
|
.if !empty(DRIVER)
|
2005-10-26 02:18:38 -04:00
|
|
|
BROKEN= choose either mysql or pgsql or sqlite or sqlite3 or hash
|
2005-01-11 11:06:04 -05:00
|
|
|
.endif
|
|
|
|
CONFIGURE_ARGS+= --with-storage-driver=mysql_drv \
|
|
|
|
--with-mysql-includes=${LOCALBASE}/include/mysql \
|
|
|
|
--with-mysql-libraries=${LOCALBASE}/lib/mysql \
|
|
|
|
--enable-virtual-users
|
2006-08-03 15:56:08 -04:00
|
|
|
LIB_DEPENDS+= lib/mysql/mysqlclient.>=14::databases/mysql
|
2005-01-11 11:06:04 -05:00
|
|
|
DRIVER= mysql
|
2005-02-13 12:55:48 -05:00
|
|
|
WANTLIB+= z ssl crypto
|
2005-01-11 11:06:04 -05:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${FLAVOR:L:Mpgsql}
|
|
|
|
.if !empty(DRIVER)
|
2005-10-26 02:18:38 -04:00
|
|
|
BROKEN= choose either mysql or pgsql or sqlite or sqlite3 or hash
|
2005-01-11 11:06:04 -05:00
|
|
|
.endif
|
|
|
|
CONFIGURE_ARGS+= --with-storage-driver=pgsql_drv \
|
|
|
|
--with-pgsql-includes=${LOCALBASE}/include/postgresql \
|
|
|
|
--with-pgsql-libraries=${LOCALBASE}/lib \
|
|
|
|
--enable-virtual-users
|
2006-08-03 09:09:09 -04:00
|
|
|
LIB_DEPENDS+= pq.>=4:postgresql-client-*:databases/postgresql
|
2005-01-11 11:06:04 -05:00
|
|
|
DRIVER= pgsql
|
|
|
|
.endif
|
|
|
|
|
2005-10-26 02:18:38 -04:00
|
|
|
.if ${FLAVOR:L:Mhash}
|
|
|
|
.if !empty(DRIVER)
|
|
|
|
BROKEN= choose either mysql or pgsql or sqlite or sqlite3 or hash
|
|
|
|
.endif
|
|
|
|
CONFIGURE_ARGS+= --with-storage-driver=hash_drv
|
|
|
|
DRIVER= hash
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${FLAVOR:L:Msqlite}
|
|
|
|
.if !empty(DRIVER)
|
|
|
|
BROKEN= choose either mysql or pgsql or sqlite or sqlite3 or hash
|
|
|
|
.endif
|
|
|
|
CONFIGURE_ARGS+= --with-storage-driver=sqlite_drv \
|
|
|
|
--with-sqlite-includes=${LOCALBASE}/include \
|
|
|
|
--with-sqlite-libraries=${LOCALBASE}/lib
|
2006-08-03 09:09:09 -04:00
|
|
|
LIB_DEPENDS+= sqlite.>=8::databases/sqlite
|
2005-10-26 02:18:38 -04:00
|
|
|
DRIVER= sqlite
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${FLAVOR:L:Msqlite3} || empty(DRIVER)
|
|
|
|
.if !empty(DRIVER)
|
|
|
|
BROKEN= choose either mysql or pgsql or sqlite or sqlite3 or hash
|
|
|
|
.else
|
|
|
|
FLAVOR+= sqlite3
|
|
|
|
.endif
|
|
|
|
CONFIGURE_ARGS+= --with-storage-driver=sqlite3_drv \
|
|
|
|
--with-sqlite-includes=${LOCALBASE}/include \
|
|
|
|
--with-sqlite-libraries=${LOCALBASE}/lib
|
2006-08-03 09:09:09 -04:00
|
|
|
LIB_DEPENDS+= sqlite3.>=8::databases/sqlite3
|
2005-10-26 02:18:38 -04:00
|
|
|
DRIVER= sqlite
|
|
|
|
.endif
|
|
|
|
|
2005-11-30 03:33:16 -05:00
|
|
|
.if empty(FLAVOR:L:Msqlite3) && empty(FLAVOR:L:Msqlite)
|
|
|
|
DAEMON_SUPPORT= Yes
|
|
|
|
.endif
|
|
|
|
|
2005-10-26 02:18:38 -04:00
|
|
|
.if ${FLAVOR:L:Mclamav}
|
|
|
|
CONFIGURE_ARGS+= --enable-clamav
|
2006-08-03 09:09:09 -04:00
|
|
|
LIB_DEPENDS+= clamav.>=1::security/clamav
|
2005-10-26 02:18:38 -04:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${FLAVOR:L:Mldap}
|
|
|
|
CONFIGURE_ARGS+= --enable-ldap
|
|
|
|
CONFIGURE_ENV= CPPFLAGS="-I${DEPBASE}/include" \
|
|
|
|
LDFLAGS="-L${DEPBASE}/lib"
|
2006-08-03 09:09:09 -04:00
|
|
|
LIB_DEPENDS+= ldap.>=8,lber.>=8::databases/openldap
|
2006-11-11 08:36:30 -05:00
|
|
|
WANTLIB+= crypto ssl sasl2 asn1 com_err gssapi krb5
|
2005-10-26 02:18:38 -04:00
|
|
|
.endif
|
|
|
|
|
2005-11-30 03:33:16 -05:00
|
|
|
.if !empty(DAEMON_SUPPORT)
|
2005-10-26 02:18:38 -04:00
|
|
|
CONFIGURE_ARGS+= --enable-daemon
|
2005-11-30 03:33:16 -05:00
|
|
|
WANTLIB+= pthread
|
2005-10-26 02:18:38 -04:00
|
|
|
.endif
|
|
|
|
|
2006-05-15 08:01:25 -04:00
|
|
|
.if ${FLAVOR:L:Mpreferences}
|
|
|
|
CONFIGURE_ARGS+= --enable-preferences-extension
|
|
|
|
.endif
|
|
|
|
|
2005-01-11 11:06:04 -05:00
|
|
|
post-install:
|
|
|
|
${INSTALL_DATA_DIR} ${EXAMPLESDIR}
|
2005-10-26 02:18:38 -04:00
|
|
|
${INSTALL_DATA} ${WRKBUILD}/src/dspam.conf \
|
|
|
|
${PREFIX}/share/examples/dspam/dspam.conf
|
2005-01-11 11:06:04 -05:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/dspam
|
|
|
|
${INSTALL_DATA} ${DOCS} ${PREFIX}/share/doc/dspam
|
2005-10-26 02:18:38 -04:00
|
|
|
.if ${DRIVER} != "hash"
|
|
|
|
${INSTALL_DATA_DIR} ${EXAMPLESDIR}/${DRIVER}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/src/tools.${DRIVER}_drv/*.sql \
|
|
|
|
${EXAMPLESDIR}/${DRIVER}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/doc/${DRIVER}_drv.txt \
|
|
|
|
${PREFIX}/share/doc/dspam
|
|
|
|
.endif
|
2005-01-11 11:06:04 -05:00
|
|
|
|
|
|
|
.include <bsd.port.mk>
|