Replace ExclusiveArch with ifarch

Signed-off-by: Jindrich Novy <jnovy@redhat.com>
This commit is contained in:
Jindrich Novy
2024-12-03 01:18:00 +01:00
committed by openshift-cherrypick-robot
parent aad97a1342
commit 139fd2a7cf

View File

@ -40,6 +40,9 @@
# %%{name}
%global git0 %{container_base_url}/%{name}
# podman-machine subpackage will be present only on these architectures
%global machine_arches x86_64 aarch64
Name: podman
%if %{defined copr_build}
Epoch: 102
@ -179,6 +182,7 @@ capabilities specified in user quadlets.
It is a symlink to %{_bindir}/%{name} and execs into the `%{name}sh` container
when `%{_bindir}/%{name}sh` is set as a login shell or set as os.Args[0].
%ifarch %{machine_arches}
%package machine
Summary: Metapackage for setting up %{name} machine
Requires: %{name} = %{epoch}:%{version}-%{release}
@ -189,6 +193,7 @@ Requires: virtiofsd
%description machine
This subpackage installs the dependencies for %{name} machine, for more see:
https://docs.podman.io/en/latest/markdown/podman-machine.1.html
%endif
%prep
%autosetup -Sgit -n %{name}-%{version_no_tilde}
@ -282,8 +287,10 @@ rm -f %{buildroot}%{_mandir}/man5/docker*.5
install -d -p %{buildroot}%{_datadir}/%{name}/test/system
cp -pav test/system %{buildroot}%{_datadir}/%{name}/test/
%ifarch %{machine_arches}
# symlink virtiofsd in %%{name} libexecdir for machine subpackage
ln -s ../virtiofsd %{buildroot}%{_libexecdir}/%{name}
%endif
#define license tag if not already defined
%{!?_licensedir:%global license %doc}
@ -338,9 +345,11 @@ ln -s ../virtiofsd %{buildroot}%{_libexecdir}/%{name}
%{_bindir}/%{name}sh
%{_mandir}/man1/%{name}sh.1*
%ifarch %{machine_arches}
%files machine
%dir %{_libexecdir}/%{name}
%{_libexecdir}/%{name}/virtiofsd
%endif
%changelog
%autochangelog