aboutsummaryrefslogtreecommitdiff
path: root/mail/spmfilter
diff options
context:
space:
mode:
authorSahil Tandon <sahil@FreeBSD.org>2010-04-27 02:31:59 +0000
committerSahil Tandon <sahil@FreeBSD.org>2010-04-27 02:31:59 +0000
commite98328f755348c1c8d5f4eb772562324eaf7b6f8 (patch)
tree3f8bab7dcb7770314234b056a158a1f78fc598cc /mail/spmfilter
parentf63d29be3789072c3fd952783e8b8b430ca1c537 (diff)
downloadports-e98328f755348c1c8d5f4eb772562324eaf7b6f8.tar.gz
ports-e98328f755348c1c8d5f4eb772562324eaf7b6f8.zip
Notes
Diffstat (limited to 'mail/spmfilter')
-rw-r--r--mail/spmfilter/Makefile102
-rw-r--r--mail/spmfilter/distinfo3
-rw-r--r--mail/spmfilter/files/spmfilter.in31
-rw-r--r--mail/spmfilter/pkg-descr11
-rw-r--r--mail/spmfilter/pkg-plist23
5 files changed, 170 insertions, 0 deletions
diff --git a/mail/spmfilter/Makefile b/mail/spmfilter/Makefile
new file mode 100644
index 000000000000..d9ffa6efb3ef
--- /dev/null
+++ b/mail/spmfilter/Makefile
@@ -0,0 +1,102 @@
+# New ports collection makefile for: spmfilter
+# Date created: 2010-04-12
+# Whom: Frank Wall <fw@moov.de>
+#
+# $FreeBSD$
+#
+
+PORTNAME= spmfilter
+PORTVERSION= 0.4.0
+CATEGORIES= mail
+MASTER_SITES= http://www.${PORTNAME}.org/attachments/download/51/
+
+MAINTAINER= fw@moov.de
+COMMENT= Spmfilter is a high-performance mail filtering framework, written in C
+
+BUILD_DEPENDS= gmime>=2.2:${PORTSDIR}/mail/gmime2 \
+ libesmtp>=1.0:${PORTSDIR}/mail/libesmtp \
+ glib>=2.04:${PORTSDIR}/devel/glib20 \
+ pcre>=6.0:${PORTSDIR}/devel/pcre
+
+RUN_DEPENDS= gmime>=2.2:${PORTSDIR}/mail/gmime2 \
+ libesmtp>=1.0:${PORTSDIR}/mail/libesmtp \
+ glib>=2.04:${PORTSDIR}/devel/glib20 \
+ pcre>=6.0:${PORTSDIR}/devel/pcre
+
+USE_CMAKE= yes
+CMAKE_ARGS+= -DCMAKE_INCLUDE_PATH="${LOCALBASE}/include" \
+ -DCMAKE_LIBRARY_PATH="${LOCALBASE}/lib"
+
+USE_LDCONFIG= ${PREFIX}/lib/${PORTNAME}
+USE_RC_SUBR= ${PORTNAME}
+
+OPTIONS= DB4 "Enable DB4 backend" on \
+ DEBUG "Enable Debugging" off \
+ LDAP "Enable LDAP backend" off \
+ MYSQL "Enable MYSQL backend" off \
+ PGSQL "Enable PGSQL backend" off
+
+# Default requirement for spmfilter rc script
+_REQUIRE= LOGIN
+
+.include <bsd.port.pre.mk>
+
+.if !defined(WITH_DB4) || defined(WITHOUT_DB4)
+CMAKE_ARGS+= -DWITHOUT_DB4=TRUE
+.else
+USE_BDB= yes
+CMAKE_ARGS+= -DDB4_INCLUDE_DIR="${BDB_INCLUDE_DIR}"
+.endif
+
+.if defined(WITH_DEBUG)
+CMAKE_ARGS+= -DENABLE_DEBUG=TRUE
+.endif
+
+.if !defined(WITH_LDAP) || defined(WITHOUT_LDAP)
+CMAKE_ARGS+= -DWITHOUT_LDAP=TRUE
+.else
+USE_OPENLDAP= yes
+.if defined(WITH_OPENLDAP_VER)
+WANT_OPENLDAP_VER= ${WITH_OPENLDAP_VER}
+.endif
+_REQUIRE+= slapd
+.endif
+
+.if !defined(WITH_MYSQL) && !defined(WITH_PGSQL)
+CMAKE_ARGS+= -DWITHOUT_ZDB=TRUE
+.else
+LIB_DEPENDS+= zdb:${PORTSDIR}/databases/libzdb
+.endif
+
+.if defined(WITH_MYSQL)
+USE_MYSQL= yes
+_REQUIRE+= mysql
+.endif
+
+.if defined(WITH_PGSQL)
+USE_PGSQL= yes
+_REQUIRE+= postgresql
+.endif
+
+MAN1= ${PORTNAME}.1
+MAN5= ${PORTNAME}.conf.5
+MANCOMPRESSED= yes
+
+SUB_LIST+= REQUIRE="${_REQUIRE}"
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|share/man|man|' \
+ ${WRKSRC}/cmake/Modules/SMFMacros.cmake
+ @${REINPLACE_CMD} -E -e 's|(HAVE_DB4 )db|\1${BDB_LIB_NAME}|' \
+ ${WRKSRC}/cmake/Modules/FindDB4.cmake
+ @${REINPLACE_CMD} -E -e 's|\$${LIBDIR}(/pkgconfig)|$${CMAKE_INSTALL_PREFIX}/libdata\1|' \
+ -e 's|(COMMON_LIBS )db|\1${BDB_LIB_NAME}|' \
+ ${WRKSRC}/src/CMakeLists.txt
+
+post-install:
+ @${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.conf.sample ${PREFIX}/etc/
+ @if [ ! -f ${PREFIX}/etc/${PORTNAME}.conf ]; then \
+ ${CP} -p ${PREFIX}/etc/${PORTNAME}.conf.sample ${PREFIX}/etc/${PORTNAME}.conf ; \
+ fi
+
+.include <bsd.port.post.mk>
diff --git a/mail/spmfilter/distinfo b/mail/spmfilter/distinfo
new file mode 100644
index 000000000000..98ba7011c659
--- /dev/null
+++ b/mail/spmfilter/distinfo
@@ -0,0 +1,3 @@
+MD5 (spmfilter-0.4.0.tar.gz) = ae8adfc86820da98b45758fdd7688907
+SHA256 (spmfilter-0.4.0.tar.gz) = c566c199bd1e4b59dff8f9a186ccaa3b951bc2f2837f838723c8dbdfcc4a3eeb
+SIZE (spmfilter-0.4.0.tar.gz) = 52689
diff --git a/mail/spmfilter/files/spmfilter.in b/mail/spmfilter/files/spmfilter.in
new file mode 100644
index 000000000000..2c2322981e92
--- /dev/null
+++ b/mail/spmfilter/files/spmfilter.in
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+# $FreeBSD$
+#
+# PROVIDE: spmfilter
+# REQUIRE: %%REQUIRE%%
+# BEFORE: mail
+# KEYWORD: shutdown
+#
+#
+# Add the following lines to /etc/rc.conf to enable spmfilter:
+#
+# spmfilter_enable="YES"
+#
+# See spmfilter(1) for flags or the config file.
+#
+
+. /etc/rc.subr
+
+name=spmfilter
+rcvar=`set_rcvar`
+
+command=%%PREFIX%%/sbin/spmfilter
+
+load_rc_config $name
+
+: ${spmfilter_enable="NO"}
+: ${spmfilter_config="%%PREFIX%%/etc/spmfilter.conf"}
+: ${spmfilter_flags="-f ${spmfilter_config}"}
+
+run_rc_command "$1"
diff --git a/mail/spmfilter/pkg-descr b/mail/spmfilter/pkg-descr
new file mode 100644
index 000000000000..a33c2f625cbf
--- /dev/null
+++ b/mail/spmfilter/pkg-descr
@@ -0,0 +1,11 @@
+spmfilter is a high-performance mail filtering framework, written in C.
+
+It attempts to be a general filtering framework for any purposes.
+Filtering mechanisms are provided by plugins, the API enables spmfilter
+plugins to access messages as they are being processed by the MTA.
+This allows them to examine and modify message content and
+meta-information during the SMTP transaction. Plugins are loaded at
+runtime and can be processed in any sequence, the processing chain
+can also be altered by a single plugin
+
+WWW: http://www.spmfilter.org/
diff --git a/mail/spmfilter/pkg-plist b/mail/spmfilter/pkg-plist
new file mode 100644
index 000000000000..db84b94a8394
--- /dev/null
+++ b/mail/spmfilter/pkg-plist
@@ -0,0 +1,23 @@
+include/spmfilter/smf/smf_core.h
+include/spmfilter/smf/smf_lookup.h
+include/spmfilter/smf/smf_message.h
+include/spmfilter/smf/smf_mime.h
+include/spmfilter/smf/smf_session.h
+include/spmfilter/smf/smf_settings.h
+include/spmfilter/smf/smf_trace.h
+include/spmfilter/spmfilter.h
+include/spmfilter/spmfilter_config.h
+libdata/pkgconfig/spmfilter.pc
+lib/spmfilter/libpipe.so
+lib/spmfilter/libpipe.so.0.4.0
+lib/spmfilter/libsmf.so
+lib/spmfilter/libsmf.so.0.4.0
+lib/spmfilter/libsmtpd.so
+lib/spmfilter/libsmtpd.so.0.4.0
+sbin/spmfilter
+@unexec if cmp -s %D/etc/spmfilter.conf.sample %D/etc/spmfilter.conf; then rm -f %D/etc/spmfilter.conf; fi
+etc/spmfilter.conf.sample
+@dirrmtry libdata/pkgconfig
+@dirrm include/spmfilter/smf
+@dirrm include/spmfilter
+@dirrm lib/spmfilter