#!/usr/bin/make -f # verbose mode export DH_VERBOSE=1 SURICATA_DESTDIR = $(CURDIR)/debian/suricata export DEB_BUILD_MAINT_OPTIONS=hardening=+pie,+bindnow include /usr/share/dpkg/architecture.mk LUAJIT_ARCHS = i386 amd64 powerpc mips mipsel armel armhf HYPERSCAN_ARCHS = i386 amd64 hurd-i386 kfreebsd-amd64 x32 RUST_ARCHS = i386 amd64 ifneq (,$(findstring $(DEB_HOST_ARCH),$(LUAJIT_ARCHS))) ENABLE_LUAJIT="--enable-luajit" endif ifneq (,$(findstring $(DEB_HOST_ARCH),$(HYPERSCAN_ARCHS))) ENABLE_HYPERSCAN="--enable-libhs" endif ifneq (,$(findstring $(DEB_HOST_ARCH),$(RUST_ARCHS))) ENABLE_HYPERSCAN="--enable-rust" endif CI ?= $(shell $(CURDIR)/debian/building-in-ci.sh) ifeq ($(CI),true) ENABLE_UNITTESTS="--enable-unittests" endif CONFIGURE_ARGS = --enable-af-packet --enable-nfqueue --enable-prelude --enable-nflog \ --enable-gccprotect --disable-gccmarch-native \ --with-libnss-includes=/usr/include/nss --with-libnss-libraries=/usr/lib/$(DEB_HOST_MULTIARCH) \ --with-libnspr-includes=/usr/include/nspr --with-libnspr-libraries=/usr/lib/$(DEB_HOST_MULTIARCH) \ --with-libevent-includes=/usr/include --with-libevent-libraries=/usr/lib/$(DEB_HOST_MULTIARCH) \ --disable-coccinelle \ --enable-geoip --enable-hiredis \ --enable-non-bundled-htp \ $(ENABLE_LUAJIT) \ $(ENABLE_HYPERSCAN) \ $(ENABLE_UNITTESTS) override_dh_auto_configure: dh_auto_configure -- $(CONFIGURE_ARGS) override_dh_auto_install: dh_auto_install rm -rf $(SURICATA_DESTDIR)/usr/lib/python*;\ (cd python &&\ python -B setup.py install --install-layout=deb --prefix $(SURICATA_DESTDIR)/usr) # clean upstream install documentation rm -rf $(SURICATA_DESTDIR)/usr/share/doc/suricata/* override_dh_strip: dh_strip --dbgsym-migration='suricata-dbg (<< 1:4.0.0-2~)' override_dh_auto_test: # do nothing %: dh $@ --with python2