d/rules: d/control: drop the majority of PMDs to suggest and select only a common...
[deb_dpdk.git] / debian / rules
index 31e04b7..3d2be92 100755 (executable)
@@ -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)