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 | |
| 11 | SRC=_build/dpdk-$(BASE_VER) |
| 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 \ |
| 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 | |
| 37 | override_dh_dkms: |
| 38 | dh_dkms -p$(PKG)-dkms -V $(VERSION) |