File: rules

package info (click to toggle)
suricata 2.0.7-2
  • links: PTS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 22,224 kB
  • sloc: ansic: 327,574; cpp: 23,667; sh: 11,603; perl: 810; makefile: 680; python: 378; php: 170
file content (56 lines) | stat: -rwxr-xr-x 2,003 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f
# -*- makefile -*-
# debian/rules file for Suricata
# Written by Pierre Chifflier
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS=hardening=+pie,+bindnow

DEB_DESTDIR = $(CURDIR)/debian/suricata

ARCH ?= $(shell dpkg --print-architecture)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

LUAJIT_ARCHS = i386 amd64 powerpc mips armel armhf

ifneq (,$(findstring $(ARCH),$(LUAJIT_ARCHS)))
	ENABLE_LUAJIT="--enable-luajit"
endif

CONFIGURE_ARGS = --enable-af-packet --enable-nfqueue --enable-prelude \
	--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) \
	--disable-coccinelle \
	$(ENABLE_LUAJIT)

override_dh_auto_install:
	dh_auto_install --destdir=$(DEB_DESTDIR)
	rm -rf $(DEB_DESTDIR)/usr/lib/python*;\
	(cd scripts/suricatasc &&\
		python -B setup.py install --install-layout=deb --prefix $(DEB_DESTDIR)/usr)
	# we don't want to deploy any of the libhtp files, only the .so
	rm -rf $(CURDIR)/debian/suricata/usr/lib/*/*.la
	rm -rf $(CURDIR)/debian/suricata/usr/lib/*/*.a
	rm -rf $(CURDIR)/debian/suricata/usr/lib/*/*.so
	rm -rf $(CURDIR)/debian/suricata/usr/lib/*/pkgconfig
	rm -rf $(CURDIR)/debian/suricata/usr/include

override_dh_auto_configure:
	dh_auto_configure -- $(CONFIGURE_ARGS)
	sed \
		-e 's|^default-rule-path: .*$$|default-rule-path: /etc/suricata/rules|' \
		 suricata.yaml > suricata-debian.yaml

override_dh_clean:
	rm -f suricata-debian.yaml
	dh_clean

%:
	dh  $@ --parallel --with autotools-dev,autoreconf,python2