From 9b61455a99c7570d112e33cb5a197e7b89a8481b Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Mar 04 2021 19:36:21 +0000 Subject: add macros for autobuilding Signed-off-by: Lokesh Mandvekar --- diff --git a/containernetworking-plugins.spec b/containernetworking-plugins.spec index 3884aae..0878750 100644 --- a/containernetworking-plugins.spec +++ b/containernetworking-plugins.spec @@ -30,8 +30,10 @@ %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) # Used for comparing with latest upstream tag -# to decide whether to autobuild (non-rawhide only) -%global built_tag v0.9.1 +# to decide whether to autobuild and set download url (non-rawhide only) +%define built_tag v0.9.1 +%define built_tag_strip %(b=%{built_tag}; echo ${b:1}) +%define download_url %{git0}/archive/%{built_tag}.tar.gz Name: %{project}-%{repo} Version: 0.9.1 @@ -39,7 +41,7 @@ Release: 1.1.git%{shortcommit0}%{?dist} Summary: Libraries for writing CNI plugin License: ASL 2.0 URL: %{git0} -Source0: %{git0}/archive/%{commit0}.tar.gz +Source0: %{download_url} # If go_compiler is not set to 1, there is no virtual provide. Use golang instead. BuildRequires: golang BuildRequires: git