aboutsummaryrefslogtreecommitdiffstats
path: root/debian/rules
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@gmail.com>2017-06-12 13:57:06 +0100
committerLuca Boccassi <luca.boccassi@gmail.com>2017-06-12 14:42:57 +0100
commit6e1ca2647e3582e41dc33757c49f628f8c740388 (patch)
tree6b696d9b42b174a34bde4859c783a1c68ffc44b6 /debian/rules
parent864973804fe71a7a00292fdb15777cddf87716ca (diff)
Generate libdpdk-dev dependencies and dpdk recommends
There are many, many binary packages in DPDK, and they constantly change. To avoid having to manually maintain the list of dependencies of libdpdk-dev and recommends of dpdk, generate them at build time depending on what is actually built for each architecture. Change-Id: I19f5f037c41dc4b1d61fb5b2c00e0f005431d8f0 Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules7
1 files changed, 7 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
index 33b98b5a..82eb417b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -128,6 +128,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` \