pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Initial import of rspamd 1.5.



Module Name:	pkgsrc-wip
Committed By:	Bartosz Kuzma <bartosz.kuzma%gmail.com@localhost>
Pushed By:	bartosz.kuzma
Date:		Sun Mar 19 13:50:37 2017 +0100
Changeset:	ebe0918e9462e1485c482509d585d0586800dcbe

Modified Files:
	Makefile
Added Files:
	rspamd15/DESCR
	rspamd15/Makefile
	rspamd15/PLIST
	rspamd15/distinfo
	rspamd15/files/rspamd.sh
	rspamd15/files/smf/manifest.xml
	rspamd15/options.mk
	rspamd15/patches/patch-CMakeLists.txt
	rspamd15/patches/patch-src_CMakeLists.txt

Log Message:
Initial import of rspamd 1.5.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=ebe0918e9462e1485c482509d585d0586800dcbe

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                                  |   1 +
 rspamd15/DESCR                            |   3 +
 rspamd15/Makefile                         | 138 +++++++++++++++++++++++++
 rspamd15/PLIST                            | 164 ++++++++++++++++++++++++++++++
 rspamd15/distinfo                         |   8 ++
 rspamd15/files/rspamd.sh                  |  37 +++++++
 rspamd15/files/smf/manifest.xml           |  45 ++++++++
 rspamd15/options.mk                       |  18 ++++
 rspamd15/patches/patch-CMakeLists.txt     |  35 +++++++
 rspamd15/patches/patch-src_CMakeLists.txt |  16 +++
 10 files changed, 465 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index 707733f3e9..290e0f12f8 100644
--- a/Makefile
+++ b/Makefile
@@ -3806,6 +3806,7 @@ SUBDIR+=	rpm5
 SUBDIR+=	rsem
 SUBDIR+=	rsget
 SUBDIR+=	rsound
+SUBDIR+=	rspamd15
 SUBDIR+=	rsstail
 SUBDIR+=	rst-mode
 SUBDIR+=	rstudio
diff --git a/rspamd15/DESCR b/rspamd15/DESCR
new file mode 100644
index 0000000000..1a571c9fc7
--- /dev/null
+++ b/rspamd15/DESCR
@@ -0,0 +1,3 @@
+Rspamd is fast, modular and lightweight spam filter. It is designed to work
+with big ammount of mail and can be easily extended with own filters written in
+lua.
diff --git a/rspamd15/Makefile b/rspamd15/Makefile
new file mode 100644
index 0000000000..e9f67809b4
--- /dev/null
+++ b/rspamd15/Makefile
@@ -0,0 +1,138 @@
+# $NetBSD$
+
+DISTNAME=	rspamd-1.5.3
+CATEGORIES=	mail
+MASTER_SITES=	http://www.rspamd.com/downloads/
+EXTRACT_SUFX=	.tar.xz
+
+MAINTAINER=	bartosz.kuzma%gmail.com@localhost
+HOMEPAGE=	https://www.rspamd.com/
+COMMENT=	Fast, free and open-source spam filtering system
+LICENSE=	2-clause-bsd
+
+.include "options.mk"
+
+DEPENDS+=	${LUA_PKGPREFIX}-lpeg-[0-9]*:../../devel/lua-lpeg
+DEPENDS+=	ragel-[0-9]*:../../devel/ragel
+
+USE_CMAKE=	yes
+USE_TOOLS+=	perl pkg-config
+USE_LANGUAGES=	c99
+BUILD_DEFS+=	VARBASE
+
+LUA_VERSIONS_ACCEPTED=	53
+
+CPPFLAGS.SunOS+=	-D__EXTENSIONS__
+LDFLAGS+=	${COMPILER_RPATH_FLAG}${PREFIX}/lib/rspamd
+TEST_TARGET=	run-test
+
+RSPAMD_USER?=	rspamd
+RSPAMD_GROUP?=	rspamd
+PKG_GROUPS=	${RSPAMD_GROUP}
+PKG_USERS=	${RSPAMD_USER}:${RSPAMD_GROUP}
+
+PKG_GROUPS_VARS=	RSPAMD_GROUP
+PKG_USERS_VARS=		RSPAMD_USER
+
+PKG_GECOS.${RSPAMD_USER}=	rspamd user
+
+PKG_SYSCONFSUBDIR=	rspamd
+EGDIR=		${PREFIX}/share/examples/${PKGBASE}
+LOGDIR=		${VARBASE}/log/rspamd
+DBDIR=		${VARBASE}/db/rspamd
+RUNDIR=		${VARBASE}/run/rspamd
+
+RCD_SCRIPTS=	rspamd
+
+CMAKE_ARGS+=	-DMANDIR:PATH=${PREFIX}/${PKGMANDIR}
+CMAKE_ARGS+=	-DLOGDIR:PATH=${LOGDIR}
+CMAKE_ARGS+=	-DRUNDIR:PATH=${VARBASE}/run/rspamd
+CMAKE_ARGS+=	-DDBDIR:PATH=${DBDIR}
+CMAKE_ARGS+=	-DCONFDIR:PATH=${PKG_SYSCONFDIR}
+CMAKE_ARGS+=	-DRSPAMD_USER=${RSPAMD_USER}
+CMAKE_ARGS+=	-DRSPAMD_GROUP=${RSPAMD_GROUP}
+CMAKE_ARGS+=	-DENABLE_LUAJIT=OFF
+
+REPLACE_PERL+=	utils/rspamd_stats.pl
+
+MAKE_DIRS+=	${PKG_SYSCONFDIR}/modules.d
+
+OWN_DIRS_PERMS+=	${DBDIR} ${RSPAMD_USER} ${RSPAMD_GROUP} 0700
+OWN_DIRS_PERMS+=	${LOGDIR} ${RSPAMD_USER} ${RSPAMD_GROUP} 0750
+OWN_DIRS_PERMS+=	${RUNDIR} ${RSPAMD_USER} ${RSPAMD_GROUP} 0755
+
+CONF_FILES=	${EGDIR}/2tld.inc ${PKG_SYSCONFDIR}/2tld.inc
+CONF_FILES+=	${EGDIR}/common.conf ${PKG_SYSCONFDIR}/common.conf
+CONF_FILES+=	${EGDIR}/composites.conf ${PKG_SYSCONFDIR}/composites.conf
+CONF_FILES+=	${EGDIR}/dmarc_whitelist.inc ${PKG_SYSCONFDIR}/dmarc_whitelist.inc
+CONF_FILES+=	${EGDIR}/logging.inc ${PKG_SYSCONFDIR}/logging.inc
+CONF_FILES+=	${EGDIR}/maillist.inc ${PKG_SYSCONFDIR}/maillist.inc
+CONF_FILES+=	${EGDIR}/metrics.conf ${PKG_SYSCONFDIR}/metrics.conf
+CONF_FILES+=	${EGDIR}/mid.inc ${PKG_SYSCONFDIR}/mic.inc
+CONF_FILES+=	${EGDIR}/mime_types.inc ${PKG_SYSCONFDIR}/mime_types.inc
+CONF_FILES+=	${EGDIR}/modules.conf ${PKG_SYSCONFDIR}/modules.conf
+CONF_FILES+=	${EGDIR}/options.inc ${PKG_SYSCONFDIR}/options.inc
+CONF_FILES+=	${EGDIR}/redirectors.inc ${PKG_SYSCONFDIR}/redirectors.inc
+CONF_FILES+=	${EGDIR}/rspamd.conf ${PKG_SYSCONFDIR}/rspamd.conf
+CONF_FILES+=	${EGDIR}/spf_dkim_whitelist.inc ${PKG_SYSCONFDIR}/spf_dkim_whitelist.inc
+CONF_FILES+=	${EGDIR}/statistic.conf ${PKG_SYSCONFDIR}/statistic.conf
+CONF_FILES+=	${EGDIR}/surbl-whitelist.inc ${PKG_SYSCONFDIR}/surbl-whitelist.inc
+CONF_FILES+=	${EGDIR}/worker-controller.inc ${PKG_SYSCONFDIR}/worker-controller.inc
+CONF_FILES+=	${EGDIR}/worker-fuzzy.inc ${PKG_SYSCONFDIR}/worker-fuzzy.inc
+CONF_FILES+=	${EGDIR}/worker-normal.inc ${PKG_SYSCONFDIR}/worker-normal.inc
+CONF_FILES+=	${EGDIR}/modules.d/antivirus.conf ${PKG_SYSCONFDIR}/modules.d/antivirus.conf
+CONF_FILES+=	${EGDIR}/modules.d/asn.conf ${PKG_SYSCONFDIR}/modules.d/asn.conf
+CONF_FILES+=	${EGDIR}/modules.d/chartable.conf ${PKG_SYSCONFDIR}/modules.d/chartable.conf
+CONF_FILES+=	${EGDIR}/modules.d/clickhouse.conf ${PKG_SYSCONFDIR}/modules.d/clickhouse.conf
+CONF_FILES+=	${EGDIR}/modules.d/dcc.conf ${PKG_SYSCONFDIR}/modules.d/dcc.conf
+CONF_FILES+=	${EGDIR}/modules.d/dkim.conf ${PKG_SYSCONFDIR}/modules.d/dkim.conf
+CONF_FILES+=	${EGDIR}/modules.d/dkim_signing.conf ${PKG_SYSCONFDIR}/modules.d/dkim_signing.conf
+CONF_FILES+=	${EGDIR}/modules.d/dmarc.conf ${PKG_SYSCONFDIR}/modules.d/dmarc.conf
+CONF_FILES+=	${EGDIR}/modules.d/emails.conf ${PKG_SYSCONFDIR}/modules.d/emails.conf
+CONF_FILES+=	${EGDIR}/modules.d/fann_redis.conf ${PKG_SYSCONFDIR}/modules.d/fann_redis.conf
+CONF_FILES+=	${EGDIR}/modules.d/force_actions.conf ${PKG_SYSCONFDIR}/modules.d/force_actions.conf
+CONF_FILES+=	${EGDIR}/modules.d/forged_recipients.conf ${PKG_SYSCONFDIR}/modules.d/forged_recipients.conf
+CONF_FILES+=	${EGDIR}/modules.d/fuzzy_check.conf ${PKG_SYSCONFDIR}/modules.d/fuzzy_check.conf
+CONF_FILES+=	${EGDIR}/modules.d/greylist.conf ${PKG_SYSCONFDIR}/modules.d/greylist.conf
+CONF_FILES+=	${EGDIR}/modules.d/hfilter.conf ${PKG_SYSCONFDIR}/modules.d/hfilter.conf
+CONF_FILES+=	${EGDIR}/modules.d/ip_score.conf ${PKG_SYSCONFDIR}/modules.d/ip_score.conf
+CONF_FILES+=	${EGDIR}/modules.d/maillist.conf ${PKG_SYSCONFDIR}/modules.d/maillist.conf
+CONF_FILES+=	${EGDIR}/modules.d/metadata_exporter.conf ${PKG_SYSCONFDIR}/modules.d/metadata_exporter.conf
+CONF_FILES+=	${EGDIR}/modules.d/metric_exporter.conf ${PKG_SYSCONFDIR}/modules.d/metric_exporter.conf
+CONF_FILES+=	${EGDIR}/modules.d/mid.conf ${PKG_SYSCONFDIR}/modules.d/mid.conf
+CONF_FILES+=	${EGDIR}/modules.d/mime_types.conf ${PKG_SYSCONFDIR}/modules.d/mime_types.conf
+CONF_FILES+=	${EGDIR}/modules.d/multimap.conf ${PKG_SYSCONFDIR}/modules.d/multimap.conf
+CONF_FILES+=	${EGDIR}/modules.d/mx_check.conf ${PKG_SYSCONFDIR}/modules.d/mx_check.conf
+CONF_FILES+=	${EGDIR}/modules.d/once_received.conf ${PKG_SYSCONFDIR}/modules.d/once_received.conf
+CONF_FILES+=	${EGDIR}/modules.d/phishing.conf ${PKG_SYSCONFDIR}/modules.d/phishing.conf
+CONF_FILES+=	${EGDIR}/modules.d/ratelimit.conf ${PKG_SYSCONFDIR}/modules.d/ratelimit.conf
+CONF_FILES+=	${EGDIR}/modules.d/rbl.conf ${PKG_SYSCONFDIR}/modules.d/rbl.conf
+CONF_FILES+=	${EGDIR}/modules.d/redis.conf ${PKG_SYSCONFDIR}/modules.d/redis.conf
+CONF_FILES+=	${EGDIR}/modules.d/regexp.conf ${PKG_SYSCONFDIR}/modules.d/regexp.conf
+CONF_FILES+=	${EGDIR}/modules.d/replies.conf ${PKG_SYSCONFDIR}/modules.d/replies.conf
+CONF_FILES+=	${EGDIR}/modules.d/rmilter_headers.conf ${PKG_SYSCONFDIR}/modules.d/rmilter_headers.conf
+CONF_FILES+=	${EGDIR}/modules.d/rspamd_update.conf ${PKG_SYSCONFDIR}/modules.d/rspamd_update.conf
+CONF_FILES+=	${EGDIR}/modules.d/spamassassin.conf ${PKG_SYSCONFDIR}/modules.d/spamassassin.conf
+CONF_FILES+=	${EGDIR}/modules.d/spf.conf ${PKG_SYSCONFDIR}/modules.d/spf.conf
+CONF_FILES+=	${EGDIR}/modules.d/surbl.conf ${PKG_SYSCONFDIR}/modules.d/surbl.conf
+CONF_FILES+=	${EGDIR}/modules.d/trie.conf ${PKG_SYSCONFDIR}/modules.d/trie.conf
+CONF_FILES+=	${EGDIR}/modules.d/url_redirector.conf ${PKG_SYSCONFDIR}/modules.d/url_redirector.conf
+CONF_FILES+=	${EGDIR}/modules.d/url_reputation.conf ${PKG_SYSCONFDIR}/modules.d/url_reputation.conf
+CONF_FILES+=	${EGDIR}/modules.d/url_tags.conf ${PKG_SYSCONFDIR}/modules.d/url_tags.conf
+CONF_FILES+=	${EGDIR}/modules.d/whitelist.conf ${PKG_SYSCONFDIR}/modules.d/whitelist.conf
+
+post-extract:
+	${FIND} ${WRKSRC}/conf -type d -exec ${CHMOD} ${PKGDIRMODE} {} \;
+	${FIND} ${WRKSRC}/conf -type f -exec ${CHMOD} ${DOCMODE} {} \;
+
+.include "../../databases/hiredis/buildlink3.mk"
+.include "../../databases/sqlite3/buildlink3.mk"
+.include "../../devel/fann/buildlink3.mk"
+.include "../../devel/glib2/buildlink3.mk"
+.include "../../devel/libevent/buildlink3.mk"
+.include "../../lang/lua/buildlink3.mk"
+.include "../../mail/gmime/buildlink3.mk"
+.include "../../security/openssl/buildlink3.mk"
+.include "../../sysutils/file/buildlink3.mk"
+.include "../../textproc/icu/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/rspamd15/PLIST b/rspamd15/PLIST
new file mode 100644
index 0000000000..978e751031
--- /dev/null
+++ b/rspamd15/PLIST
@@ -0,0 +1,164 @@
+@comment $NetBSD: PLIST,v 1.5 2017/02/17 15:01:33 wiz Exp $
+bin/rspamadm
+bin/rspamadm-${PKGVERSION}
+bin/rspamc
+bin/rspamc-${PKGVERSION}
+bin/rspamd
+bin/rspamd-${PKGVERSION}
+bin/rspamd_stats
+lib/rspamd/librspamd-actrie.so
+man/man1/rspamadm.1
+man/man1/rspamc.1
+man/man8/rspamd.8
+share/examples/rspamd/2tld.inc
+share/examples/rspamd/common.conf
+share/examples/rspamd/composites.conf
+share/examples/rspamd/dmarc_whitelist.inc
+share/examples/rspamd/logging.inc
+share/examples/rspamd/maillist.inc
+share/examples/rspamd/metrics.conf
+share/examples/rspamd/mid.inc
+share/examples/rspamd/mime_types.inc
+share/examples/rspamd/modules.conf
+share/examples/rspamd/options.inc
+share/examples/rspamd/redirectors.inc
+share/examples/rspamd/rspamd.conf
+share/examples/rspamd/rspamd.systemd.conf
+share/examples/rspamd/rspamd.sysvinit.conf
+share/examples/rspamd/spf_dkim_whitelist.inc
+share/examples/rspamd/statistic.conf
+share/examples/rspamd/surbl-whitelist.inc
+share/examples/rspamd/worker-controller.inc
+share/examples/rspamd/worker-fuzzy.inc
+share/examples/rspamd/worker-normal.inc
+share/examples/rspamd/modules.d/antivirus.conf
+share/examples/rspamd/modules.d/asn.conf
+share/examples/rspamd/modules.d/chartable.conf
+share/examples/rspamd/modules.d/clickhouse.conf
+share/examples/rspamd/modules.d/dcc.conf
+share/examples/rspamd/modules.d/dkim.conf
+share/examples/rspamd/modules.d/dkim_signing.conf
+share/examples/rspamd/modules.d/dmarc.conf
+share/examples/rspamd/modules.d/emails.conf
+share/examples/rspamd/modules.d/fann_redis.conf
+share/examples/rspamd/modules.d/force_actions.conf
+share/examples/rspamd/modules.d/forged_recipients.conf
+share/examples/rspamd/modules.d/fuzzy_check.conf
+share/examples/rspamd/modules.d/greylist.conf
+share/examples/rspamd/modules.d/hfilter.conf
+share/examples/rspamd/modules.d/ip_score.conf
+share/examples/rspamd/modules.d/maillist.conf
+share/examples/rspamd/modules.d/metadata_exporter.conf
+share/examples/rspamd/modules.d/metric_exporter.conf
+share/examples/rspamd/modules.d/mid.conf
+share/examples/rspamd/modules.d/mime_types.conf
+share/examples/rspamd/modules.d/multimap.conf
+share/examples/rspamd/modules.d/mx_check.conf
+share/examples/rspamd/modules.d/once_received.conf
+share/examples/rspamd/modules.d/phishing.conf
+share/examples/rspamd/modules.d/ratelimit.conf
+share/examples/rspamd/modules.d/rbl.conf
+share/examples/rspamd/modules.d/redis.conf
+share/examples/rspamd/modules.d/regexp.conf
+share/examples/rspamd/modules.d/replies.conf
+share/examples/rspamd/modules.d/rmilter_headers.conf
+share/examples/rspamd/modules.d/rspamd_update.conf
+share/examples/rspamd/modules.d/spamassassin.conf
+share/examples/rspamd/modules.d/spf.conf
+share/examples/rspamd/modules.d/surbl.conf
+share/examples/rspamd/modules.d/trie.conf
+share/examples/rspamd/modules.d/url_redirector.conf
+share/examples/rspamd/modules.d/url_reputation.conf
+share/examples/rspamd/modules.d/url_tags.conf
+share/examples/rspamd/modules.d/whitelist.conf
+share/rspamd/effective_tld_names.dat
+share/rspamd/lua/antivirus.lua
+share/rspamd/lua/asn.lua
+share/rspamd/lua/clickhouse.lua
+share/rspamd/lua/dcc.lua
+share/rspamd/lua/dkim_signing.lua
+share/rspamd/lua/dmarc.lua
+share/rspamd/lua/dynamic_conf.lua
+share/rspamd/lua/emails.lua
+share/rspamd/lua/fann_classifier.lua
+share/rspamd/lua/fann_redis.lua
+share/rspamd/lua/fann_scores.lua
+share/rspamd/lua/force_actions.lua
+share/rspamd/lua/forged_recipients.lua
+share/rspamd/lua/fun.lua
+share/rspamd/lua/fuzzy_collect.lua
+share/rspamd/lua/greylist.lua
+share/rspamd/lua/hfilter.lua
+share/rspamd/lua/history_redis.lua
+share/rspamd/lua/ip_score.lua
+share/rspamd/lua/maillist.lua
+share/rspamd/lua/metadata_exporter.lua
+share/rspamd/lua/metric_exporter.lua
+share/rspamd/lua/mid.lua
+share/rspamd/lua/mime_types.lua
+share/rspamd/lua/multimap.lua
+share/rspamd/lua/mx_check.lua
+share/rspamd/lua/once_received.lua
+share/rspamd/lua/phishing.lua
+share/rspamd/lua/ratelimit.lua
+share/rspamd/lua/rbl.lua
+share/rspamd/lua/replies.lua
+share/rspamd/lua/rmilter_headers.lua
+share/rspamd/lua/rspamd_update.lua
+share/rspamd/lua/settings.lua
+share/rspamd/lua/spamassassin.lua
+share/rspamd/lua/trie.lua
+share/rspamd/lua/url_redirector.lua
+share/rspamd/lua/url_reputation.lua
+share/rspamd/lua/url_tags.lua
+share/rspamd/lua/whitelist.lua
+share/rspamd/rules/forwarding.lua
+share/rspamd/rules/global_functions.lua
+share/rspamd/rules/headers_checks.lua
+share/rspamd/rules/html.lua
+share/rspamd/rules/http_headers.lua
+share/rspamd/rules/mid.lua
+share/rspamd/rules/misc.lua
+share/rspamd/rules/regexp/compromised_hosts.lua
+share/rspamd/rules/regexp/drugs.lua
+share/rspamd/rules/regexp/fraud.lua
+share/rspamd/rules/regexp/headers.lua
+share/rspamd/rules/regexp/lotto.lua
+share/rspamd/rules/regexp/misc.lua
+share/rspamd/rules/regexp/upstream_spam_filters.lua
+share/rspamd/rules/rspamd.classifiers.lua
+share/rspamd/rules/rspamd.lua
+share/rspamd/rules/subject_checks.lua
+share/rspamd/www/README.md
+share/rspamd/www/css/bootstrap.min.css
+share/rspamd/www/css/d3evolution.css
+share/rspamd/www/css/datatables.min.css
+share/rspamd/www/css/rspamd.css
+share/rspamd/www/favicon.ico
+share/rspamd/www/fonts/glyphicons-halflings-regular.ttf
+share/rspamd/www/fonts/glyphicons-halflings-regular.woff
+share/rspamd/www/fonts/glyphicons-halflings-regular.woff2
+share/rspamd/www/img/asc.png
+share/rspamd/www/img/desc.png
+share/rspamd/www/img/rspamd_logo_navbar.png
+share/rspamd/www/index.html
+share/rspamd/www/js/app/config.js
+share/rspamd/www/js/app/graph.js
+share/rspamd/www/js/app/history.js
+share/rspamd/www/js/app/rspamd.js
+share/rspamd/www/js/app/stats.js
+share/rspamd/www/js/app/symbols.js
+share/rspamd/www/js/app/upload.js
+share/rspamd/www/js/lib/bootstrap.min.js
+share/rspamd/www/js/lib/d3.min.js
+share/rspamd/www/js/lib/d3evolution.min.js
+share/rspamd/www/js/lib/d3pie.min.js
+share/rspamd/www/js/lib/datatables.min.js
+share/rspamd/www/js/lib/domReady.js
+share/rspamd/www/js/lib/humanize.min.js
+share/rspamd/www/js/lib/jquery-3.1.1.min.js
+share/rspamd/www/js/lib/visibility.min.js
+share/rspamd/www/js/main.js
+share/rspamd/www/js/require.js
+share/rspamd/www/plugins.txt
+share/rspamd/www/react-index.html
diff --git a/rspamd15/distinfo b/rspamd15/distinfo
new file mode 100644
index 0000000000..3ae95b1005
--- /dev/null
+++ b/rspamd15/distinfo
@@ -0,0 +1,8 @@
+$NetBSD$
+
+SHA1 (rspamd-1.5.3.tar.xz) = bfadf6162dcf3d6c9dad85a607b631cb7f2fcea0
+RMD160 (rspamd-1.5.3.tar.xz) = 8b88e883aaf38db030cc0c4c3f5f2d357088be7a
+SHA512 (rspamd-1.5.3.tar.xz) = 68bdd593b03c299285d2cd56e945dbd38f823fbf7e9300318e7b05a3084eb751cb48134e69c13705e462838d814dd29bdca4631933eb23c0febf4d2fd223a153
+Size (rspamd-1.5.3.tar.xz) = 1854812 bytes
+SHA1 (patch-CMakeLists.txt) = 81b847220b8c8736b13209fb5bedf0020a8d7acf
+SHA1 (patch-src_CMakeLists.txt) = c80015bb275ba8b9ad31491311275bf353f8f30a
diff --git a/rspamd15/files/rspamd.sh b/rspamd15/files/rspamd.sh
new file mode 100644
index 0000000000..819296f610
--- /dev/null
+++ b/rspamd15/files/rspamd.sh
@@ -0,0 +1,37 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD$
+#
+# PROVIDE: rspamd
+# REQUIRE: DAEMON
+# BEFORE: mail
+
+if [ -f /etc/rc.subr ]; then
+	. /etc/rc.subr
+fi
+
+name="rspamd"
+rcvar=$name
+command="@PREFIX@/bin/rspamd"
+pidfile="@VARBASE@/run/rspamd/${name}.pid"
+command_args="-c @PKG_SYSCONFDIR@/rspamd.conf"
+required_files="@PKG_SYSCONFDIR@/rspamd.conf"
+start_precmd="rspamd_precmd"
+
+rspamd_precmd()
+{
+	if [ ! -d @VARBASE@/run/rspamd ]; then
+		@MKDIR@ @VARBASE@/run/rspamd
+		@CHMOD@ 0755 @VARBASE@/run/rspamd
+		@CHOWN@ @RSPAMD_USER@:@RSPAMD_GROUP@ @VARBASE@/run/rspamd
+	fi
+}
+
+if [ -f /etc/rc.subr ]; then
+        load_rc_config $name
+	run_rc_command "$1"
+else
+	echo -n " ${name}"
+	${command} ${rspamd_flags} ${command_args}
+fi
+
diff --git a/rspamd15/files/smf/manifest.xml b/rspamd15/files/smf/manifest.xml
new file mode 100644
index 0000000000..be47e3d170
--- /dev/null
+++ b/rspamd15/files/smf/manifest.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<service_bundle type="manifest" name="export">
+
+    <service name="@SMF_PREFIX@/@SMF_NAME@" type="service" version="1">
+
+        <create_default_instance enabled="false"/>
+        
+        <single_instance/>
+
+        <dependency name="network" grouping="require_all" restart_on="error" type="service">
+            <service_fmri value="svc:/milestone/network:default"/>
+        </dependency>
+
+        <dependency name="filesystem" grouping="require_all" restart_on="error" type="service">
+            <service_fmri value="svc:/system/filesystem/local"/>
+        </dependency>
+        
+        <method_context>
+        </method_context>
+
+        <exec_method type="method" name="start" exec="@PREFIX@/bin/rspamd -i -f -c %{config_file}" timeout_seconds="60"/>
+        <exec_method type="method" name="stop" exec=":kill" timeout_seconds="60"/>
+
+        <property_group name="startd" type="framework">
+            <propval name="duration" type="astring" value="child"/>
+            <propval name="ignore_error" type="astring" value="core,signal"/>
+        </property_group>
+
+        <property_group name="application" type="application">
+            <propval name="config_file" type="astring" value="@PKG_SYSCONFDIR@/rspamd.conf"/>
+        </property_group>
+        
+
+        <template>
+            <common_name>
+                <loctext xml:lang="C">
+                    Rspamd spam filtering system.
+                </loctext>
+            </common_name>
+        </template>
+
+    </service>
+
+</service_bundle>
diff --git a/rspamd15/options.mk b/rspamd15/options.mk
new file mode 100644
index 0000000000..3f732fb75b
--- /dev/null
+++ b/rspamd15/options.mk
@@ -0,0 +1,18 @@
+# $NetBSD$
+
+PKG_OPTIONS_VAR=	PKG_OPTIONS.rspamd15
+
+PKG_SUPPORTED_OPTIONS=	gd
+
+.include "../../mk/bsd.options.mk"
+
+###
+### Enable fuzzy matching for images
+###
+.if !empty(PKG_OPTIONS:Mgd)
+.include "../../graphics/gd/buildlink3.mk"
+CMAKE_ARGS+=	-DENABLE_GD=ON
+.else
+CMAKE_ARGS+=	-DENABLE_GD=OFF
+.endif
+
diff --git a/rspamd15/patches/patch-CMakeLists.txt b/rspamd15/patches/patch-CMakeLists.txt
new file mode 100644
index 0000000000..6dd4f59015
--- /dev/null
+++ b/rspamd15/patches/patch-CMakeLists.txt
@@ -0,0 +1,35 @@
+$NetBSD: patch-CMakeLists.txt,v 1.3 2017/02/17 15:01:52 wiz Exp $
+
+For pkgsrc. Install config files to examples directory.
+
+--- CMakeLists.txt.orig	2016-09-01 11:42:54.000000000 +0000
++++ CMakeLists.txt
+@@ -1244,9 +1244,9 @@ FILE(GLOB_RECURSE CONF_FILES RELATIVE "$
+ 	"${CMAKE_CURRENT_SOURCE_DIR}/conf/*" )
+ FOREACH(CONF_FILE ${CONF_FILES})
+ 	GET_FILENAME_COMPONENT(_rp ${CONF_FILE} PATH)
+-	INSTALL(CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}${CONFDIR}/${_rp})")
++	INSTALL(CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}${EXAMPLESDIR}/${_rp})")
+ 	INSTALL(FILES "${CMAKE_CURRENT_SOURCE_DIR}/conf/${CONF_FILE}"
+-		DESTINATION ${CONFDIR}/${_rp})
++		DESTINATION ${EXAMPLESDIR}/${_rp})
+ ENDFOREACH(CONF_FILE)
+ 
+ # Main config is special due to systemd
+@@ -1256,13 +1256,13 @@ ELSE(WANT_SYSTEMD_UNITS MATCHES "ON")
+ 	SET(MAIN_CONF "conf/rspamd.sysvinit.conf")
+ ENDIF(WANT_SYSTEMD_UNITS MATCHES "ON")
+ IF(BUILD_PORT)
+-	INSTALL_IF_NOT_EXISTS(${MAIN_CONF} ${CONFDIR} "rspamd.conf" ".sample")
++	INSTALL_IF_NOT_EXISTS(${MAIN_CONF} ${EXAMPLESDIR} "rspamd.conf" ".sample")
+ ELSE(BUILD_PORT)
+-	INSTALL_IF_NOT_EXISTS(${MAIN_CONF} ${CONFDIR} "rspamd.conf" "")
++	INSTALL_IF_NOT_EXISTS(${MAIN_CONF} ${EXAMPLESDIR} "rspamd.conf" "")
+ ENDIF(BUILD_PORT)
+ # Debian is also special
+ IF(DEBIAN_BUILD)
+-	INSTALL_IF_NOT_EXISTS("conf/rspamd.sysvinit.conf" ${CONFDIR} "rspamd.sysvinit.conf" "")
++	INSTALL_IF_NOT_EXISTS("conf/rspamd.sysvinit.conf" ${EXAMPLESDIR} "rspamd.sysvinit.conf" "")
+ ENDIF(DEBIAN_BUILD)
+ IF(INSTALL_EXAMPLES MATCHES "ON")
+ 	INSTALL(FILES ${MAIN_CONF} DESTINATION ${EXAMPLESDIR})
diff --git a/rspamd15/patches/patch-src_CMakeLists.txt b/rspamd15/patches/patch-src_CMakeLists.txt
new file mode 100644
index 0000000000..ce11472015
--- /dev/null
+++ b/rspamd15/patches/patch-src_CMakeLists.txt
@@ -0,0 +1,16 @@
+$NetBSD: patch-src_CMakeLists.txt,v 1.2 2017/02/17 15:01:33 wiz Exp $
+
+Add librt to link line for shm_open().
+
+--- src/CMakeLists.txt.orig	2016-10-17 14:30:59.000000000 +0000
++++ src/CMakeLists.txt
+@@ -141,6 +141,9 @@ TARGET_LINK_LIBRARIES(rspamd-server rspa
+ TARGET_LINK_LIBRARIES(rspamd-server lcbtrie)
+ TARGET_LINK_LIBRARIES(rspamd-server rspamd-zstd)
+ 
++# for shm_open
++TARGET_LINK_LIBRARIES(rspamd-server rt)
++
+ IF (ENABLE_CLANG_PLUGIN MATCHES "ON")
+ 	ADD_DEPENDENCIES(rspamd-server rspamd-clang)
+ ENDIF()


Home | Main Index | Thread Index | Old Index