blob: 7ef6ba1518ed85070be94e4172093bfe73b3d2c6 [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
Damjan Marionb66be272018-04-26 18:05:46 +020011SRC=$(wildcard _build/dpdk*$(BASE_VER))
Damjan Marion2ce7f982017-01-09 20:24:50 +010012
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 \
Damjan Marion0e969ac2018-06-06 14:23:42 +020031 $(wildcard $(SRC)/*/*/*/igb_uio/igb_uio.c) \
32 $(wildcard $(SRC)/*/*/*/igb_uio/compat.h) \
33 $(wildcard $(SRC)/*/*/igb_uio/igb_uio.c) \
34 $(wildcard $(SRC)/*/*/igb_uio/compat.h) \
Damjan Marion2ce7f982017-01-09 20:24:50 +010035 debian/dkms/Makefile \
36 /usr/src/$(PKG)-dkms-$(VERSION)
37 dh_install -p$(PKG)-dev --autodest /usr
38
39override_dh_dkms:
40 dh_dkms -p$(PKG)-dkms -V $(VERSION)