%global krun_opts %{nil} %if 0%{?fedora} >= 37 %ifarch aarch64 || x86_64 %global krun_support enabled %global krun_opts --with-libkrun %endif %endif %if 0%{?fedora} %global wasmtime_support enabled %global wasmtime_opts --with-wasmtime %endif Summary: OCI runtime written in C Name: crun Epoch: 101 #FIXME: copr build env replaces this with a strange version number #Version: 1.4.3.0.0.0.172 Version: 0.0 %define build_timestamp %{lua: print(os.date("%Y%m%d%H%M%S"))} Release: %{build_timestamp}.ad9008b%{?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: python 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 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 ./configure --disable-silent-rules %{wasmtime_opts} %{krun_opts} %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