197d050d77
Closes #14030. Signed-off-by: Enno Boland <gottox@voidlinux.eu>
50 lines
1.5 KiB
Bash
50 lines
1.5 KiB
Bash
# Template file for 'rspamd'
|
|
pkgname=rspamd
|
|
version=1.7.4
|
|
revision=1
|
|
build_style=cmake
|
|
configure_args="-DRSPAMD_USER=rspamd -DCONFDIR=/etc/rspamd
|
|
-DDBDIR=/var/lib/rspamd"
|
|
hostmakedepends="perl pkg-config ragel"
|
|
makedepends="LuaJIT-devel fann-devel file-devel gd-devel gmime-devel
|
|
hiredis-devel icu-devel libevent-devel sqlite-devel"
|
|
short_desc="Fast, free and open-source spam filtering system"
|
|
maintainer="Enno Boland <gottox@voidlinux.eu>"
|
|
license="Apache-2.0"
|
|
homepage="http://rspamd.com/"
|
|
distfiles="https://github.com/vstakhov/rspamd/archive/${version}.tar.gz"
|
|
checksum=0513ebed75b3e4990ae699b868598ae27b27b9e50a20d65dfcca3b1245a1a664
|
|
system_accounts="rspamd"
|
|
rspamd_homedir="/var/lib/rspamd"
|
|
conf_files="/etc/rspamd/*.conf /etc/rspamd/*.inc /etc/rspamd/modules.d/*.conf"
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
arm*) broken="https://build.voidlinux.eu/builders/armv7l_builder/builds/8365/steps/shell_3/logs/stdio" ;;
|
|
esac
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
hostmakedepends+=" ${makedepends}"
|
|
|
|
pre_build() {
|
|
make -C build_native/contrib/snowball
|
|
sed -i "s#\./snowball#../../../build_native/contrib/snowball/snowball#g" \
|
|
build/contrib/snowball/CMakeFiles/stemmer.dir/build.make
|
|
}
|
|
fi
|
|
|
|
pre_configure() {
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
*-musl) # Remove non existing library nsl
|
|
sed -i CMakeLists.txt -e "/LIST(APPEND CMAKE_REQUIRED_LIBRARIES nsl)/d"
|
|
esac
|
|
if [ "$CROSS_BUILD" ]; then
|
|
configure_args+=" -C ${FILESDIR}/TryRunResults.cmake"
|
|
mkdir -p build_native
|
|
( cd build_native; LD= CC= CFLAGS= LDFLAGS= cmake .. )
|
|
fi
|
|
}
|
|
|
|
post_install() {
|
|
vsv rspamd
|
|
vlicense LICENSE
|
|
}
|