X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=debian%2Frules;h=3d2be928fc98859479cedde9c9b7d5d52b9a85da;hb=refs%2Fchanges%2F74%2F15974%2F1;hp=31e04b7a444188092ecdb280a442d5f1f0a460b6;hpb=d3989b390adac872c12b14e3a3b0aaf9a01f9e6f;p=deb_dpdk.git diff --git a/debian/rules b/debian/rules index 31e04b7a..3d2be928 100755 --- a/debian/rules +++ b/debian/rules @@ -12,6 +12,15 @@ ifeq (,$(findstring terse,$(DEB_BUILD_OPTIONS))) 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))) @@ -77,7 +86,7 @@ override_dh_gencontrol: # 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'`" + dh_gencontrol -p dpdk -- -V"librte:Suggests=`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` \ @@ -96,7 +105,7 @@ 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)