void-packages/srcpkgs/rspamd/template
2017-03-10 00:41:43 +01:00

52 lines
1.6 KiB
Bash

# Template file for 'rspamd'
pkgname=rspamd
version=1.5.2
revision=1
build_style=cmake
configure_args="
-DRSPAMD_USER=rspamd
-DCONFDIR=/etc/rspamd
-DDBDIR=/var/lib/rspamd"
hostmakedepends="pkg-config perl ragel"
makedepends="LuaJIT-devel libressl-devel gmime-devel libevent-devel sqlite-devel
hiredis-devel file-devel icu-devel fann-devel gd-devel"
short_desc="Fast, free and open-source spam filtering system"
maintainer="Enno Boland <gottox@voidlinux.eu>"
license="BSD"
homepage="http://rspamd.com/"
distfiles="http://rspamd.com/downloads/rspamd-${version}.tar.xz"
checksum=6ff0c2f5956610d17bd7f470922fc6c53593bb9408f68e25294d2228b1fe315e
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
armv*) broken="https://build.voidlinux.eu/builders/armv6l_builder/builds/29680/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
}