| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
%: |
| 4 |
dh $@ |
| 5 |
|
| 6 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 7 |
|
| 8 |
ENABLE_LUA := $(shell \ |
| 9 |
if pkg-config luajit; \ |
| 10 |
then echo ON; \ |
| 11 |
else echo OFF; \ |
| 12 |
fi) |
| 13 |
|
| 14 |
override_dh_auto_clean: |
| 15 |
-rm -rf obj-graphical obj-text-only |
| 16 |
|
| 17 |
ETTERCAP_OPTIONS= \ |
| 18 |
-DENABLE_IPV6=ON \ |
| 19 |
-DBUNDLED_LIBS=OFF \ |
| 20 |
-DENABLE_LUA=$(ENABLE_LUA) \ |
| 21 |
-DCMAKE_BUILD_TYPE=RelWithDebInfo \ |
| 22 |
-DENABLE_TESTS=ON \ |
| 23 |
-DDISABLE_RPATH=ON \ |
| 24 |
-DNO_INSTALL_LICENSE=ON \ |
| 25 |
-DENABLE_PDF_DOCS=ON |
| 26 |
override_dh_auto_configure: |
| 27 |
@echo ENABLE_LUA = $(ENABLE_LUA) |
| 28 |
dh_auto_configure --builddirectory=obj-text-only -- $(ETTERCAP_OPTIONS) -DENABLE_GTK=OFF |
| 29 |
dh_auto_configure --builddirectory=obj-graphical -- $(ETTERCAP_OPTIONS) -DENABLE_GTK=ON |
| 30 |
|
| 31 |
override_dh_auto_build: override_dh_auto_build-text-only |
| 32 |
override_dh_auto_build: override_dh_auto_build-graphical |
| 33 |
|
| 34 |
override_dh_auto_build-text-only: ; dh_auto_build --parallel --builddirectory=obj-text-only |
| 35 |
override_dh_auto_build-graphical: ; dh_auto_build --parallel --builddirectory=obj-graphical |
| 36 |
|
| 37 |
override_dh_auto_test: override_dh_auto_test-text-only |
| 38 |
override_dh_auto_test: override_dh_auto_test-graphical |
| 39 |
|
| 40 |
override_dh_auto_test-text-only: ; dh_auto_test --parallel --builddirectory=obj-text-only |
| 41 |
override_dh_auto_test-graphical: ; dh_auto_test --parallel --builddirectory=obj-graphical |
| 42 |
|
| 43 |
override_dh_auto_install: |
| 44 |
dh_auto_install --builddirectory=obj-text-only |
| 45 |
mv debian/tmp/usr/lib/*/libettercap-ui.so* obj-text-only |
| 46 |
mv debian/tmp/usr/bin/* obj-text-only |
| 47 |
dh_auto_install --builddirectory=obj-graphical |
| 48 |
|
| 49 |
override_dh_install: |
| 50 |
dh_install |
| 51 |
@echo The ettercap-pkexec man page belongs in ettercap-graphical |
| 52 |
-rm --verbose debian/ettercap-common/usr/share/ettercap/doc/ettercap-pkexec* |
| 53 |
-rm --verbose debian/ettercap-common/usr/share/man/man*/ettercap-pkexec* |
| 54 |
@echo The ettercap images belongs in ettercap-graphical |
| 55 |
-rm --verbose debian/ettercap-common/usr/share/ettercap/*.png |
| 56 |
-rm --verbose debian/ettercap-common/usr/share/ettercap/*.svg |
| 57 |
|
| 58 |
override_dh_installdocs: |
| 59 |
dh_installdocs -pettercap-common |
| 60 |
dh_installdocs -Nettercap-common --link-doc=ettercap-common |