# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
DPKG_EXPORT_BUILDFLAGS = 1
-export DEB_BUILD_MAINT_OPTIONS = hardening=+all,-pie
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
include /usr/share/dpkg/default.mk
DPDK_ABI := $(shell echo $(DEB_VERSION_UPSTREAM) | cut -d '-' -f1 | cut -d '.' -f1-2 | cut -d '~' -f1)
export DH_OPTIONS=-v
endif
+# People rebuilding this package can overwrite RTE_MACHINE
+# via DEB_BUILD_OPTIONS if they like
+ifneq (,$(filter rte_machine=%,$(DEB_BUILD_OPTIONS)))
+ RTE_MACHINE ?= $(patsubst rte_machine=%,%,$(filter rte_machine=%,$(DEB_BUILD_OPTIONS)))
+endif
+# default to minimal base, without setting this it would build
+# -march=native which is a non portable invariant
+RTE_MACHINE ?= "default"
+
# now stable with parallel comilation, so support -j
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
PAR := $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
override_dh_gencontrol:
dh_gencontrol
# debian/files will not exist until dh_gencontrol has ran at least once,
- # so we need to run gencontrol for libdpdk-dev and libdpdk-dbgsym after.
+ # so we need to run gencontrol for libdpdk-dev after.
# The list of libraries and PMDs is everchanging, so generate the dependency
# list for libdpdk-dev to avoid having to maintain it manually.
# Same for the recommends list for dpdk, were we want the PMDs and the mempools.
-v`cat debian/VERSION` \
-V'built:using:kernel=$(call get_built_using,linux-headers-$(KVERS))'
endif
-ifneq (,$(findstring dbgsym_meta,$(DEB_BUILD_OPTIONS)))
- ./debian/dh-dbgsym-metapkg libdpdk$(DPDK_ABI)-dbgsym
-endif
-
-# dbgsym_meta can be passed via DEB_BUILD_OPTIONS to enable building the
-# optional dbgsym meta package libdpdk<ABI>-dbgsym.
-# This is not built by default as it would go in main but depend on
-# packages in the debian-debug archive.
-# Debian Developers and FTP masters strongly discourage this.
-# We provide this optional flag as a convenience for rebuilders.
-ifneq (,$(findstring dbgsym_meta,$(DEB_BUILD_OPTIONS)))
-override_dh_builddeb:
- dh_builddeb
- dh_builddeb -plibdpdk$(DPDK_ABI)-dbgsym
-endif
override_dh_auto_clean:
rm -rf debian/build debian/tmp debian/dpdk-modules-* \
debian/control.modules debian/VERSION
sed -i '/Package: dpdk-modules-/,/`tail -n1 debian/control.modules.in`/d' debian/control
rm -f debian/dpdk-igb-uio-dkms.dkms debian/dpdk-rte-kni-dkms.dkms
- rm -f debian/dpdk-dev.preinst
dh_auto_clean
override_dh_auto_configure:
--includedir=include/dpdk \
-Dper_library_versions=false \
-Dinclude_subdir_arch=../$(DEB_HOST_MULTIARCH)/dpdk \
- -Dmachine=corei7 \
+ -Dmachine=$(RTE_MACHINE) \
-Dkernel_dir=$(KSRC) \
-Denable_kmods=$(DPDK_CONFIG_BUILD_KMOD)
override_dh_auto_install-arch:
dh_auto_install
- # generate the preinst to deal with the symlink -> directory transition smoothly
- sed "s/@@RTE_TARGET@@/$(RTE_TARGET)/g" debian/dpdk-dev.preinst.in > debian/dpdk-dev.preinst
# have the DKMS build include the correct per-arch directory
sed "s/@@DEB_HOST_MULTIARCH@@/$(DEB_HOST_MULTIARCH)/g" debian/dpdk-igb-uio-dkms.dkms.in > debian/dpdk-igb-uio-dkms.dkms
sed "s/@@DEB_HOST_MULTIARCH@@/$(DEB_HOST_MULTIARCH)/g" debian/dpdk-rte-kni-dkms.dkms.in > debian/dpdk-rte-kni-dkms.dkms
# /usr/share/dpdk, so pass /usr to catch all
dh_python3 --shebang=/usr/bin/python3 /usr
+override_dh_missing:
+ dh_missing --fail-missing