[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / mail / rspamd

File: [cvs.NetBSD.org] / pkgsrc / mail / rspamd / Makefile (download)

Revision 1.42, Wed May 16 16:49:44 2018 UTC (11 months ago) by fhajny
Branch: MAIN
CVS Tags: pkgsrc-2018Q2-base, pkgsrc-2018Q2
Changes since 1.41: +2 -3 lines

mail/rspamd: Update to 1.7.4.

* [Conf] Major stock config updates:
    - Workers are now specified in a new format worker "type" { ... }
    - Enable fuzzy worker to simplify local fuzzy storages configuration
    - Bind all workers to localhost by default to avoid security flaws
* [Conf] Make more sane fuzzy_check default settings
* [CritFix] Fix ucl escape for bad symbols
* [Feature] Add failure symbol for AV module
* [Feature] Add lazy expiration mode for new classifier schema
* [Feature] Add preliminary version of maps stats plugin
* [Feature] Allow to block fuzzy requests from specific networks
* [Feature] Allow to change `expire` of live statistics
* [Feature] Distinguish AV failure from clean result
* [Feature] Further improvements of language detector by using khash
* [Feature] Further optimization of the lang_detection
* [Feature] Implement cluster-aware bayes expiry
* [Feature] Implement exclude patterns in rspamc
* [Feature] Implement glob maps in addition to regexp maps
* [Feature] Implement map statistics function for lua API
* [Feature] Implement stop symbols for Clickhouse collection
* [Feature] Support recipients separated by commas
* [Feature] Try harder to upload scripts to the Redis server
* [Feature] Upgrade t1ha distribution
* [Feature] use_domain_sign_inbound
* [Feature] Use scores from maps if `symbols_set` is not defined
* [Fix] Add resolving version of radix map helper
* [Fix] Check URL before adding implicit prefix
* [Fix] Do not check pid/state when using PRNG
* [Fix] Fix CentOS logrotate script for systemd
* [Fix] Fix slash + dot in urls
* [Fix] Fix systemd version of the logrotate script
* [Fix] Propagate key when import implicit array from Lua
* [Fix] Strip spaces from map keys and values
* [Fix] Try to fix a specific case when processing milter protocol
* [Fix] Try to fix crash when a tcp connection cannot be set
* [Fix] Typo use_domain_local --> use_domain_sign_local
* [Fix] Various fixes to once_received module
* [Project] Store hits counters for map elements

# $NetBSD: Makefile,v 1.42 2018/05/16 16:49:44 fhajny Exp $

DISTNAME=	rspamd-1.7.4
CATEGORIES=	mail
MASTER_SITES=	${MASTER_SITE_GITHUB:=vstakhov/}

MAINTAINER=	bartosz.kuzma@gmail.com
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

FILES_SUBST+=	RSPAMD_USER=${RSPAMD_USER}
FILES_SUBST+=	RSPAMD_GROUP=${RSPAMD_GROUP}

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_SQLITE=ON
# Torch requires LuaJIT2, but LuaJIT2 only supports Lua 5.1
CMAKE_ARGS+=	-DENABLE_LUAJIT=OFF
CMAKE_ARGS+=	-DENABLE_TORCH=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

CFGFILES=	2tld.inc actions.conf common.conf composites.conf \
		dmarc_whitelist.inc groups.conf logging.inc \
		maillist.inc metrics.conf mid.inc mime_types.inc \
		modules.conf modules.d/antivirus.conf modules.d/arc.conf \
		modules.d/asn.conf modules.d/clickhouse.conf \
		modules.d/dcc.conf modules.d/dkim_signing.conf \
		modules.d/dkim.conf modules.d/dmarc.conf \
		modules.d/elastic.conf modules.d/emails.conf \
		modules.d/force_actions.conf \
		modules.d/forged_recipients.conf \
		modules.d/fuzzy_check.conf modules.d/greylist.conf \
		modules.d/hfilter.conf modules.d/history_redis.conf \
		modules.d/chartable.conf modules.d/ip_score.conf \
		modules.d/maillist.conf modules.d/metadata_exporter.conf \
		modules.d/metric_exporter.conf modules.d/mid.conf \
		modules.d/milter_headers.conf modules.d/mime_types.conf \
		modules.d/multimap.conf modules.d/mx_check.conf \
		modules.d/neural.conf modules.d/once_received.conf \
		modules.d/phishing.conf modules.d/ratelimit.conf \
		modules.d/rbl.conf modules.d/redis.conf \
		modules.d/regexp.conf modules.d/replies.conf \
		modules.d/rspamd_update.conf modules.d/spamassassin.conf \
		modules.d/spamtrap.conf modules.d/spf.conf \
		modules.d/surbl.conf modules.d/trie.conf \
		modules.d/url_redirector.conf modules.d/url_reputation.conf \
		modules.d/url_tags.conf modules.d/whitelist.conf \
		options.inc redirectors.inc rspamd.conf \
		scores.d/fuzzy_group.conf scores.d/headers_group.conf \
		scores.d/hfilter_group.conf scores.d/mime_types_group.conf \
		scores.d/mua_group.conf scores.d/phishing_group.conf \
		scores.d/policies_group.conf scores.d/rbl_group.conf \
		scores.d/statistics_group.conf scores.d/subject_group.conf \
		scores.d/surbl_group.conf spf_dkim_whitelist.inc \
		statistic.conf surbl-whitelist.inc worker-controller.inc \
		worker-fuzzy.inc worker-normal.inc worker-proxy.inc

.for file in ${CFGFILES}
CONF_FILES=	${EGDIR}/${file} ${PKG_SYSCONFDIR}/${file}
.endfor

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"