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
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
@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`"; \