simplify macros

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
This commit is contained in:
Lokesh Mandvekar 2024-01-17 16:17:16 +05:30
parent 45fb0b81d9
commit 8d2ffc9fbe
No known key found for this signature in database
GPG Key ID: 1C1EDD7CC7C3A0DD

View File

@ -1,22 +1,20 @@
%global built_tag v0.1.7
%global built_tag_strip %(b=%{built_tag}; echo ${b:1})
%global gen_version %(b=%{built_tag_strip}; echo ${b/-/"~"})
Name: catatonit Name: catatonit
Version: %{gen_version} Version: 0.1.7
Summary: A signal-forwarding process manager for containers Summary: A signal-forwarding process manager for containers
License: GPL-3.0-or-later License: GPL-3.0-or-later
Release: %autorelease Release: %autorelease
# For centos on rhcontainerbot/qm copr # For centos on rhcontainerbot/qm copr
%if 0%{?centos} %if 0%{?centos}
Epoch: 4 Epoch: 4
ExclusiveArch: aarch64 ppc64le s390x x86_64 %endif
%else %if %{defined golang_arches_future}
ExclusiveArch: %{golang_arches_future} ExclusiveArch: %{golang_arches_future}
%else
ExclusiveArch: aarch64 ppc64le s390x x86_64
%endif %endif
URL: https://github.com/openSUSE/%{name} URL: https://github.com/openSUSE/%{name}
# Tarball fetched from upstream # Tarball fetched from upstream
Source0: %{url}/archive/%{built_tag}.tar.gz Source0: %{url}/archive/v%{version}.tar.gz
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: automake BuildRequires: automake
BuildRequires: file BuildRequires: file
@ -38,7 +36,7 @@ This is a reimplementation of other container init programs (such as
signalfd(2)) and has no additional features. signalfd(2)) and has no additional features.
%prep %prep
%autosetup -Sgit %{name}-%{built_tag_strip} %autosetup -Sgit %{name}-%{version}
sed -i '$d' configure.ac sed -i '$d' configure.ac
%build %build