Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
145 lines (121 sloc) 5.42 KB
# -*- 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 github 1.0
PortGroup compiler_blacklist_versions 1.0
PortGroup cxx11 1.1
github.setup rspamd rspamd 1.9.2
revision 3
categories mail
license BSD
maintainers nomaintainer
platforms darwin
license Apache-2
homepage http://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 a8dd52a6ede4c52289b23a69d3ea80602e46696e \
sha256 dd1d8e9cdbb1c870be3c1bfee57a6894b6f8174595bc0684212a7c1afa4439f0 \
size 4460935
compiler.blacklist-append *gcc* {clang < 800}
compiler.whitelist clang macports-clang-8.0 macports-clang-7.0 macports-clang-6.0 macports-clang-5.0
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:libevent \
port:libmagic \
port:libstemmer \
port:libunwind \
port:lua \
port:luajit \
path:lib/libopenblas.dylib:OpenBLAS \
port:openssl \
port:perl5 \
port:ragel \
port:sqlite3 \
port:zlib
depends_run-append \
port:hiredis \
port:redis
# 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}
You can’t perform that action at this time.