blob: 98b1048bade3e3e94b0112dba974f0fc0d4cc90d [file] [log] [blame]
Damjan Marion2ce7f982017-01-09 20:24:50 +01001#!/usr/bin/make -f
2DH_VERBOSE = 1
3PKG=vpp-dpdk
4
5VERSION = $(shell dpkg-parsechangelog | sed -nr '/^Version:/s/Version: //p')
6BASE_VER = $(word 1, $(subst -, ,$(VERSION)))
7
8export DPDK_BUILD_DIR=$(CURDIR)/_build
9export DPDK_INSTALL_DIR=$(CURDIR)/debian/tmp/usr
10
11SRC=_build/dpdk-$(BASE_VER)
12
13MAKE_ARGS=-C ..
14
15include /usr/share/dpkg/default.mk
16
17%:
18 dh $@ --with dkms
19
20override_dh_clean:
21 make $(MAKE_ARGS) clean
22
23override_dh_auto_configure:
24 make $(MAKE_ARGS) config
25
26override_dh_install:
27 make $(MAKE_ARGS) install
28 dh_install -p$(PKG)-dkms \
29 $(SRC)/lib/librte_eal/common/include/rte_pci_dev_feature_defs.h \
30 $(SRC)/lib/librte_eal/common/include/rte_pci_dev_features.h \
31 $(SRC)/lib/librte_eal/linuxapp/igb_uio/igb_uio.c \
32 $(SRC)/lib/librte_eal/linuxapp/igb_uio/compat.h \
33 debian/dkms/Makefile \
34 /usr/src/$(PKG)-dkms-$(VERSION)
35 dh_install -p$(PKG)-dev --autodest /usr
36
37override_dh_dkms:
38 dh_dkms -p$(PKG)-dkms -V $(VERSION)