File: rules

package info (click to toggle)
suricata 1%3A4.1.2-2%2Bdeb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 43,240 kB
  • sloc: ansic: 361,325; python: 5,742; sh: 4,520; makefile: 1,052; perl: 867
file content (61 lines) | stat: -rwxr-xr-x 1,831 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/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