Fix Provides: unipi-kernel-modules(=VER)
authorMiroslav Ondra <ondra@faster.cz>
Wed, 7 Oct 2020 15:41:58 +0000 (17:41 +0200)
committerMiroslav Ondra <ondra@faster.cz>
Wed, 7 Oct 2020 15:41:58 +0000 (17:41 +0200)
debian/control.g1
debian/rules.arm64

index 2fe21bdc1bcbb3a1658cbd18301b4835808f9666..c397cd8cb4540b62bc39c23da6926975ebb192a4 100644 (file)
@@ -2,7 +2,7 @@ Package: g1-unipi-kernel-modules
 Architecture: arm64
 Pre-Depends: unipi-common
 Depends: ${misc:Depends}, g1-kernel-image(=${PKG-KERNEL-VER}), unipi-firmware (>=5.50)
-Provides: unipi-kernel-modules
+Provides: unipi-kernel-modules(=${PROJECT_VERSION})
 Replaces: unipi-kernel-modules
 Breaks: unipi-kernel-modules
 Description: UniPi G1 kernel modules
index 19bb4c185b3e00dc078ea55d39fd7a7bda524b5b..80766114e531d6339ec64895c14af9f257d3595a 100755 (executable)
@@ -30,6 +30,8 @@ PKG_KERNEL_VER = $(shell dpkg-query -f='$${Version}' -W $(PLATFORM)-kernel-heade
 LINUX_DIR_PATH = $(shell dpkg -L $(PLATFORM)-kernel-headers | sed -n '/^\/lib\/modules\/.*\/build$$/p')
 KERNEL_VERSION = $(subst /lib/modules/,,$(subst /build,,$(LINUX_DIR_PATH)))
 
+PROJECT_VERSION=$(shell dpkg-parsechangelog -S Version)
+
 clean:
        cat debian/control.in debian/control.$(CONTROL_INC) >debian/control
        dh clean
@@ -45,6 +47,8 @@ override_dh_prep:
        @dh_prep --exclude=unipi-kernel-modules.substvars
        @echo PKG-KERNEL-VER=${PKG_KERNEL_VER} > debian/unipi-kernel-modules.substvars
        @echo PKG-KERNEL-VER=${PKG_KERNEL_VER} > debian/$(PLATFORM)-unipi-kernel-modules.substvars
+       @echo PROJECT_VERSION=${PROJECT_VERSION} >> debian/unipi-kernel-modules.substvars
+       @echo PROJECT_VERSION=${PROJECT_VERSION} >> debian/$(PLATFORM)-unipi-kernel-modules.substvars
        ( sed 's/)/.${PKG_KERNEL_VER})/;q' debian/changelog; \
          printf "\n  * Compiled for $(PLATFORM)-kernel-image\n";\
          printf "\n -- auto-generator <info@unipi.technology>  %s\n\n" "`date -R`"; \