From 4089f8591a3de9b2f1dd3b3018189980a7b5119a Mon Sep 17 00:00:00 2001 From: Miroslav Ondra Date: Tue, 22 Sep 2020 18:40:50 +0200 Subject: [PATCH] add g1 control file --- debian/control.ing1 | 12 ++++++++++++ debian/rules | 14 +++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 debian/control.ing1 diff --git a/debian/control.ing1 b/debian/control.ing1 new file mode 100644 index 0000000..b175a6e --- /dev/null +++ b/debian/control.ing1 @@ -0,0 +1,12 @@ + +Package: g1-unipi-kernel-modules +Architecture: arm64 armhf +Pre-Depends: unipi-common +Depends: ${misc:Depends}, g1-kernel-image(=${PKG-KERNEL-VER}), unipi-firmware (>=5.50) +Provides: unipi-kernel-modules +Replaces: unipi-kernel-modules +Breaks: unipi-kernel-modules +Description: UniPi G1 kernel modules + Binary kernel modules for UniPi G1 gateway. Compiled for g1-kernel-image + version. + diff --git a/debian/rules b/debian/rules index ee77636..5e5cdea 100755 --- a/debian/rules +++ b/debian/rules @@ -18,14 +18,22 @@ MOD_VERSION=$(shell dpkg-parsechangelog |grep ^Version:|cut -d ' ' -f 2) DEBIAN_VERSION=$(shell . /ci-scripts/include.sh ; echo $${DEBIAN_VERSION}) +PLATFORM=$(shell echo $${PLATFORM:-axon}) + ifeq ($(DEBIAN_VERSION),stretch) BINARY_PKG_NAME=neuron-kernel CONTROL_INC=stretch else BINARY_PKG_NAME=unipi-kernel-modules CONTROL_INC=buster +ifeq ($(shell dpkg-architecture -q DEB_HOST_ARCH),arm64) +ifneq ($(PLATFORM),axon) + CONTROL_INC=$(PLATFORM) +endif +endif endif + ifeq ($(shell dpkg-architecture -q DEB_HOST_ARCH),armhf) ifeq ($(shell dpkg-architecture -q DEB_BUILD_ARCH),armhf) RPI_FIRMWARE_VER = $(shell dpkg-query -f='$${Version}' -W raspberrypi-kernel-headers) @@ -41,9 +49,9 @@ endif endif ifeq ($(shell dpkg-architecture -q DEB_HOST_ARCH),arm64) -PKG_KERNEL_VER = $(shell dpkg-query -f='$${Version}' -W axon-kernel-headers) +PKG_KERNEL_VER = $(shell dpkg-query -f='$${Version}' -W $(PLATFORM)-kernel-headers) #PKG_KERNEL_VER = 4.14.111 -LINUX_DIR_PATH = $(shell dpkg -L axon-kernel-headers | sed -n '/^\/lib\/modules\/.*\/build$$/p') +LINUX_DIR_PATH = $(shell dpkg -L $(PLATFORM)-kernel-headers | sed -n '/^\/lib\/modules\/.*\/build$$/p') #LINUX_DIR_PATH = '/lib/modules/4.14.111/build' KERNEL_VERSION = $(subst /lib/modules/,,$(subst /build,,$(LINUX_DIR_PATH))) endif @@ -74,7 +82,7 @@ override_dh_prep: @dh_prep --exclude=unipi-kernel-modules.substvars @echo PKG-KERNEL-VER=${PKG_KERNEL_VER} > debian/unipi-kernel-modules.substvars ( sed 's/)/.${PKG_KERNEL_VER})/;q' debian/changelog; \ - printf "\n * Compiled for axon-kernel-image\n";\ + printf "\n * Compiled for $(PLATFORM)-kernel-image\n";\ printf "\n -- auto-generator %s\n\n" "`date -R`"; \ cat debian/changelog;\ ) >debian/unipi-kernel-modules.changelog -- 2.34.1