Note new packages in d/changelog
[deb_dpdk.git] / debian / rules
1 #!/usr/bin/make -f
2 # See debhelper(7) (uncomment to enable)
3 # output every command that modifies files on the build system.
4 export DH_VERBOSE=1
5 export DH_OPTIONS=-v
6
7 # see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
8 include /usr/share/dpkg/default.mk
9
10 DPDK_ABI := $(shell echo $(DEB_VERSION_UPSTREAM) | cut -d '-' -f1 | cut -d '.'  -f1-2 | cut -d '~' -f1)
11 DPDK_DRIVER_DIR ?= dpdk-$(DPDK_ABI)-drivers
12
13 # see FEATURE AREAS in dpkg-buildflags(1)
14 export DEB_BUILD_MAINT_OPTIONS = hardening=+all,-pie
15
16 # see ENVIRONMENT in dpkg-buildflags(1)
17 DPKG_EXPORT_BUILDFLAGS = 1
18 include /usr/share/dpkg/buildflags.mk
19
20 # Support backporting to jessie
21 dpkg_version_lt = $(shell dpkg --compare-versions $$(dpkg --status dpkg-dev | grep Version | cut -d' ' -f2) lt-nl "1.18.11" && echo yes)
22 ifeq (yes, $(dpkg_version_lt))
23         # package maintainers to append CFLAGS
24         # For Debian, dpkg-dev >= 1.18.11 and gcc 6.x, dpkg-buildflags and gcc
25         # handle -fPIC and related flags relying on specs files
26         # (/usr/share/dpkg/*specs)
27         export DEB_CFLAGS_MAINT_APPEND  = -fPIC
28         export EXTRA_CFLAGS=$(CFLAGS)
29         export EXTRA_CPPFLAGS=$(CPPFLAGS)
30         export HOST_EXTRA_CFLAGS=$(CFLAGS)
31         export HOST_EXTRA_CPPFLAGS=$(CPPFLAGS)
32         # need to be stripped as DPDK build system adds them and it would be -Wl,-Wl,opt
33         export EXTRA_LDFLAGS=$(shell echo $(LDFLAGS) | sed 's/-Wl,//g')
34         # HOST_CC build system does not add -Wl ...
35         export EXTRA_HOST_LDFLAGS=$(LDFLAGS)
36 endif
37
38 export RTE_DEVEL_BUILD=n
39 export EXTRA_CFLAGS+=-g
40
41 # People rebuilding this package can overwrite DPDK_CONFIG, RTE_MACHINE and
42 # RTE_TARGET via DEB_BUILD_OPTIONS if they like
43 ifneq (,$(filter dpdk_config=%,$(DEB_BUILD_OPTIONS)))
44     DPDK_CONFIG ?= $(patsubst dpdk_config=%,%,$(filter dpdk_config=%,$(DEB_BUILD_OPTIONS)))
45 endif
46 ifneq (,$(filter rte_machine=%,$(DEB_BUILD_OPTIONS)))
47     RTE_MACHINE ?= $(patsubst rte_machine=%,%,$(filter rte_machine=%,$(DEB_BUILD_OPTIONS)))
48 endif
49 ifneq (,$(filter rte_target=%,$(DEB_BUILD_OPTIONS)))
50     RTE_TARGET ?= $(patsubst rte_target=%,%,$(filter rte_target=%,$(DEB_BUILD_OPTIONS)))
51 endif
52
53 ifneq (,$(filter $(DEB_HOST_ARCH), arm64))
54 DPDK_CONFIG ?= "arm64-armv8a-linuxapp-gcc"
55 RTE_MACHINE ?= "armv8a"
56 RTE_TARGET ?= "arm64-armv8a-linuxapp-gcc"
57 INCLUDE_ARCH := arm
58 else
59 ifneq (,$(filter $(DEB_HOST_ARCH), armhf))
60 DPDK_CONFIG ?= "arm-armv7a-linuxapp-gcc"
61 RTE_MACHINE ?= "armv7a"
62 RTE_TARGET ?= "arm-armv7a-linuxapp-gcc"
63 INCLUDE_ARCH := arm
64 else
65 ifneq (,$(filter $(DEB_HOST_ARCH), ppc64el))
66 DPDK_CONFIG ?= "ppc_64-power8-linuxapp-gcc"
67 RTE_MACHINE ?= "power8"
68 RTE_TARGET ?= "ppc_64-power8-linuxapp-gcc"
69 INCLUDE_ARCH := ppc_64
70 else
71 DPDK_CONFIG ?= "$(DEB_HOST_GNU_CPU)-native-linuxapp-gcc"
72 RTE_MACHINE ?= "default"
73 RTE_TARGET ?= "$(DEB_HOST_GNU_CPU)-default-linuxapp-gcc"
74 INCLUDE_ARCH := x86
75 endif
76 endif
77 endif
78 DPDK_STATIC_DIR = "debian/build/static-root"
79 DPDK_SHARED_DIR = "debian/build/shared-root"
80
81 # now stable with parallel comilation, so support -j
82 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
83     PAR := $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
84     MAKEFLAGS += -j$(PAR)
85 endif
86
87 ifneq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS)))
88 BUILD_DOCS=n
89 else
90 BUILD_DOCS=y
91 endif
92
93 ifneq (,$(findstring nostatic,$(DEB_BUILD_OPTIONS)))
94 BUILD_STATIC_LIB=n
95 else
96 BUILD_STATIC_LIB=y
97 endif
98
99 # kernel_modules can be passed via DEB_BUILD_OPTIONS to enable building the
100 # optional binary kernel modules package. By default it will be built against
101 # the current kernel, or ksrc can be passed with a path to the target kernel
102 # sources instead.
103 ifeq (,$(findstring kernel_modules,$(DEB_BUILD_OPTIONS)))
104 DPDK_CONFIG_BUILD_KMOD=n
105 KSRC=""
106 else
107 ifneq (,$(filter ksrc=%,$(DEB_BUILD_OPTIONS)))
108     KSRC := $(patsubst ksrc=%,%,$(filter ksrc=%,$(DEB_BUILD_OPTIONS)))
109 else
110     KSRC := /lib/modules/$(shell uname -r)/build
111 endif
112
113 KVERS := $(shell perl debian/kernel-version $(KSRC))
114 export KVERS
115 export MODULE_CFLAGS=-fno-PIE
116
117 DPDK_CONFIG_BUILD_KMOD=y
118
119 # Since the binary module package is generated at build time depending on the
120 # local kernel version, we have to append the new package in d/control.
121 # We cannot use a separate control file since that wouldn't work with
122 # dpkg-genchanges, and also would require a lot of overrides for debhelpers.
123 get_built_using ?= $(filter-out (=),$(shell dpkg-query -f='$${source:Package} (=$${source:Version})' -W $1))
124
125 build:
126         @if [ x"$(KVERS)" = x ] ; then \
127             echo 'No version in $(KSRC)/include/linux/version.h' >&2; \
128             exit 1; \
129         fi
130         sh debian/prep-modules $(KSRC)
131         cat debian/control.modules >> debian/control
132         dh $@ --with python3,dkms,systemd
133 endif
134
135 %:
136         dh $@ --with python3,dkms,systemd
137
138 override_dh_gencontrol:
139         dh_gencontrol
140         # debian/files will not exist until dh_gencontrol has ran at least once,
141         # so we need to run gencontrol for libdpdk-dev and libdpdk-dbgsym after.
142         # The list of libraries and PMDs is everchanging, so generate the dependency
143         # list for libdpdk-dev to avoid having to maintain it manually.
144         # Same for the recommends list for dpdk, were we want the PMDs and the mempools.
145         dh_gencontrol -p libdpdk-dev -- -V"librte:Depends=`grep -E 'librte-*' ./debian/files | grep -v dbgsym | tr '_' ' ' | awk '{ print $$1,"(=",$$2 ")" }' | paste -sd ',' - | sed -e 's/,/, /g'`"
146         dh_gencontrol -p dpdk -- -V"librte:Recommends=`grep -E 'librte-(pmd|mempool).*' ./debian/files | grep -v dbgsym | tr '_' ' ' | awk '{ print $$1,"(=",$$2 ")" }' | paste -sd ',' - | sed -e 's/,/, /g'`"
147 ifneq (,$(findstring kernel_modules,$(DEB_BUILD_OPTIONS)))
148         dh_gencontrol -p dpdk-modules-$(KVERS) -- \
149                 -v`cat debian/VERSION` \
150                 -V'built:using:kernel=$(call get_built_using,linux-headers-$(KVERS))'
151 endif
152 ifneq (,$(findstring dbgsym_meta,$(DEB_BUILD_OPTIONS)))
153         ./debian/dh-dbgsym-metapkg libdpdk$(DPDK_ABI)-dbgsym
154 endif
155
156 # dbgsym_meta can be passed via DEB_BUILD_OPTIONS to enable building the
157 # optional dbgsym meta package libdpdk<ABI>-dbgsym.
158 # This is not built by default as it would go in main but depend on
159 # packages in the debian-debug archive.
160 # Debian Developers and FTP masters strongly discourage this.
161 # We provide this optional flag as a convenience for rebuilders.
162 ifneq (,$(findstring dbgsym_meta,$(DEB_BUILD_OPTIONS)))
163 override_dh_builddeb:
164         dh_builddeb
165         dh_builddeb -plibdpdk$(DPDK_ABI)-dbgsym
166 endif
167
168 override_dh_auto_clean:
169         rm -rf debian/build debian/tmp debian/dpdk-modules-* \
170                 debian/control.modules debian/VERSION
171         sed -i '/Package: dpdk-modules-/,/`tail -n1 debian/control.modules.in`/d' debian/control
172         test -L config/defconfig_$(DPDK_CONFIG) && rm -f config/defconfig_$(DPDK_CONFIG) || true
173         rm -f debian/dpdk-igb-uio-dkms.dkms debian/dpdk-rte-kni-dkms.dkms
174         rm -f debian/dpdk-dev.preinst
175
176 override_dh_auto_configure:
177         # Add support for a custom defconfig file in the debian directory.
178 ifneq (,$(filter dpdk_config=%,$(DEB_BUILD_OPTIONS)))
179         test -e config/defconfig_$(DPDK_CONFIG) || ln -fs ../debian/defconfig_$(DPDK_CONFIG) config/defconfig_$(DPDK_CONFIG)
180 endif
181         # report dpkg-buildflags status to build log
182         dpkg-buildflags --status
183         echo EXTRA_CFLAGS $$EXTRA_CFLAGS
184         echo EXTRA_LDFLAGS: $$EXTRA_LDFLAGS
185         $(MAKE) V=$(DH_VERBOSE) O=$(DPDK_STATIC_DIR) T=$(DPDK_CONFIG) config
186 ifeq (,$(filter dpdk_config=%,$(DEB_BUILD_OPTIONS)))
187         sed -ri -e 's,(RTE_MACHINE=).*,\1$(RTE_MACHINE),' \
188                 -e 's,(RTE_NEXT_ABI=).*,\1n,' \
189                 -e 's,(CONFIG_RTE_EAL_IGB_UIO=).*,\1$(DPDK_CONFIG_BUILD_KMOD),' \
190                 -e 's,(CONFIG_RTE_KNI_KMOD=).*,\1$(DPDK_CONFIG_BUILD_KMOD),' \
191                 -e 's,(LIBRTE_PMD_PCAP=).*,\1y,' \
192                 -e 's,(CONFIG_RTE_EAL_PMD_PATH=).*,\1"/usr/lib/$(DEB_HOST_MULTIARCH)/$(DPDK_DRIVER_DIR)/",' \
193                 $(DPDK_STATIC_DIR)/.config
194 ifeq (,$(filter $(DEB_HOST_ARCH), armhf))
195         sed -ri -e 's,(CONFIG_RTE_LIBRTE_MLX4_PMD=).*,\1y,' \
196                 -e 's,(CONFIG_RTE_LIBRTE_MLX5_PMD=).*,\1y,' \
197                 -e 's,(LIBRTE_PMD_OPENSSL=).*,\1y,' \
198                 $(DPDK_STATIC_DIR)/.config
199 endif
200 endif
201         echo "CONFIG_RTE_MAJOR_ABI=\"$(DPDK_ABI)\"" >> \
202                 $(DPDK_STATIC_DIR)/.config
203         # Intel IPSEC library is amd64-only
204 ifneq (,$(filter $(DEB_HOST_ARCH), amd64))
205         sed -ri -e 's,(CONFIG_RTE_LIBRTE_PMD_AESNI_MB=).*,\1y,' \
206                 -e 's,(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM=).*,\1y,' \
207                 $(DPDK_STATIC_DIR)/.config
208 endif
209         dh_auto_configure
210
211 override_dh_auto_build-indep:
212 ifeq (y,$(BUILD_DOCS))
213         $(MAKE) V=$(DH_VERBOSE) O=$(DPDK_STATIC_DIR) doc-api-html doc-guides-html
214 endif
215
216 override_dh_auto_install-indep:
217         # Package: dpdk-doc
218         # All files based on the install-doc rule (includes examples)
219 ifeq (y,$(BUILD_DOCS))
220         $(MAKE) V=$(DH_VERBOSE) O=$(DPDK_STATIC_DIR) prefix=/usr \
221                 DESTDIR=debian/dpdk-doc install-doc
222 endif
223
224 override_dh_auto_build-arch:
225 ifeq (y,$(BUILD_STATIC_LIB))
226         $(MAKE) V=$(DH_VERBOSE) O=$(DPDK_STATIC_DIR) RTE_KERNELDIR=$(KSRC) build
227 endif
228         # Unfortunately the decision about having static or shared libraries is
229         # made for the whole build, which then produces only .a or .so files
230         # (but not both).
231         # And the target layout for target selection has no field for the
232         # type of library.
233         # Right now I hack this by doing a second build which only differs in
234         # the selection of shared libs.
235         # Shared libs should be default, so the previous static build is only
236         # used to get static libraries.
237         cp -a $(DPDK_STATIC_DIR) $(DPDK_SHARED_DIR)
238         sed -ri 's,(RTE_BUILD_SHARED_LIB=).*,\1y,' \
239                 $(DPDK_SHARED_DIR)/.config
240         $(MAKE) V=$(DH_VERBOSE) O=$(DPDK_SHARED_DIR) RTE_KERNELDIR=$(KSRC) build
241 ifeq (y,$(BUILD_DOCS))
242         # need to be around for dh_installman to be picked up
243         $(MAKE) V=$(DH_VERBOSE) O=$(DPDK_SHARED_DIR) RTE_KERNELDIR=$(KSRC) doc-guides-man
244 endif
245         $(MAKE) V=$(DH_VERBOSE) O=$(DPDK_SHARED_DIR) RTE_KERNELDIR=$(KSRC) test-build
246
247 override_dh_auto_install-arch: LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)
248 override_dh_auto_install-arch:
249         # Package: dpdk (runtime)
250 ifeq (y,$(BUILD_STATIC_LIB))
251         $(MAKE) V=$(DH_VERBOSE) O=$(DPDK_STATIC_DIR) prefix=/usr libdir=$(LIBDIR) \
252                 DESTDIR=debian/dpdk install-runtime
253 endif
254         $(MAKE) V=$(DH_VERBOSE) O=$(DPDK_SHARED_DIR) prefix=/usr libdir=$(LIBDIR) \
255                 DESTDIR=debian/dpdk install-runtime
256         mkdir -p debian/dpdk/etc/dpdk
257         cp debian/dpdk.interfaces debian/dpdk/etc/dpdk/interfaces
258         rm debian/dpdk/usr/sbin/dpdk-devbind
259         mkdir -p debian/dpdk/sbin
260         ln -s /usr/share/dpdk/usertools/dpdk-devbind.py \
261                 debian/dpdk/sbin/dpdk-devbind
262         # Package: dpdk-dev (build environment)
263         # workaround to fix symbolic link creation
264         mkdir -p debian/dpdk-dev/$(LIBDIR)
265         $(MAKE) V=$(DH_VERBOSE) O=$(DPDK_SHARED_DIR) prefix=/usr libdir=$(LIBDIR) \
266                 DESTDIR=debian/dpdk-dev install-sdk
267         # remove workaround
268         rm -fr debian/dpdk-dev/usr/lib
269         cp $(DPDK_SHARED_DIR)/.config debian/dpdk-dev/usr/share/dpdk/config
270         sed -e 's/SDK_TARGET/$(RTE_TARGET)/' debian/dpdk-sdk-env.sh.in > \
271                 debian/dpdk-dev/usr/share/dpdk/dpdk-sdk-env.sh
272         # include the bundled autotest suite to be usable from the dpdk-dev package
273         if grep -qs 'CONFIG_RTE_APP_TEST=y' $(DPDK_SHARED_DIR)/.config; then \
274                 mkdir -p debian/dpdk-dev/usr/share/dpdk/test; \
275                 cp -a test/test/autotest* debian/dpdk-dev/usr/share/dpdk/test; \
276                 cp $(DPDK_SHARED_DIR)/app/test debian/dpdk-dev/usr/share/dpdk/test/; \
277                 cp $(DPDK_SHARED_DIR)/app/testacl debian/dpdk-dev/usr/share/dpdk/test/; \
278                 cp $(DPDK_SHARED_DIR)/app/testpipeline debian/dpdk-dev/usr/share/dpdk/test/; \
279         fi
280         # since we move libs to multiarch dirs update the non aware symlink
281         rm debian/dpdk-dev/usr/share/dpdk/$(RTE_TARGET)/lib
282         ln -rs debian/dpdk-dev/$(LIBDIR)/ \
283                 debian/dpdk-dev/usr/share/dpdk/$(RTE_TARGET)/lib
284         # Package: libdpdk-dev (bare headers, static devel libs and linker
285         # script)
286         mkdir -p debian/libdpdk-dev/$(LIBDIR)
287         # linker script
288         mv debian/dpdk/$(LIBDIR)/libdpdk.so debian/libdpdk-dev/$(LIBDIR)/
289         # includes
290         # Some headers have architecture-specific content, but the upstream build
291         # system installs them in the same directory, breaking multiarch.
292         # Move them in /usr/include/<arch>/dpdk instead.
293         mkdir -p debian/libdpdk-dev/usr/include/$(DEB_HOST_MULTIARCH)/dpdk
294         # Before moving the files, remove the symlink in usr/share/dpdk and copy them over,
295         # as the SDK subdir is architecture specific and requires the arch-specific headers
296         # in the top level
297         rm -f debian/dpdk-dev/usr/share/dpdk/$(RTE_TARGET)/include
298         mkdir -p debian/dpdk-dev/usr/share/dpdk/$(RTE_TARGET)/include
299         cp -r debian/dpdk-dev/usr/include/dpdk/* debian/dpdk-dev/usr/share/dpdk/$(RTE_TARGET)/include
300         # genereate the preinst to deal with the symlink -> directory transition smoothly
301         sed "s/@@RTE_TARGET@@/$(RTE_TARGET)/g" debian/dpdk-dev.preinst.in > debian/dpdk-dev.preinst
302         mv $(addprefix debian/dpdk-dev/usr/include/dpdk/,$(notdir $(wildcard lib/librte_eal/common/include/arch/$(INCLUDE_ARCH)/*.h))) \
303                 debian/libdpdk-dev/usr/include/$(DEB_HOST_MULTIARCH)/dpdk/
304         mv debian/dpdk-dev/usr/include/dpdk/rte_config.h \
305                 debian/libdpdk-dev/usr/include/$(DEB_HOST_MULTIARCH)/dpdk/
306         mv debian/dpdk-dev/usr/include/dpdk debian/libdpdk-dev/usr/include/
307         rmdir debian/dpdk-dev/usr/include
308         # backward compatibility: to ease things for the majority of users,
309         # which are on x86_64, symlink the x86 headers into the global
310         # directory.
311 ifeq (x86_64-linux-gnu,$(DEB_HOST_MULTIARCH))
312         ln -rs debian/libdpdk-dev/usr/include/$(DEB_HOST_MULTIARCH)/dpdk/*.h \
313                 debian/libdpdk-dev/usr/include/dpdk
314 endif
315         # have the DKMS build include the correct per-arch directory
316         sed "s/@@DEB_HOST_MULTIARCH@@/$(DEB_HOST_MULTIARCH)/g" debian/dpdk-igb-uio-dkms.dkms.in > debian/dpdk-igb-uio-dkms.dkms
317         sed "s/@@DEB_HOST_MULTIARCH@@/$(DEB_HOST_MULTIARCH)/g" debian/dpdk-rte-kni-dkms.dkms.in > debian/dpdk-rte-kni-dkms.dkms
318         # all static libs are in the dev package
319 ifeq (y,$(BUILD_STATIC_LIB))
320         mv debian/dpdk/$(LIBDIR)/lib*.a debian/libdpdk-dev/$(LIBDIR)/
321 endif
322         # symlinks to last .so's are in the non versioned libdpdk-dev as well
323         # this allows multiple libdpdk-<NAME><VER> at different VER concurrently
324         # libdpdk-dev depends on all sublibs so symlinks are never broken
325         mv debian/dpdk/$(LIBDIR)/*.so debian/libdpdk-dev/$(LIBDIR)/
326         # Package(s): libdpdk-<NAME><VER> (bare runtime libs)
327         for lib in $$(ls -1 debian/dpdk/$(LIBDIR)/*.so.*); do \
328           BN=$$(basename $${lib}); \
329           LN=$$(echo $${BN} | sed -e 's/\.so\.[0-9\.]*$$//' | tr '_' '-'); \
330           if echo $${LN} | grep -q ".*[0-9]$$"; then \
331             PKG=$${LN}-$(DPDK_ABI); \
332           else \
333             PKG=$${LN}$(DPDK_ABI); \
334           fi; \
335           LIBF="$$(basename $${lib})"; \
336           LIBD="debian/$${PKG}/$(LIBDIR)"; \
337           echo "moving $${lib} to dir $${LIBD} (PKG=$${PKG} BN=$${BN} LN={$${LN} LIBF=$${LIBF} LIBD=$${LIBD})"; \
338           mkdir -p $${LIBD}; \
339           mv $${lib} $${LIBD}; \
340           if [ "$${LIBF#librte_pmd_}x" != "$${LIBF}x" ]; then \
341             mkdir -p $${LIBD}/$(DPDK_DRIVER_DIR); \
342             echo "PMD: linking $${LIBF} into RTE_EAL_PMD_PATH at $${LIBD}/$(DPDK_DRIVER_DIR)/"; \
343             ln -s --relative --target-directory=$${LIBD}/$(DPDK_DRIVER_DIR)/ $${LIBD}/$${LIBF}; \
344           fi; \
345           if [ "$${LIBF#librte_mempool_}x" != "$${LIBF}x" ]; then \
346             mkdir -p $${LIBD}/$(DPDK_DRIVER_DIR); \
347             echo "MEMPOOL: linking $${LIBF} into RTE_EAL_PMD_PATH at $${LIBD}/$(DPDK_DRIVER_DIR)/"; \
348             ln -s --relative --target-directory=$${LIBD}/$(DPDK_DRIVER_DIR)/ $${LIBD}/$${LIBF}; \
349           fi; \
350           if [ "$${LIBF#librte_ifcvf_}x" != "$${LIBF}x" ]; then \
351             mkdir -p $${LIBD}/$(DPDK_DRIVER_DIR); \
352             echo "IFCVF: linking $${LIBF} into RTE_EAL_PMD_PATH at $${LIBD}/$(DPDK_DRIVER_DIR)/"; \
353             ln -s --relative --target-directory=$${LIBD}/$(DPDK_DRIVER_DIR)/ $${LIBD}/$${LIBF}; \
354           fi; \
355           if [ "$${LIBF#librte_eal}x" != "$${LIBF}x" ]; then \
356             mkdir -p $${LIBD}/$(DPDK_DRIVER_DIR); \
357           fi; \
358         done
359         # pkg-config
360         mkdir -p debian/libdpdk-dev/$(LIBDIR)/pkgconfig
361         LIBS=$$(sed -e 's/GROUP ( \(.*\) )/\1/' -e 's/lib/-l/g' -e 's/\.so//g' \
362                 $(CURDIR)/debian/libdpdk-dev/$(LIBDIR)/libdpdk.so); \
363         sed -e "s/@DPDK_LIBS@/$${LIBS}/" -e "s/@VERSION@/$(DEB_VERSION_UPSTREAM)/" \
364                 -e "s|@DEB_HOST_MULTIARCH@|$(DEB_HOST_MULTIARCH)|g" \
365                 debian/libdpdk.pc.in > debian/libdpdk-dev/$(LIBDIR)/pkgconfig/libdpdk.pc
366         # Package: dpdk-igb-uio-dkms
367         mkdir -p debian/dpdk-igb-uio-dkms/usr/src/dpdk-igb-uio-$(DEB_VERSION_UPSTREAM)
368         cp kernel/linux/igb_uio/* \
369                 debian/dpdk-igb-uio-dkms/usr/src/dpdk-igb-uio-$(DEB_VERSION_UPSTREAM)
370         # Package: dpdk-rte-kni-dkms
371         mkdir -p debian/dpdk-rte-kni-dkms/usr/src/dpdk-rte-kni-$(DEB_VERSION_UPSTREAM)
372         cp -a kernel/linux/kni/* \
373                 debian/dpdk-rte-kni-dkms/usr/src/dpdk-rte-kni-$(DEB_VERSION_UPSTREAM)
374 ifneq (,$(KVERS))
375         # Package: dpdk-modules-<kernel version>
376         $(MAKE) V=$(DH_VERBOSE) O=$(DPDK_SHARED_DIR) \
377                 kerneldir=/lib/modules/$(KVERS)/extra/dpdk \
378                 DESTDIR=debian/dpdk-modules-$(KVERS) install-kmod
379 endif
380
381 override_dh_dkms:
382         dh_dkms -V $(DEB_VERSION_UPSTREAM)
383
384 override_dh_installinit:
385         dh_installinit --no-start --no-restart-on-upgrade
386
387 override_dh_systemd_start:
388         dh_systemd_start --no-start --no-restart-on-upgrade
389
390 override_dh_auto_test:
391
392 override_dh_python3:
393         # dh_python only looks in /usr/share/package_name but dpdk-doc installs in
394         # /usr/share/dpdk, so pass /usr to catch all
395         dh_python3 --shebang=/usr/bin/python3 /usr
396