adjust macros for getting correct version

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
This commit is contained in:
Lokesh Mandvekar 2022-10-04 14:51:53 -04:00
parent eb89f37659
commit eed31dbdef

View File

@ -16,12 +16,14 @@
%global git0 https://%{import_path}
%global built_tag v1.2.6
%global built_tag_strip %(b=%{built_tag}; echo ${b:1})
%global gen_version %(b=%{built_tag_strip}; echo ${b/-/"~"})
# use the same arch definitions as present in the bcc package
ExclusiveArch: x86_64 %{power64} aarch64 s390x armv7hl
Name: %{repo}
Version: 1.2.6
Version: %{gen_version}
License: ASL 2.0 and BSD and ISC and MIT
Release: %autorelease
Summary: OCI Hook to generate seccomp json files based on EBF syscalls used by container
@ -67,7 +69,7 @@ Requires: podman
This package contains system tests for %{name}
%prep
%autosetup -Sgit
%autosetup -Sgit -n %{name}-%{built_tag_strip}
sed -i 's;HOOK_BIN_DIR;%{_libexecdir}/oci/hooks.d;' %{name}.json
sed -i '/$(HOOK_DIR)\/%{name}.json/d' Makefile