diff options
author | Devaev Maxim <[email protected]> | 2018-09-26 02:11:23 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2018-09-26 02:11:23 +0300 |
commit | 940989b6e9a3fe31bd236e4bed96e1d4778a403b (patch) | |
tree | 0ed5679b56b198db88b27390b92e29019cd4ab6f /os/Makefile | |
parent | 6e9a3222ce566f6430caad541c2695255cb06d7c (diff) |
v2 beta
Diffstat (limited to 'os/Makefile')
-rw-r--r-- | os/Makefile | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/os/Makefile b/os/Makefile index d3f8e9e6..68bbb935 100644 --- a/os/Makefile +++ b/os/Makefile @@ -9,7 +9,12 @@ WEBUI_ADMIN_PASSWD ?= admin # ===== _BUILD_DIR = ./.build -_KVMD_VERSION = $(shell bash -c 'source ../kvmd/PKGBUILD; echo $$pkgver') + +define fetch_version + curl --silent "https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=$(1)" \ + | grep "^pkgver=" \ + | grep -Po "\d+\.\d+[^\"']*" +endef # ===== @@ -21,24 +26,30 @@ v1: make _pikvm PIKVM_PLATFORM=v1 PI_BOARD=rpi-2 +v2: + make _pikvm PIKVM_PLATFORM=v2 PI_BOARD=rpi-2 + + shell: cd $(_BUILD_DIR) && make shell _pikvm: $(_BUILD_DIR) - rm -rf $(_BUILD_DIR)/stages/pikvm + rm -rf $(_BUILD_DIR)/stages/pikvm-* rm -rf $(_BUILD_DIR)/builder/scripts/pikvm - cp -a platforms/$(PIKVM_PLATFORM) $(_BUILD_DIR)/stages/pikvm + cp -a platforms/common $(_BUILD_DIR)/stages/pikvm-common + cp -a platforms/$(PIKVM_PLATFORM) $(_BUILD_DIR)/stages/pikvm-$(PIKVM_PLATFORM) cd $(_BUILD_DIR) && make binfmt && make _rpi \ BUILD_OPTS=" $(BUILD_OPTS) \ - --build-arg KVMD_VERSION=$(_KVMD_VERSION) \ + --build-arg USTREAMER_VERSION=$(call fetch_version, ustreamer) \ + --build-arg KVMD_VERSION=$(call fetch_version, kvmd) \ --build-arg NEW_SSH_KEYGEN=$(shell uuidgen) \ --build-arg WEBUI_ADMIN_PASSWD='$(WEBUI_ADMIN_PASSWD)' \ --build-arg NEW_HTTPS_CERT=$(shell uuidgen) \ " \ PROJECT=pikvm \ BOARD=$(PI_BOARD) \ - STAGES="__init__ os watchdog ro pikvm rootssh __cleanup__" \ + STAGES="__init__ os watchdog ro pikvm-common pikvm-$(PIKVM_PLATFORM) rootssh __cleanup__" \ LOCALE=$(LOCALE) \ TIMEZONE=$(TIMEZONE) |