47de77a
%if 0%{?fedora} >= 37
47de77a
%ifarch aarch64,x86_64
47de77a
%global krun_support enabled
47de77a
%endif
47de77a
%else
47de77a
%global krun_support disabled
47de77a
%endif
47de77a
0102e23
%global built_tag_strip 1.6
64bd724
8bf27bd
Summary: OCI runtime written in C
8bf27bd
Name: crun
RH Container Bot 38e120f
Version: 1.6
583b543
URL: https://github.com/containers/%{name}
09bbfb7
Source0: %{url}/releases/download/%{version}/%{name}-%{version}.tar.xz
8c9e530
%if "%{_vendor}" == "debbuild"
47de77a
Packager: Lokesh Mandvekar <lsm5@fedoraproject.org>
8c9e530
License: GPL-2.0+
8c9e530
Release: 0%{?dist}
8c9e530
%else
4fa0fa9
License: GPLv2+
8c9e530
Release: %autorelease
8c9e530
%endif
8bf27bd
BuildRequires: autoconf
8bf27bd
BuildRequires: automake
8c9e530
BuildRequires: go-md2man
8c9e530
BuildRequires: libtool
8c9e530
%if "%{_vendor}" == "debbuild"
8c9e530
BuildRequires: git
8c9e530
BuildRequires: libcap-dev
8c9e530
BuildRequires: libseccomp-dev
8c9e530
BuildRequires: libsystemd-dev
8c9e530
BuildRequires: libyajl-dev
8c9e530
BuildRequires: pkg-config
8c9e530
%else
8bf27bd
BuildRequires: gcc
8c9e530
BuildRequires: git-core
b124f1c
BuildRequires: python3
c0b699e
BuildRequires: libcap-devel
8bf27bd
BuildRequires: systemd-devel
8bf27bd
BuildRequires: yajl-devel
47de77a
%if "%{krun_support}" == "enabled"
47de77a
BuildRequires: libkrun-devel
47de77a
Provides: krun
47de77a
%endif
8bf27bd
BuildRequires: libseccomp-devel
8bf27bd
BuildRequires: libselinux-devel
8bf27bd
BuildRequires: python3-libmount
e91e3db
BuildRequires: make
4a6c717
BuildRequires: glibc-static
650440d
BuildRequires: protobuf-c-devel
f12f398
%ifnarch %ix86
47de77a
BuildRequires: criu-devel >= 3.17.1-2
f12f398
%endif
8c9e530
%endif
47de77a
Requires: criu >= 3.17.1-2
aced1fa
Provides: oci-runtime
a160789
a160789
%description
583b543
%{name} is a runtime for running OCI containers
a160789
a160789
%prep
8c9e530
%autosetup -Sgit
a160789
a160789
%build
8bf27bd
./autogen.sh
47de77a
47de77a
%if "%{krun_support}" == "enabled"
47de77a
%configure --disable-silent-rules --with-libkrun
47de77a
%else
8bf27bd
%configure --disable-silent-rules
47de77a
%endif
a160789
8bf27bd
%make_build
a160789
8bf27bd
%install
8bf27bd
%make_install
64bd724
rm -rf %{buildroot}%{_prefix}/lib*
a160789
47de77a
%if "%{krun_support}" == "enabled"
47de77a
ln -s %{_bindir}/%{name} %{buildroot}%{_bindir}/krun
47de77a
%endif
47de77a
a160789
%files
8bf27bd
%license COPYING
8bf27bd
%{_bindir}/%{name}
47de77a
%if "%{krun_support}" == "enabled"
47de77a
%{_bindir}/krun
47de77a
%endif
8bf27bd
%{_mandir}/man1/*
a160789
a160789
%changelog
8c9e530
%if "%{_vendor}" != "debbuild"
491e970
%autochangelog
8c9e530
%endif