From 52c20e5f2a264d6386c6cd86e15ff653d65aaf13 Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Tue, 4 Oct 2022 13:39:50 -0400 Subject: [PATCH] adjust macros to get correct version Signed-off-by: Lokesh Mandvekar --- aardvark-dns.spec | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/aardvark-dns.spec b/aardvark-dns.spec index 7bf0c6f..3a669bf 100644 --- a/aardvark-dns.spec +++ b/aardvark-dns.spec @@ -4,18 +4,20 @@ # debuginfo doesn't work yet %global debug_package %{nil} -%global built_tag_strip 1.2.0 +%global built_tag v1.2.0 +%global built_tag_strip %(b=%{built_tag}; echo ${b:1}) +%global gen_version %(b=%{built_tag_strip}; echo ${b/-/"~"}) Name: aardvark-dns -Version: 1.2.0 +Version: %{gen_version} License: ASL 2.0 and BSD and MIT Release: %autorelease ExclusiveArch: %{rust_arches} Summary: Authoritative DNS server for A/AAAA container records URL: https://github.com/containers/%{name} # Tarballs fetched from upstream's release page -Source0: %{url}/archive/v%{built_tag_strip}.tar.gz -Source1: %{url}/releases/download/v%{built_tag_strip}/%{name}-v%{built_tag_strip}-vendor.tar.gz +Source0: %{url}/archive/%{built_tag}.tar.gz +Source1: %{url}/releases/download/%{built_tag}/%{name}-%{built_tag}-vendor.tar.gz BuildRequires: cargo BuildRequires: git-core BuildRequires: make