X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=debian%2Frules;h=61543b543831daed3f07d585ab006df4fd5179ed;hb=91bd1b4a799800966789e4c28de7b34f3bd42499;hp=82eb417be749d03e4f8afb2a504449f652d1baae;hpb=6e1ca2647e3582e41dc33757c49f628f8c740388;p=deb_dpdk.git diff --git a/debian/rules b/debian/rules index 82eb417b..61543b54 100755 --- a/debian/rules +++ b/debian/rules @@ -38,6 +38,7 @@ ifeq (yes, $(dpkg_version_lt)) endif export RTE_DEVEL_BUILD=n +export EXTRA_CFLAGS+=-g # People rebuilding this package can overwrite DPDK_CONFIG, RTE_MACHINE and # RTE_TARGET via DEB_BUILD_OPTIONS if they like @@ -162,12 +163,6 @@ override_dh_auto_clean: sed -i '/Package: dpdk-modules-/,/`tail -n1 debian/control.modules.in`/d' debian/control test -L config/defconfig_$(DPDK_CONFIG) && rm -f config/defconfig_$(DPDK_CONFIG) || true -override_dh_clean: - dh_clean - rm -f debian/libethdev4.links - rm -f debian/librte-cryptodev1.links - rm -f debian/librte-eal2.links - override_dh_auto_configure: # Add support for a custom defconfig file in the debian directory. ifneq (,$(filter dpdk_config=%,$(DEB_BUILD_OPTIONS))) @@ -192,6 +187,8 @@ ifneq (,$(filter $(DEB_HOST_ARCH), ppc64el)) sed -ri -e 's,(LIBRTE_PMD_XENVIRT=).*,\1n,' $(DPDK_STATIC_DIR)/.config endif endif + echo "CONFIG_RTE_MAJOR_ABI=\"$(DPDK_ABI)\"" >> \ + $(DPDK_STATIC_DIR)/.config dh_auto_configure override_dh_auto_build-indep: @@ -228,6 +225,7 @@ ifeq (y,$(BUILD_DOCS)) # need to be around for dh_installman to be picked up $(MAKE) V=$(DH_VERBOSE) O=$(DPDK_SHARED_DIR) RTE_KERNELDIR=$(KSRC) doc-guides-man 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: @@ -255,9 +253,13 @@ endif 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 - mkdir -p debian/dpdk-dev/usr/share/dpdk/test - cp -a app/test/autotest* debian/dpdk-dev/usr/share/dpdk/test - cp $(DPDK_SHARED_DIR)/app/test debian/dpdk-dev/usr/share/dpdk/test/ + 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)/ \ @@ -281,16 +283,15 @@ endif # Package(s): libdpdk- (bare runtime libs) for lib in $$(ls -1 debian/dpdk/$(LIBDIR)/*.so.*); do \ BN=$$(basename $${lib}); \ - VER=$$(echo $${BN} | sed -e 's/^.*\.so\.//'); \ - LN=$$(echo $${BN} | sed -e 's/\.so\.[0-9]*$$//' | tr '_' '-'); \ + LN=$$(echo $${BN} | sed -e 's/\.so\.[0-9\.]*$$//' | tr '_' '-'); \ if echo $${LN} | grep -q ".*[0-9]$$"; then \ - PKG=$${LN}-$${VER}; \ + PKG=$${LN}-$(DPDK_ABI); \ else \ - PKG=$${LN}$${VER}; \ + PKG=$${LN}$(DPDK_ABI); \ fi; \ LIBF="$$(basename $${lib})"; \ LIBD="debian/$${PKG}/$(LIBDIR)"; \ - echo "moving $${lib} for library $${PKG}"; \ + echo "moving $${lib} to dir $${LIBD} (PKG=$${PKG} BN=$${BN} LN={$${LN} LIBF=$${LIBF} LIBD=$${LIBD})"; \ mkdir -p $${LIBD}; \ mv $${lib} $${LIBD}; \ if [ "$${LIBF#librte_pmd_}x" != "$${LIBF}x" ]; then \ @@ -329,15 +330,6 @@ ifneq (,$(KVERS)) DESTDIR=debian/dpdk-modules-$(KVERS) install-kmod endif -debian/libethdev4.links: debian/libethdev4.links.in - sed -e 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' < $< > $@ -debian/librte-cryptodev1.links: debian/librte-cryptodev1.links.in - sed -e 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' < $< > $@ -debian/librte-eal2.links: debian/librte-eal2.links.in - sed -e 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' < $< > $@ -override_dh_link: debian/libethdev4.links debian/librte-cryptodev1.links debian/librte-eal2.links - dh_link - override_dh_dkms: dh_dkms -V $(VERSION)