%global krun_opts %{nil} %if 0%{?fedora} >= 37 %ifarch aarch64 || x86_64 %global krun_support enabled %global krun_opts --with-libkrun %endif %endif %ifnarch %{ix86} || ppc64le %global wasmtime_support enabled %endif Summary: OCI runtime written in C Name: crun Epoch: 101 #FIXME: copr build env replaces this with a strange version number #Version: 1.6.0.0.0.79 Version: 0.0 %define build_timestamp %{lua: print(os.date("%Y%m%d%H%M%S"))} Release: %{build_timestamp}.ccf4cb1%{?dist} # `make tarball-prep` will generate this from HEAD commit in the repo root dir Source0: %{name}-HEAD.tar.gz License: GPLv2+ URL: https://github.com/containers/%{name} BuildRequires: autoconf BuildRequires: automake BuildRequires: gcc BuildRequires: git-core BuildRequires: libcap-devel %if "%{krun_support}" == "enabled" BuildRequires: libkrun-devel %endif BuildRequires: systemd-devel BuildRequires: yajl-devel BuildRequires: libseccomp-devel BuildRequires: python3-libmount BuildRequires: libtool BuildRequires: go-md2man %if "%{wasmtime_support}" == "enabled" BuildRequires: wasmtime-c-api-devel Requires: wasmtime-c-api %endif %if 0%{?rhel} == 8 BuildRequires: python3 %else BuildRequires: python %endif Provides: oci-runtime %description %{name} is a OCI runtime %if "%{krun_support}" == "enabled" %package -n krun Summary: %{name} with libkrun support Requires: libkrun %description -n krun krun is a symlink to the crun binary, with libkrun as an additional dependency. %endif %prep %autosetup -Sgit -n %{name}-HEAD %build ./autogen.sh %if "%{wasmtime_support}" == "enabled" ./configure --disable-silent-rules --with-wasmtime %{krun_opts} %else ./configure --disable-silent-rules %{krun_opts} %endif %make_build %install # FIXME: make_install no longer finds files as expected, # so need to run install steps explicitly #%%make_install install -dp %{buildroot}%{_bindir} install -Dp -m0755 %{name} %{buildroot}%{_bindir} install -dp %{buildroot}%{_mandir}/man1 install -Dp -m0644 %{name}.1 %{buildroot}%{_mandir}/man1 rm -rf %{buildroot}%{_usr}/lib* %if "%{krun_support}" == "enabled" ln -s %{_bindir}/%{name} %{buildroot}%{_bindir}/krun %endif %files %license COPYING %{_bindir}/%{name} %{_mandir}/man1/* %if "%{krun_support}" == "enabled" %files -n krun %license COPYING %{_bindir}/krun %endif