From a78fc2ddbbfcfb1c788af5d792776f61a6580adb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Mon, 4 Jun 2018 02:19:32 +0200 Subject: [PATCH] Pretend the template rpm is build the standard way This allows to reuse standard update-repo-* and sign-* make targets. QubesOS/qubes-issues#3935 --- Makefile.builder | 5 +++++ templates.spec | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 Makefile.builder diff --git a/Makefile.builder b/Makefile.builder new file mode 100644 index 0000000..b304110 --- /dev/null +++ b/Makefile.builder @@ -0,0 +1,5 @@ +# pretend that normal package is built from this repo, to reuse update-repo-* +ifeq ($(PACKAGE_SET),vm) +OUTPUT_DIR = rpm +RPM_SPEC_FILES = templates.spec +endif diff --git a/templates.spec b/templates.spec index 4c036ec..4511621 100644 --- a/templates.spec +++ b/templates.spec @@ -3,8 +3,9 @@ # This includes the VM's root image, patched with all qubes rpms, etc # -%{!?version: %define version %(cat version)} -%{!?rel: %define rel %(cat build_timestamp_%{template_name})} +%{!?template_name: %global template_name %{getenv:TEMPLATE_NAME}} +%{!?version: %global version %(cat version)} +%{!?rel: %global rel %(cat build_timestamp_%{template_name} || echo unavailable)} Name: qubes-template-%{template_name} Version: %{version} @@ -17,6 +18,7 @@ Source: . Requires: xdg-utils Requires(post): tar +BuildArch: noarch Provides: qubes-template Obsoletes: %{name} > %{version}-%{release}