]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Debian: Enable Hyperscan and parallel builds
authorPeter Wu <peter@lekensteyn.nl>
Sat, 18 Jan 2020 18:06:55 +0000 (18:06 +0000)
committerPeter Wu <peter@lekensteyn.nl>
Sat, 18 Jan 2020 18:06:55 +0000 (18:06 +0000)
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
debian/rules

index ca12d425d5a9f5d3957f97072d6f0e36c4d636ad..87c411fa16445cc5c3eca4913955c6de246a57d4 100644 (file)
@@ -2,7 +2,7 @@ Source: rspamd
 Section: mail
 Priority: extra
 Maintainer: Mikhail Gusarov <dottedmag@debian.org>
-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
index 372aaffcdf5976a99ec76719ca4fb24b14803530..8229f262308eb7497a1d529b3e8da1397ab5ea2b 100755 (executable)
@@ -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