@@ -20,6 +20,10 @@ dkms_nvidia_390_version=$(shell gawk '/^nvidia-graphics-drivers-390/ { print $$2
dkms_nvidia_435_version=$(shell gawk '/^nvidia-graphics-drivers-435/ { print $$2; }' debian/dkms-versions)
dkms_nvidia_440_version=$(shell gawk '/^nvidia-graphics-drivers-440/ { print $$2; }' debian/dkms-versions)
+nvidia_390_upstream_version=$(shell echo "$(dkms_nvidia_390_version)" | cut -d '-' -f 1)
+nvidia_435_upstream_version=$(shell echo "$(dkms_nvidia_435_version)" | cut -d '-' -f 1)
+nvidia_440_upstream_version=$(shell echo "$(dkms_nvidia_440_version)" | cut -d '-' -f 1)
+
# Get variants, assumng primary if debian/variants is not present
variants = --
ifneq (,$(wildcard debian/variants))
@@ -154,5 +158,9 @@ gencontrol_flags = -Vdkms:nvidia-390-modules="nvidia-dkms-390 (= $(dkms_nvidia_
gencontrol_flags = -Vdkms:nvidia-435-modules="nvidia-dkms-435 (= $(dkms_nvidia_435_version))"
gencontrol_flags += -Vdkms:nvidia-440-modules="nvidia-dkms-440 (= $(dkms_nvidia_440_version))"
+gencontrol_flags += -Vnvk:nvidia-390="nvidia-kernel-common-390 (<= $(nvidia_390_upstream_version)-1), nvidia-kernel-common-390 (>= $(nvidia_390_upstream_version))"
+gencontrol_flags += -Vnvk:nvidia-435="nvidia-kernel-common-435 (<= $(nvidia_435_upstream_version)-1), nvidia-kernel-common-435 (>= $(nvidia_435_upstream_version))"
+gencontrol_flags += -Vnvk:nvidia-440="nvidia-kernel-common-440 (<= $(nvidia_440_upstream_version)-1), nvidia-kernel-common-440 (>= $(nvidia_440_upstream_version))"
+
override_dh_gencontrol:
dh_gencontrol -- $(gencontrol_flags)
Export the dependency data for use in control templates. BugLink: https://bugs.launchpad.net/bugs/1881137 Signed-off-by: Alberto Milone <alberto.milone@canonical.com> --- debian/rules | 8 ++++++++ 1 file changed, 8 insertions(+)