Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
PortSystem 1.0
PortGroup cmake 1.1
PortGroup compiler_blacklist_versions 1.0
PortGroup github 1.0
github.setup rspamd rspamd 2.7
revision 1
categories mail
license BSD
maintainers nomaintainer
platforms darwin
license Apache-2
homepage https://rspamd.com
description Rspamd filtering system is created as a \
replacement of popular spamassassin spamd and is \
designed to be fast, modular and easily extendable \
system.
long_description ${description} Rspamd core is written in C \
language using event driven\ paradigma. Plugins \
for rspamd can be written in lua. Rspamd is \
designed to\ process connections completely \
asynchronous and do not block anywhere in code.
checksums rmd160 2c38377656a7e67cdac666a92d1a58349cc4bf5a \
sha256 85d4c3382a7569fbee743bfd843160c7ee8cd3798887a0b9fa55dab4e84b1ca8 \
size 5126749
depends_build-append \
port:pkgconfig
depends_lib-append \
port:fann \
port:gd2 \
path:lib/pkgconfig/glib-2.0.pc:glib2 \
port:gmime \
port:hyperscan \
port:icu \
port:libevent \
port:libmagic \
port:libsodium \
port:libstemmer \
port:libunwind \
port:lua \
path:lib/libluajit-5.1.2.dylib:luajit \
path:lib/libopenblas.dylib:OpenBLAS \
path:lib/libssl.dylib:openssl \
port:perl5 \
port:ragel \
port:sqlite3 \
port:zlib
depends_run-append \
port:hiredis \
port:redis
# fatal error: error in backend: Cannot select: intrinsic %llvm.x86.aesni.aesenclast
compiler.blacklist {clang < 800}
# Critical dependency note: port:pcre and port:pcre2 break the rspamd binary;
# use native /usr/lib/libpcre.dylib. See https://github.com/rspamd/rspamd/issues/2884
# Do not use the library provided by port:pcre without pcre jit debugging
# Do not use -DENABLE_PCRE2=ON without pcre jit debugging
# # depends_build-append port:pcre
# # depends_build-append port:pcre2
set rspamd_user _rspamd
set rspamd_group ${rspamd_user}
add_users ${rspamd_user} group=${rspamd_group} realname=Rspamd
libpath ${prefix}/var/lib/${name}
# -DCMAKE_OSX_ARCHITECTURES="x86_64" causes the "Symbol not found: _blake2b_blocks_x86" error
# See https://github.com/rspamd/rspamd/issues/2883
cmake.set_osx_architectures no
# Reference: https://github.com/rspamd/rspamd/blob/master/CMakeLists.txt
# Also see https://github.com/rspamd/rspamd/issues/2884
configure.args-append \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCMAKE_INSTALL_PREFIX=${prefix} \
-DCONFDIR=${prefix}/etc/${name} \
-DDBDIR=${prefix}/var/lib/${name} \
-DENABLE_FANN=ON \
-DENABLE_GD=ON \
-DENABLE_HYPERSCAN=ON \
-DENABLE_LIBUNWIND=ON \
-DENABLE_LUAJIT=ON \
-DENABLE_SNOWBALL=ON \
-DENABLE_TORCH=ON \
-DINSTALL_EXAMPLES=ON \
-DLIBDIR=${prefix}/lib \
-DLOGDIR=${prefix}/var/log/${name} \
-DMANDIR=${prefix}/share/man \
-DNO_SHARED=ON \
-DPCRE_ROOT_DIR=/usr/lib \
-DRSPAMD_USER=${rspamd_user} \
-DRUNDIR=${prefix}/var/run/${name}
# Critical dependency note: port:pcre and port:pcre2 break the rspamd binary;
# use native /usr/lib/libpcre.dylib. See https://github.com/rspamd/rspamd/issues/2884
configure.args-append \
-DPCRE_ROOT_DIR=/usr/lib
# Do not use -DENABLE_PCRE2=ON without pcre jit debugging
# # configure.args-append \
# # -DENABLE_PCRE2=ON
# Build with -DENABLE_FULL_DEBUG=ON
# configure.args-append \
# -DENABLE_FULL_DEBUG=ON
test.run yes
test.target run-test
post-destroot {
# create default directories
xinstall -o ${rspamd_user} -g ${rspamd_group} -m 0755 -d ${destroot}${prefix}/var/lib/${name}
xinstall -m 0755 -d ${destroot}${prefix}/share/doc/${name}
xinstall -o ${rspamd_user} -g ${rspamd_group} -m 0755 -d ${destroot}${prefix}/etc/${name}
xinstall -o ${rspamd_user} -g ${rspamd_group} -m 0755 -d ${destroot}${prefix}/var/run/${name}
xinstall -o ${rspamd_user} -g ${rspamd_group} -m 0755 -d ${destroot}${prefix}/var/log/${name}
set docdir ${prefix}/share/doc/${name}
xinstall -m 0755 -d ${destroot}${docdir}
xinstall -m 0444 -W ${worksrcpath} ChangeLog LICENSE.md README.md ${destroot}${docdir}
# install the man pages
xinstall -m 0644 -W ${worksrcpath}/doc rspamadm.1 rspamc.1 ${destroot}${prefix}/share/man/man1
xinstall -m 0644 -W ${worksrcpath}/doc rspamd.8 ${destroot}${prefix}/share/man/man8
}
startupitem.create yes
startupitem.executable \
${prefix}/bin/rspamd \
-u ${rspamd_user} \
-g ${rspamd_group} \
-f \
-c ${prefix}/etc/rspamd/rspamd.conf
destroot.keepdirs \
${destroot}${prefix}/etc/${name} \
${destroot}${prefix}/var/run/${name} \
${destroot}${prefix}/var/lib/${name} \
${destroot}${prefix}/var/log/${name} \
${destroot}${prefix}/share/doc/${name}