diff --git a/greenboot.spec b/greenboot.spec index ebc5cd1..14e7c02 100644 --- a/greenboot.spec +++ b/greenboot.spec @@ -27,7 +27,7 @@ Source1: %{name}-%{version}-vendor.tar.gz ExcludeArch: s390x i686 %{power64} -%if 0%{?rhel} && !0%{?eln} +%if 0%{?rhel} BuildRequires: rust-toolset %else BuildRequires: rust-packaging @@ -158,44 +158,14 @@ Requires: jq %{summary}. %prep -%forgeautosetup -%if ! 0%{?with_packit} -tar xvf %{SOURCE1} -%endif -%if ! 0%{?with_bundled} -%cargo_prep -%else -mkdir -p .cargo -cat >.cargo/config << EOF -[build] -rustc = "%{__rustc}" -rustdoc = "%{__rustdoc}" -%if 0%{?rhel} && !0%{?eln} -rustflags = %{__global_rustflags_toml} -%else -rustflags = "%{__global_rustflags_toml}" -%endif - -[profile.rpm] -inherits = "release" - -[install] -root = "%{buildroot}%{_prefix}" - -[term] -verbose = true - -[source.crates-io] -replace-with = "vendored-sources" - -[source.vendored-sources] -directory = "vendor" -EOF -%endif +%autosetup -p1 -n %{name}-rs-%{version} -%if ! 0%{?with_bundled} +%if 0%{?rhel} +%cargo_prep -V 1 +%else +%cargo_prep %generate_buildrequires -%cargo_generate_buildrequires +%cargo_generate_buildrequires -a %endif %build