X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=debian%2Frules;h=61543b543831daed3f07d585ab006df4fd5179ed;hb=91bd1b4a799800966789e4c28de7b34f3bd42499;hp=33b98b5a558cd2c618eb9a08681cbf66b27f1ae0;hpb=864973804fe71a7a00292fdb15777cddf87716ca;p=deb_dpdk.git diff --git a/debian/rules b/debian/rules index 33b98b5a..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 @@ -128,6 +129,13 @@ endif 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. + # 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. + 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'`" + 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'`" ifneq (,$(findstring kernel_modules,$(DEB_BUILD_OPTIONS))) dh_gencontrol -p dpdk-modules-$(KVERS) -- \ -v`cat debian/VERSION` \ @@ -155,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))) @@ -185,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: @@ -221,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: @@ -248,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)/ \ @@ -274,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 \ @@ -322,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)