freebsd-ports/mail/rspamd/Makefile
Stefan Eßer b7f05445c0 Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.

Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.

There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.

This commit implements such a proposal and moves one of the WWW: entries
of each pkg-descr file into the respective port's Makefile. A heuristic
attempts to identify the most relevant URL in case there is more than
one WWW: entry in some pkg-descr file. URLs that are not moved into the
Makefile are prefixed with "See also:" instead of "WWW:" in the pkg-descr
files in order to preserve them.

There are 1256 ports that had no WWW: entries in pkg-descr files. These
ports will not be touched in this commit.

The portlint port has been adjusted to expect a WWW entry in each port
Makefile, and to flag any remaining "WWW:" lines in pkg-descr files as
deprecated.

Approved by:		portmgr (tcberner)
2022-09-07 23:10:59 +02:00

106 lines
3 KiB
Makefile

PORTNAME= rspamd
PORTVERSION= 3.2
PORTREVISION= 1
CATEGORIES= mail
MAINTAINER= vsevolod@FreeBSD.org
COMMENT= Fast spam filtering system
WWW= https://rspamd.com/
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE.md
BUILD_DEPENDS= ragel:devel/ragel
LIB_DEPENDS= libicui18n.so:devel/icu \
libpcre2-8.so:devel/pcre2 \
libsodium.so:security/libsodium
RUN_DEPENDS= ca_root_nss>=3.*:security/ca_root_nss
USES= cmake compiler:c++17-lang cpe gnome perl5 pkgconfig sqlite ssl
CPE_VENDOR= rspamd_project
USE_GITHUB= yes
USE_GNOME= glib20
USE_LDCONFIG= yes
USE_PERL5= build run
USE_RC_SUBR= rspamd
CMAKE_ARGS+= -DBUILD_PORT=yes \
-DCMAKE_INSTALL_PREFIX=${PREFIX} \
-DCONFDIR=${PREFIX}/etc/rspamd \
-DDBDIR=/var/db/rspamd \
-DLIBDIR=${PREFIX}/lib/rspamd \
-DLOGDIR=/var/log/rspamd \
-DMANDIR=${MANPREFIX}/man \
-DRUNDIR=/var/run/rspamd
CONFLICTS_INSTALL= rspamd-devel
SUB_FILES= pkg-message rspamd.newsyslog.conf.sample
USERS= rspamd
GROUPS= rspamd
PLIST_SUB+= ETCDIR=etc/rspamd \
RSPAMDVERSION=${PORTVERSION}
OPTIONS_DEFINE= BLAS CGP GPERF LUAJIT
OPTIONS_DEFINE_amd64= HYPERSCAN
OPTIONS_DEFAULT_amd64= LUAJIT
OPTIONS_DEFAULT_armv7= LUAJIT
OPTIONS_DEFAULT_i386= LUAJIT
OPTIONS_DEFAULT_powerpc= LUAJIT
OPTIONS_DEFAULT_powerpc64= LUAJIT
OPTIONS_DEFAULT_powerpc64le= LUAJIT
OPTIONS_SUB= yes
BLAS_DESC= Use OpenBLAS to accelerate KANN
CGP_DESC= Install Communigate Pro(tm) helper
GPERF_DESC= Google perf-tools profiling
HYPERSCAN_DESC= Use hyperscan optimizations (amd64 only)
LUAJIT_DESC= Use LuaJIT instead of standard Lua
BLAS_LIB_DEPENDS= libblis.so:math/blis \
liblapack.so:math/lapack
BLAS_USES= blaslapack:openblas
BLAS_CMAKE_ON= -DENABLE_BLAS=ON
CGP_RUN_DEPENDS+= p5-AnyEvent-HTTP>=0:www/p5-AnyEvent-HTTP \
p5-AnyEvent>=0:devel/p5-AnyEvent \
p5-EV>=0:devel/p5-EV \
p5-JSON-XS>=0:converters/p5-JSON-XS
GPERF_LIB_DEPENDS= libprofiler.so:devel/google-perftools
GPERF_CMAKE_ON= -DENABLE_GPERF_TOOLS=ON
HYPERSCAN_LIB_DEPENDS= libhs.so:devel/hyperscan
HYPERSCAN_CMAKE_ON= -DENABLE_HYPERSCAN=ON
LUAJIT_LIB_DEPENDS= libluajit-5.1.so:lang/luajit
LUAJIT_USES_OFF= lua:51+
LUAJIT_CMAKE_OFF= -DENABLE_LUAJIT=OFF
.include <bsd.port.options.mk>
.if ${ARCH} == powerpc64
CMAKE_ARGS+= -DENABLE_LTO:BOOL=OFF
LUAJIT_LIB_DEPENDS= libluajit-5.1.so:lang/luajit-openresty
.elif ${ARCH} == powerpc64le
LUAJIT_LIB_DEPENDS= libluajit-5.1.so:lang/luajit-openresty
.endif
post-install:
@${MKDIR} \
${STAGEDIR}/var/log/rspamd \
${STAGEDIR}/var/db/rspamd \
${STAGEDIR}/var/run/rspamd
${RM} ${STAGEDIR}/${ETCDIR}/rspamd.conf.sample
# Linux specific
${RM} ${STAGEDIR}/${ETCDIR}/rspamd.systemd.conf
${RM} ${STAGEDIR}/${ETCDIR}/rspamd.sysvinit.conf
${INSTALL_DATA} ${WRKDIR}/rspamd.newsyslog.conf.sample ${STAGEDIR}${ETCDIR}
@${MKDIR} ${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d
${LN} -s ${ETCDIR}/rspamd.newsyslog.conf ${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d
post-install-CGP-on:
${INSTALL_SCRIPT} ${WRKSRC}/utils/cgp_rspamd.pl ${STAGEDIR}${PREFIX}/bin/rspamd-cgp-helper
.include <bsd.port.mk>