aboutsummaryrefslogtreecommitdiff
path: root/packages/ubuntu/debian/rules
blob: 7d4e02758436d7f2e8b7ed6e198f88f608c931d5 (plain)
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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DH_VERBOSE=1

DPKG_EXPORT_BUILDFLAGS = 1

include /usr/share/dpkg/buildflags.mk
include /usr/share/dpkg/pkg-info.mk


%:
	dh $@

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	cd ../../tests && LD_LIBRARY_PATH=$(CURDIR)/src/lib ./do.sh
	cd ../../tests && LD_LIBRARY_PATH=$(CURDIR)/src/lib ./do-unit.sh
endif

override_dh_installdocs:
	# FIXME: nDPI does currently not have any up2date doc

override_dh_auto_install:
	make -j1 install DESTDIR="$(CURDIR)/debian/tmp" AM_UPDATE_INFO_DIR=no
	# ndpi package
	mkdir -p "$(CURDIR)/debian/ndpi/usr/"
	mv -v "$(CURDIR)/debian/tmp/usr/bin"   "$(CURDIR)/debian/ndpi/usr/"
	mv -v "$(CURDIR)/debian/tmp/usr/lib"   "$(CURDIR)/debian/ndpi/usr/"
	mv -v "$(CURDIR)/debian/tmp/usr/share" "$(CURDIR)/debian/ndpi/usr/"
	# ndpi-dev package
	mkdir -p "$(CURDIR)/debian/ndpi-dev/usr/include"
	mv -v "$(CURDIR)/debian/tmp/usr/include/ndpi" "$(CURDIR)/debian/ndpi-dev/usr/include/"

.PHONY: override_dh_auto_configure override_dh_installdocs override_dh_auto_install