File: rules

package info (click to toggle)
ettercap 1%3A0.8.2-10
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 5,468 kB
  • ctags: 6,333
  • sloc: ansic: 47,337; yacc: 310; lex: 204; makefile: 121; xml: 31; sh: 24
file content (72 lines) | stat: -rwxr-xr-x 2,547 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/usr/bin/make -f

%:
	dh $@

LIBNET_VER := $(shell dpkg --status libnet1-dev | awk '/^Version:/ {print $$2}')

ENABLE_IPV6 := $(shell \
 if dpkg --compare-versions $(LIBNET_VER) ge 1.1.6; \
 then echo ON; \
 else echo OFF; \
 fi)

ENABLE_LUA := $(shell \
 if pkg-config luajit; \
 then echo ON; \
 else echo OFF; \
 fi)

override_dh_auto_clean:
	-rm -rf obj-graphical obj-text-only

ETTERCAP_OPTIONS= \
 -DENABLE_IPV6=$(ENABLE_IPV6) \
 -DBUNDLED_LIBS=OFF \
 -DENABLE_LUA=$(ENABLE_LUA) \
 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
 -DENABLE_TESTS=ON \
 -DDISABLE_RPATH=ON \
 -DNO_INSTALL_LICENSE=ON \
 -DENABLE_PDF_DOCS=ON
override_dh_auto_configure:
	@echo LIBNET_VER = $(LIBNET_VER)
	@echo ENABLE_IPV6 = $(ENABLE_IPV6)
	@echo ENABLE_LUA = $(ENABLE_LUA)
	dh_auto_configure --parallel --builddirectory=obj-text-only -- $(ETTERCAP_OPTIONS) -DENABLE_GTK=OFF
	dh_auto_configure --parallel --builddirectory=obj-graphical -- $(ETTERCAP_OPTIONS) -DENABLE_GTK=ON

override_dh_auto_build: override_dh_auto_build-text-only
override_dh_auto_build: override_dh_auto_build-graphical

override_dh_auto_build-text-only: ; dh_auto_build --parallel --builddirectory=obj-text-only
override_dh_auto_build-graphical: ; dh_auto_build --parallel --builddirectory=obj-graphical

override_dh_auto_test: override_dh_auto_test-text-only
override_dh_auto_test: override_dh_auto_test-graphical

override_dh_auto_test-text-only: ; dh_auto_test --parallel --builddirectory=obj-text-only
override_dh_auto_test-graphical: ; dh_auto_test --parallel --builddirectory=obj-graphical

override_dh_auto_install:
	dh_auto_install --parallel --builddirectory=obj-graphical
#	dh_auto_install --parallel --builddirectory=obj-text-only

override_dh_install:
	dh_install --list-missing
	@echo The ettercap-pkexec man page belongs in ettercap-graphical
	-rm --verbose debian/ettercap-common/usr/share/ettercap/doc/ettercap-pkexec*
	-rm --verbose debian/ettercap-common/usr/share/man/man*/ettercap-pkexec*
	@echo The ettercap images belongs in ettercap-graphical
	-rm --verbose debian/ettercap-common/usr/share/ettercap/*.png
	-rm --verbose debian/ettercap-common/usr/share/ettercap/*.svg
	@echo "Upstream does not set RPATH, but the file is not handled by cmake install (dh_auto_install target)"
	chrpath --list   debian/ettercap-text-only/usr/bin/ettercap
	chrpath --delete debian/ettercap-text-only/usr/bin/ettercap

override_dh_installdocs:
	dh_installdocs -pettercap-common
	dh_installdocs -Nettercap-common --link-doc=ettercap-common

override_dh_strip:
	dh_strip --dbg-package=ettercap-dbg