diff --git a/.gitignore b/.gitignore index e1d6f6b..1284d5f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ base_rpms keys appmenus +build_timestamp diff --git a/Makefile b/Makefile index 31eb570..e24be7a 100644 --- a/Makefile +++ b/Makefile @@ -3,8 +3,8 @@ $(error "You must set DIST variable, e.g. DIST=fc14") endif TEMPLATE_NAME := $${DIST/fc/fedora-}-x64 -TIMESTAMP := $(shell date -u +%Y%m%d-%H%M) -VERSION := $(shell cat version)-$(TIMESTAMP) +VERSION := $(shell cat version) +TIMESTAMP := $(shell date -u +%Y%m%d%H%M) help: @echo "make rpms -- generate template rpm" @@ -13,7 +13,8 @@ help: rpms: - @export DIST NO_SIGN + @echo $(TIMESTAMP) > build_timestamp + export DIST NO_SIGN @echo "Building template: $(TEMPLATE_NAME)" @./create_symlinks_in_rpms_to_install_dir.sh && \ sudo -E ./fedorize_image fedorized_images/$(TEMPLATE_NAME).img clean_images/packages.list && \ @@ -21,7 +22,7 @@ rpms: ./build_template_rpm $(TEMPLATE_NAME) || exit 1; \ update-repo-installer: - ln -f rpm/noarch/qubes-template-$(TEMPLATE_NAME)-$(VERSION)-*.noarch.rpm ../installer/yum/qubes-dom0/rpm + ln -f rpm/noarch/qubes-template-$(TEMPLATE_NAME)-$(VERSION)-$(shell cat build_timestamp)*.noarch.rpm ../installer/yum/qubes-dom0/rpm clean: sudo rm -fr qubeized_images/root.img.* diff --git a/templates.spec b/templates.spec index 6b64414..0455bdb 100644 --- a/templates.spec +++ b/templates.spec @@ -4,10 +4,11 @@ # %{!?version: %define version %(cat version)} +%{!?rel: %define rel %(cat build_timestamp)} Name: qubes-template-%{template_name} Version: %{version} -Release: 1 +Release: %{rel} Summary: Qubes template for %{template_name} License: GPL