diff --git a/bootc.spec b/bootc.spec index 67ded9e..e7fe751 100644 --- a/bootc.spec +++ b/bootc.spec @@ -21,7 +21,7 @@ Source1: %{url}/releases/download/v%{version}/bootc-%{version}-vendor.tar BuildRequires: make BuildRequires: ostree-devel BuildRequires: openssl-devel -%if 0%{?rhel} && !0%{?eln} +%if 0%{?rhel} BuildRequires: rust-toolset %else BuildRequires: cargo-rpm-macros >= 25 @@ -38,13 +38,19 @@ Recommends: bootupd %prep %autosetup -p1 -a1 +%if 0%{?rhel} +%cargo_prep -V 1 +%else %cargo_prep -v vendor +%endif %build %cargo_build +%if !0%{?rhel} %cargo_vendor_manifest %cargo_license_summary %{cargo_license} > LICENSE.dependencies +%endif %install %make_install INSTALL="install -p -c" @@ -57,8 +63,10 @@ Recommends: bootupd %files %license LICENSE-MIT %license LICENSE-APACHE +%if !0%{?rhel} %license LICENSE.dependencies %license cargo-vendor.txt +%endif %doc README.md %{_bindir}/bootc %{_prefix}/lib/bootc/