Damjan Marion | 2ce7f98 | 2017-01-09 20:24:50 +0100 | [diff] [blame] | 1 | #!/usr/bin/make -f |
| 2 | DH_VERBOSE = 1 |
| 3 | PKG=vpp-dpdk |
| 4 | |
| 5 | VERSION = $(shell dpkg-parsechangelog | sed -nr '/^Version:/s/Version: //p') |
| 6 | BASE_VER = $(word 1, $(subst -, ,$(VERSION))) |
| 7 | |
| 8 | export DPDK_BUILD_DIR=$(CURDIR)/_build |
| 9 | export DPDK_INSTALL_DIR=$(CURDIR)/debian/tmp/usr |
| 10 | |
Damjan Marion | b66be27 | 2018-04-26 18:05:46 +0200 | [diff] [blame] | 11 | SRC=$(wildcard _build/dpdk*$(BASE_VER)) |
Damjan Marion | 2ce7f98 | 2017-01-09 20:24:50 +0100 | [diff] [blame] | 12 | |
| 13 | MAKE_ARGS=-C .. |
| 14 | |
| 15 | include /usr/share/dpkg/default.mk |
| 16 | |
| 17 | %: |
| 18 | dh $@ --with dkms |
| 19 | |
| 20 | override_dh_clean: |
| 21 | make $(MAKE_ARGS) clean |
| 22 | |
| 23 | override_dh_auto_configure: |
| 24 | make $(MAKE_ARGS) config |
| 25 | |
| 26 | override_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 Marion | 0e969ac | 2018-06-06 14:23:42 +0200 | [diff] [blame^] | 31 | $(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 Marion | 2ce7f98 | 2017-01-09 20:24:50 +0100 | [diff] [blame] | 35 | debian/dkms/Makefile \ |
| 36 | /usr/src/$(PKG)-dkms-$(VERSION) |
| 37 | dh_install -p$(PKG)-dev --autodest /usr |
| 38 | |
| 39 | override_dh_dkms: |
| 40 | dh_dkms -p$(PKG)-dkms -V $(VERSION) |