From e5367bedeb56a86605de3132ec8070a6e95e3660 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Sat, 18 Jan 2020 18:06:55 +0000 Subject: [PATCH] [Minor] Debian: Enable Hyperscan and parallel builds Debian 9 (Stretch) ships with Hyperscan 4.4.1, Ubuntu 18.04 ships with Hyperscan 4.7.0. Follow rspamd's official recommendation and enable support for these. The --parallel option has been supported since 2009 and works perfectly with CMake, so enable it by default. --- debian/control | 2 +- debian/rules | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/debian/control b/debian/control index ca12d425d..87c411fa1 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: rspamd Section: mail Priority: extra Maintainer: Mikhail Gusarov -Build-Depends: debhelper (>= 9), dpkg-dev (>= 1.16.1~), cmake, libglib2.0-dev (>= 2.16.0), libluajit-5.1-dev [amd64 armel armhf i386 kfreebsd-i386 mips mipsel powerpc powerpcspe] | liblua5.1-dev, libpcre3-dev, libssl-dev (>= 1.0), libcurl4-openssl-dev, libsqlite3-dev, libmagic-dev, perl, dh-systemd, libjemalloc-dev, ragel, libicu-dev, zlib1g-dev, libunwind-dev | libunwind8-dev +Build-Depends: debhelper (>= 9), dpkg-dev (>= 1.16.1~), cmake, libglib2.0-dev (>= 2.16.0), libluajit-5.1-dev [amd64 armel armhf i386 kfreebsd-i386 mips mipsel powerpc powerpcspe] | liblua5.1-dev, libpcre3-dev, libssl-dev (>= 1.0), libcurl4-openssl-dev, libsqlite3-dev, libmagic-dev, perl, dh-systemd, libjemalloc-dev, ragel, libicu-dev, zlib1g-dev, libunwind-dev | libunwind8-dev, libhyperscan-dev [amd64 i386] Standards-Version: 3.9.6 Homepage: https://rspamd.com Vcs-Git: git://github.com/vstakhov/rspamd.git diff --git a/debian/rules b/debian/rules index 372aaffcd..8229f2623 100755 --- a/debian/rules +++ b/debian/rules @@ -1,12 +1,18 @@ #!/usr/bin/make -f %: - dh $@ --with systemd + dh $@ --with systemd --parallel .PHONY: override_dh_strip export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed export ASAN_OPTIONS=detect_leaks=0 +ifneq ($(filter $(DEB_TARGET_ARCH),amd64 i386),) + ENABLE_HYPERSCAN := -DENABLE_HYPERSCAN=ON +else + ENABLE_HYPERSCAN := +endif + override_dh_auto_configure: dh_auto_configure -- -DCONFDIR=/etc/rspamd \ -DMANDIR=/usr/share/man \ @@ -27,7 +33,8 @@ override_dh_auto_configure: -DENABLE_LUAJIT=ON \ -DENABLE_TORCH=ON \ -DENABLE_LIBUNWIND=ON \ - -DWANT_SYSTEMD_UNITS=ON + -DWANT_SYSTEMD_UNITS=ON \ + $(ENABLE_HYPERSCAN) override_dh_makeshlibs: dh_makeshlibs -Xrspamd-actrie -- 2.39.5