aboutsummaryrefslogtreecommitdiffstats
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rw-r--r--debian/libdpdk.pc.in5
-rwxr-xr-xdebian/rules19
2 files changed, 18 insertions, 6 deletions
diff --git a/debian/libdpdk.pc.in b/debian/libdpdk.pc.in
index fbd14aee..9fc8f74f 100644
--- a/debian/libdpdk.pc.in
+++ b/debian/libdpdk.pc.in
@@ -1,10 +1,11 @@
prefix=/usr
exec_prefix=${prefix}
-libdir=@LIBDIR@
+libdir=${prefix}/lib/@DEB_HOST_MULTIARCH@
includedir=${prefix}/include
+include_arch_dir=${prefix}/include/@DEB_HOST_MULTIARCH@
Name: dpdk
Description: Data Plane Development Kit library
Version: @VERSION@
Libs: -L${libdir} @DPDK_LIBS@ -ldl -lm -lpthread -lz
-Cflags: -I${includedir}/dpdk -include ${includedir}/dpdk/rte_config.h
+Cflags: -I${includedir}/dpdk -I${include_arch_dir}/dpdk -include ${include_arch_dir}/dpdk/rte_config.h
diff --git a/debian/rules b/debian/rules
index 61543b54..16f1a67d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,6 +11,7 @@ DPDK_ABI := $(shell echo $(VERSION) | cut -d '.' -f1-2)
include /usr/share/dpkg/default.mk
DEB_HOST_GNU_CPU := $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
+DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
# see FEATURE AREAS in dpkg-buildflags(1)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all,-pie
@@ -56,15 +57,18 @@ ifneq (,$(filter $(DEB_HOST_ARCH), arm64))
DPDK_CONFIG ?= "arm64-armv8a-linuxapp-gcc"
RTE_MACHINE ?= "armv8a"
RTE_TARGET ?= "arm64-armv8a-linuxapp-gcc"
+INCLUDE_ARCH := arm
else
ifneq (,$(filter $(DEB_HOST_ARCH), ppc64el))
DPDK_CONFIG ?= "ppc_64-power8-linuxapp-gcc"
RTE_MACHINE ?= "power8"
RTE_TARGET ?= "ppc_64-power8-linuxapp-gcc"
+INCLUDE_ARCH := ppc_64
else
DPDK_CONFIG ?= "$(DEB_HOST_GNU_CPU)-native-linuxapp-gcc"
RTE_MACHINE ?= "default"
RTE_TARGET ?= "$(DEB_HOST_GNU_CPU)-default-linuxapp-gcc"
+INCLUDE_ARCH := x86
endif
endif
DPDK_STATIC_DIR = "debian/build/static-root"
@@ -180,7 +184,7 @@ ifeq (,$(filter dpdk_config=%,$(DEB_BUILD_OPTIONS)))
-e 's,(CONFIG_RTE_KNI_KMOD=).*,\1$(DPDK_CONFIG_BUILD_KMOD),' \
-e 's,(LIBRTE_PMD_PCAP=).*,\1y,' \
-e 's,(LIBRTE_PMD_XENVIRT=).*,\1y,' \
- -e 's,(CONFIG_RTE_EAL_PMD_PATH=).*,\1"/usr/lib/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)/dpdk-pmds/",' \
+ -e 's,(CONFIG_RTE_EAL_PMD_PATH=).*,\1"/usr/lib/$(DEB_HOST_MULTIARCH)/dpdk-pmds/",' \
$(DPDK_STATIC_DIR)/.config
# xen not available on ppc64el
ifneq (,$(filter $(DEB_HOST_ARCH), ppc64el))
@@ -227,7 +231,7 @@ ifeq (y,$(BUILD_DOCS))
endif
$(MAKE) V=$(DH_VERBOSE) O=$(DPDK_SHARED_DIR) RTE_KERNELDIR=$(KSRC) test-build
-override_dh_auto_install-arch: LIBDIR=/usr/lib/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+override_dh_auto_install-arch: LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)
override_dh_auto_install-arch:
# Package: dpdk (runtime)
ifeq (y,$(BUILD_STATIC_LIB))
@@ -270,7 +274,14 @@ endif
# linker script
mv debian/dpdk/$(LIBDIR)/libdpdk.so debian/libdpdk-dev/$(LIBDIR)/
# includes
- mkdir -p debian/libdpdk-dev/usr/include
+ # Some headers have architecture-specific content, but the upstream build
+ # system installs them in the same directory, breaking multiarch.
+ # Move them in /usr/include/<arch>/dpdk instead.
+ mkdir -p debian/libdpdk-dev/usr/include/$(DEB_HOST_MULTIARCH)/dpdk
+ mv $(addprefix debian/dpdk-dev/usr/include/dpdk/,$(notdir $(wildcard lib/librte_eal/common/include/arch/$(INCLUDE_ARCH)/*.h))) \
+ debian/libdpdk-dev/usr/include/$(DEB_HOST_MULTIARCH)/dpdk/
+ mv debian/dpdk-dev/usr/include/dpdk/rte_config.h \
+ debian/libdpdk-dev/usr/include/$(DEB_HOST_MULTIARCH)/dpdk/
mv debian/dpdk-dev/usr/include/dpdk debian/libdpdk-dev/usr/include/
# all static libs are in the dev package
ifeq (y,$(BUILD_STATIC_LIB))
@@ -313,7 +324,7 @@ endif
LIBS=$$(sed -e 's/GROUP ( \(.*\) )/\1/' -e 's/lib/-l/g' -e 's/\.so//g' \
$(CURDIR)/debian/libdpdk-dev/$(LIBDIR)/libdpdk.so); \
sed -e "s/@DPDK_LIBS@/$${LIBS}/" -e "s/@VERSION@/$(VERSION)/" \
- -e "s|@LIBDIR@|$(LIBDIR)|" \
+ -e "s|@DEB_HOST_MULTIARCH@|$(DEB_HOST_MULTIARCH)|g" \
debian/libdpdk.pc.in > debian/libdpdk-dev/$(LIBDIR)/pkgconfig/libdpdk.pc
# Package: dpdk-igb-uio-dkms
mkdir -p debian/dpdk-igb-uio-dkms/usr/src/dpdk-igb-uio-$(VERSION)