diff --git a/make/environment-image.mk b/make/environment-image.mk index 0ab71c25..4719dca9 100644 --- a/make/environment-image.mk +++ b/make/environment-image.mk @@ -3,13 +3,23 @@ # # ----------------------------------------------------------------------------- +# Versioning +GITTAG=$(shell git tag -l "NI-*" | tail -n1) +GITREV=$(shell git rev-list $(GITTAG)..HEAD --count) + +IMAGE_VER_MAJOR = 3 +IMAGE_VER_MINOR = 60 +IMAGE_VER_MICRO = $(GITREV) +IMAGE_VER = $(IMAGE_VER_MAJOR)$(IMAGE_VER_MINOR) + +IMAGE_VERSION = $(IMAGE_VER_MAJOR).$(IMAGE_VER_MINOR).$(IMAGE_VER_MICRO) + # Release date -IMAGE_DATE = $(shell date +%Y%m%d%H%M) +IMAGE_DATE = $(shell date +%Y%m%d%H%M) -# Version Strings -IMAGE_VERSION = 360 -IMAGE_PREFIX = ni$(IMAGE_VERSION)-$(IMAGE_DATE) -IMAGE_SUFFIX = $(BOXTYPE_SC)-$(BOXMODEL) +# Image names +IMAGE_PREFIX = ni$(IMAGE_VER)-$(IMAGE_DATE) +IMAGE_SUFFIX = $(BOXTYPE_SC)-$(BOXMODEL) # Image-Type # Release = 0 @@ -19,32 +29,31 @@ IMAGE_SUFFIX = $(BOXTYPE_SC)-$(BOXMODEL) IMAGE_TYPE ?= 9 # JFFS2-Summary -IMAGE_SUMMARIZE = yes +IMAGE_SUMMARIZE = yes # newimage-flag -IMAGE_NEW = no +IMAGE_NEW = no # Beta/Release Server -NI-SERVER = http://neutrino-images.de/neutrino-images +NI-SERVER = http://neutrino-images.de/neutrino-images ifeq ($(IMAGE_TYPE), 0) # Release - NI-SUBDIR = release + NI-SUBDIR = release IMAGE_TYPE_STRING = release else ifeq ($(IMAGE_TYPE), 1) # Beta - NI-SUBDIR = beta + NI-SUBDIR = beta IMAGE_TYPE_STRING = beta else ifeq ($(IMAGE_TYPE), 2) # Nightly - NI-SUBDIR = nightly + NI-SUBDIR = nightly IMAGE_TYPE_STRING = nightly else # Selfmade; just for compatibility; not needed for our builds - NI-SUBDIR = selfmade + NI-SUBDIR = selfmade IMAGE_TYPE_STRING = selfmade endif IMAGE_URL = $(NI-SERVER)/$(NI-SUBDIR) -IMAGE_VERSION_STRING = $(shell echo $(IMAGE_VERSION) | sed -e :a -e 's/\(.*[0-9]\)\([0-9]\{2\}\)/\1.\2/;ta') IMAGE_BUILD_TMP = $(BUILD_TMP)/image-build diff --git a/make/environment-update.mk b/make/environment-update.mk index 3934f9a7..07ce2d09 100644 --- a/make/environment-update.mk +++ b/make/environment-update.mk @@ -13,8 +13,8 @@ PREINSTALL_SH = $(UPDATE_CTRL_DIR)/preinstall.sh # defaults for Neutrino-Update UPDATE_DATE = $(shell date +%Y%m%d%H%M) +UPDATE_VER = $(IMAGE_VER) UPDATE_VERSION = $(IMAGE_VERSION) -UPDATE_VERSION_STRING = $(IMAGE_VERSION_STRING) UPDATE_PREFIX = $(IMAGE_PREFIX) UPDATE_SUFFIX = $(BOXTYPE_SC)-$(BOXSERIES)-update diff --git a/make/image-update.mk b/make/image-update.mk index f5157fc0..6198411b 100644 --- a/make/image-update.mk +++ b/make/image-update.mk @@ -93,13 +93,13 @@ u-pr-auto-timer: install -m 0644 $(SOURCE_DIR)/$(NI_NEUTRINO-PLUGINS)/scripts-sh/plugins/pr-auto-timer/pr-auto-timer.rules.template $(UPDATE_INST_DIR)/var/tuxbox/config/ install -m 0644 $(SOURCE_DIR)/$(NI_NEUTRINO-PLUGINS)/scripts-sh/plugins/pr-auto-timer/auto-record-cleaner.conf.template $(UPDATE_INST_DIR)/var/tuxbox/config/ install -m 0644 $(SOURCE_DIR)/$(NI_NEUTRINO-PLUGINS)/scripts-sh/plugins/pr-auto-timer/auto-record-cleaner.rules.template $(UPDATE_INST_DIR)/var/tuxbox/config/ - VERSION_STRING=`cat $(SOURCE_DIR)/$(NI_NEUTRINO-PLUGINS)/scripts-sh/plugins/pr-auto-timer/pr-auto-timer | grep '^VERSION' | cut -d= -f2`; \ + PKG_VERSION=`cat $(SOURCE_DIR)/$(NI_NEUTRINO-PLUGINS)/scripts-sh/plugins/pr-auto-timer/pr-auto-timer | grep '^VERSION' | cut -d= -f2`; \ $(MAKE) u-update-bin \ UPDATE_MD5FILE=pr-auto-timer.txt \ UPDATE_URL=$(NI-SERVER)/plugins/pr-auto-timer \ - UPDATE_NAME=pr-auto-timer_$${VERSION_STRING//./} \ + UPDATE_NAME=pr-auto-timer_$${PKG_VERSION//./} \ UPDATE_DESC=Auto-Timer \ - UPDATE_VERSION_STRING=$$VERSION_STRING + UPDATE_VERSION=$$PKG_VERSION # ----------------------------------------------------------------------------- @@ -158,7 +158,7 @@ pathauf-192: UPDATE_MD5FILE=$(CHANNELLISTS_MD5FILE) \ UPDATE_NAME=$@ \ UPDATE_DESC="$$desc - " \ - UPDATE_VERSION_STRING="$$date" \ + UPDATE_VERSION="$$date" \ # ----------------------------------------------------------------------------- @@ -167,7 +167,7 @@ u-custom: UPDATE_MD5FILE=custom_bin.txt \ UPDATE_NAME=custom_bin \ UPDATE_DESC="Custom Package" \ - UPDATE_VERSION_STRING="0.00" + UPDATE_VERSION="0.00" # ----------------------------------------------------------------------------- @@ -188,7 +188,7 @@ u-clean-all: u-clean u-update-bin: set -e; cd $(BUILD_TMP); \ tar -czvf $(UPDATE_DIR)/$(UPDATE_NAME).bin temp_inst - echo $(UPDATE_URL)/$(UPDATE_NAME).bin $(UPDATE_TYPE)$(UPDATE_VERSION)$(UPDATE_DATE) `md5sum $(UPDATE_DIR)/$(UPDATE_NAME).bin | cut -c1-32` $(UPDATE_DESC) $(UPDATE_VERSION_STRING) >> $(UPDATE_DIR)/$(UPDATE_MD5FILE) + echo $(UPDATE_URL)/$(UPDATE_NAME).bin $(UPDATE_TYPE)$(UPDATE_VER)$(UPDATE_DATE) `md5sum $(UPDATE_DIR)/$(UPDATE_NAME).bin | cut -c1-32` $(UPDATE_DESC) $(UPDATE_VERSION) >> $(UPDATE_DIR)/$(UPDATE_MD5FILE) $(MAKE) u-clean # ----------------------------------------------------------------------------- diff --git a/make/images.mk b/make/images.mk index eb1208c0..bb17be68 100644 --- a/make/images.mk +++ b/make/images.mk @@ -83,7 +83,7 @@ ifeq ($(IMAGE_SUMMARIZE), yes) rm -f $(IMAGE_DIR)/$(IMAGE_NAME).img mv $(IMAGE_DIR)/$(IMAGE_NAME)-sum.img $(IMAGE_DIR)/$(IMAGE_NAME).img endif - echo $(IMAGE_URL)/$(IMAGE_NAME).img $(IMAGE_TYPE)$(IMAGE_VERSION)$(IMAGE_DATE) `md5sum $(IMAGE_DIR)/$(IMAGE_NAME).img | cut -c1-32` $(IMAGE_DESC) $(IMAGE_VERSION_STRING) >> $(IMAGE_DIR)/$(IMAGE_MD5FILE) + echo $(IMAGE_URL)/$(IMAGE_NAME).img $(IMAGE_TYPE)$(IMAGE_VER)$(IMAGE_DATE) `md5sum $(IMAGE_DIR)/$(IMAGE_NAME).img | cut -c1-32` $(IMAGE_DESC) $(IMAGE_VERSION) >> $(IMAGE_DIR)/$(IMAGE_MD5FILE) make check-image-size IMAGE_TO_CHECK=$(IMAGE_DIR)/$(IMAGE_NAME).img # ----------------------------------------------------------------------------- @@ -124,7 +124,7 @@ flash-image-armbox: # Create minimal image $(CD) $(IMAGE_BUILD_TMP)/$(BOXMODEL); \ tar -czf $(IMAGE_DIR)/$(IMAGE_NAME).tgz kernel.bin rootfs.tar.bz2 - echo $(IMAGE_URL)/$(IMAGE_NAME).tgz $(IMAGE_TYPE)$(IMAGE_VERSION)$(IMAGE_DATE) `md5sum $(IMAGE_DIR)/$(IMAGE_NAME).tgz | cut -c1-32` $(IMAGE_DESC) $(IMAGE_VERSION_STRING) >> $(IMAGE_DIR)/$(IMAGE_MD5FILE) + echo $(IMAGE_URL)/$(IMAGE_NAME).tgz $(IMAGE_TYPE)$(IMAGE_VER)$(IMAGE_DATE) `md5sum $(IMAGE_DIR)/$(IMAGE_NAME).tgz | cut -c1-32` $(IMAGE_DESC) $(IMAGE_VERSION) >> $(IMAGE_DIR)/$(IMAGE_MD5FILE) rm -rf $(IMAGE_BUILD_TMP)/$(BOXMODEL) # ----------------------------------------------------------------------------- @@ -155,6 +155,7 @@ THIRD_KERNEL_PARTITION_OFFSET = "$(shell expr $(SECOND_KERNEL_PARTITION_OFFSET) FOURTH_KERNEL_PARTITION_OFFSET = "$(shell expr $(THIRD_KERNEL_PARTITION_OFFSET) \+ $(KERNEL_PARTITION_SIZE))" MULTI_ROOTFS_PARTITION_OFFSET = "$(shell expr $(FOURTH_KERNEL_PARTITION_OFFSET) \+ $(KERNEL_PARTITION_SIZE))" +flash-image-armbox-multi: IMAGE_NAME=$(IMAGE_PREFIX)-$(IMAGE_SUFFIX) flash-image-armbox-multi: mkdir -p $(IMAGE_BUILD_TMP) # Create a sparse image block @@ -197,7 +198,7 @@ flash-image-armbox-multi: bzip2 $(IMAGE_DIR)/$(BOXMODEL)/rootfs.tar echo $(IMAGE_PREFIX) > $(IMAGE_DIR)/$(BOXMODEL)/imageversion $(CD) $(IMAGE_DIR); \ - zip -r $(IMAGE_PREFIX)-$(IMAGE_SUFFIX)_multi_usb.zip $(BOXMODEL)/* + zip -r $(IMAGE_NAME)_multi_usb.zip $(BOXMODEL)/* # cleanup rm -rf $(IMAGE_DIR)/$(BOXMODEL) rm -rf $(IMAGE_BUILD_TMP) diff --git a/make/rootfs.mk b/make/rootfs.mk index 1ac243f8..32b58c27 100644 --- a/make/rootfs.mk +++ b/make/rootfs.mk @@ -14,8 +14,8 @@ endif $(TARGET_DIR)/.version: | $(TARGET_DIR) echo "distro=NI" > $@ echo "imagename=NI \o/ Neutrino-Image" >> $@ - echo "imageversion=$(IMAGE_VERSION_STRING)" >> $@ - echo "version=$(IMAGE_TYPE)$(IMAGE_VERSION)$(IMAGE_DATE)" >> $@ + echo "imageversion=$(IMAGE_VERSION)" >> $@ + echo "version=$(IMAGE_TYPE)$(IMAGE_VER)$(IMAGE_DATE)" >> $@ echo "describe=$$(git describe --always --long --tags | sed 's/-/./2')" >> $@ echo "builddate=$$(date)" >> $@ echo "creator=$(MAINTAINER)" >> $@ @@ -35,7 +35,7 @@ e2-multiboot: echo -e "#!/bin/sh\necho Nope!" > $(TARGET_DIR)/usr/bin/enigma2 chmod 0755 $(TARGET_DIR)/usr/bin/enigma2 # - echo -e "NI $(IMAGE_VERSION_STRING)\n" >> $(TARGET_DIR)/etc/issue + echo -e "NI $(IMAGE_VERSION) \\\n \\\l\n" > $(TARGET_DIR)/etc/issue # mkdir -p $(TARGET_DIR)/share touch $(TARGET_DIR)/share/bootlogo.mvi