nDPI/packages/ubuntu/debian/rules
Toni 8e84abfa0e
Fix/packaging (#1047)
* Fix OpenWrt build.

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>

* Fixed Debian/Ubuntu packaging.

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>

* Added DPKG package build to a CI job.

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2020-11-03 11:36:40 +01:00

35 lines
1.1 KiB
Makefile
Executable file

#!/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