add g1 control file
authorMiroslav Ondra <ondra@faster.cz>
Tue, 22 Sep 2020 16:40:50 +0000 (18:40 +0200)
committerMiroslav Ondra <ondra@faster.cz>
Tue, 22 Sep 2020 16:40:50 +0000 (18:40 +0200)
debian/control.ing1 [new file with mode: 0644]
debian/rules

diff --git a/debian/control.ing1 b/debian/control.ing1
new file mode 100644 (file)
index 0000000..b175a6e
--- /dev/null
@@ -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. 
+
index ee77636f0b598e28b553a756763a831261c814c9..5e5cdeac1a772fe26db9b146819daa3cc36b8422 100755 (executable)
@@ -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 <info@unipi.technology>  %s\n\n" "`date -R`"; \
          cat debian/changelog;\
        ) >debian/unipi-kernel-modules.changelog