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