- # Package: dpdk (runtime)
-ifeq (y,$(BUILD_STATIC_LIB))
- $(MAKE) V=$(DH_VERBOSE) O=$(DPDK_STATIC_DIR) prefix=/usr libdir=$(LIBDIR) \
- DESTDIR=debian/dpdk install-runtime
-endif
- $(MAKE) V=$(DH_VERBOSE) O=$(DPDK_SHARED_DIR) prefix=/usr libdir=$(LIBDIR) \
- DESTDIR=debian/dpdk install-runtime
- mkdir -p debian/dpdk/etc/dpdk
- cp debian/dpdk.interfaces debian/dpdk/etc/dpdk/interfaces
- rm debian/dpdk/usr/sbin/dpdk-devbind
- mkdir -p debian/dpdk/sbin
- ln -s /usr/share/dpdk/usertools/dpdk-devbind.py \
- debian/dpdk/sbin/dpdk-devbind
- # Package: dpdk-dev (build environment)
- # workaround to fix symbolic link creation
- mkdir -p debian/dpdk-dev/$(LIBDIR)
- $(MAKE) V=$(DH_VERBOSE) O=$(DPDK_SHARED_DIR) prefix=/usr libdir=$(LIBDIR) \
- DESTDIR=debian/dpdk-dev install-sdk
- # remove workaround
- rm -fr debian/dpdk-dev/usr/lib
- cp $(DPDK_SHARED_DIR)/.config debian/dpdk-dev/usr/share/dpdk/config
- sed -e 's/SDK_TARGET/$(RTE_TARGET)/' debian/dpdk-sdk-env.sh.in > \
- debian/dpdk-dev/usr/share/dpdk/dpdk-sdk-env.sh
- # include the bundled autotest suite to be usable from the dpdk-dev package
- if grep -qs 'CONFIG_RTE_APP_TEST=y' $(DPDK_SHARED_DIR)/.config; then \
- mkdir -p debian/dpdk-dev/usr/share/dpdk/test; \
- cp -a test/test/autotest* debian/dpdk-dev/usr/share/dpdk/test; \
- cp $(DPDK_SHARED_DIR)/app/test debian/dpdk-dev/usr/share/dpdk/test/; \
- cp $(DPDK_SHARED_DIR)/app/testacl debian/dpdk-dev/usr/share/dpdk/test/; \
- cp $(DPDK_SHARED_DIR)/app/testpipeline debian/dpdk-dev/usr/share/dpdk/test/; \
- fi
- # since we move libs to multiarch dirs update the non aware symlink
- rm debian/dpdk-dev/usr/share/dpdk/$(RTE_TARGET)/lib
- ln -rs debian/dpdk-dev/$(LIBDIR)/ \
- debian/dpdk-dev/usr/share/dpdk/$(RTE_TARGET)/lib
- # Package: libdpdk-dev (bare headers, static devel libs and linker
- # script)
- mkdir -p debian/libdpdk-dev/$(LIBDIR)
- # linker script
- mv debian/dpdk/$(LIBDIR)/libdpdk.so debian/libdpdk-dev/$(LIBDIR)/
- # includes
- # 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
- # Before moving the files, remove the symlink in usr/share/dpdk and copy them over,
- # as the SDK subdir is architecture specific and requires the arch-specific headers
- # in the top level
- rm -f debian/dpdk-dev/usr/share/dpdk/$(RTE_TARGET)/include
- mkdir -p debian/dpdk-dev/usr/share/dpdk/$(RTE_TARGET)/include
- cp -r debian/dpdk-dev/usr/include/dpdk/* debian/dpdk-dev/usr/share/dpdk/$(RTE_TARGET)/include
- # genereate 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
- 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/
- rmdir debian/dpdk-dev/usr/include
- # backward compatibility: to ease things for the majority of users,
- # which are on x86_64, symlink the x86 headers into the global
- # directory.
-ifeq (x86_64-linux-gnu,$(DEB_HOST_MULTIARCH))
- ln -rs debian/libdpdk-dev/usr/include/$(DEB_HOST_MULTIARCH)/dpdk/*.h \
- debian/libdpdk-dev/usr/include/dpdk
-endif