Blob Blame History Raw
# Generated by rust2rpm 25
%bcond_without check

%global crate fedora-update-feedback

# reduce debuginfo verbosity to work around rustc OOM problems on 32-bit arches
%global rustflags_debuginfo 1

Name:           rust-fedora-update-feedback
Version:        2.1.3
Release:        %autorelease
Summary:        Provide feedback for Fedora updates (inspired by fedora-easy-karma)

License:        MIT OR Apache-2.0
URL:            https://crates.io/crates/fedora-update-feedback
Source:         %{crates_source}

BuildRequires:  cargo-rpm-macros >= 24

%global _description %{expand:
Provide feedback for Fedora updates (inspired by fedora-easy-karma).}

%description %{_description}

%package     -n %{crate}
Summary:        %{summary}
# (Apache-2.0 OR MIT) AND BSD-3-Clause
# (MIT OR Apache-2.0) AND Unicode-DFS-2016
# Apache-2.0
# Apache-2.0 AND MIT
# Apache-2.0 OR BSL-1.0
# Apache-2.0 OR MIT
# Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT
# BSD-3-Clause
# MIT
# MIT OR Apache-2.0
# MIT OR Apache-2.0 OR Zlib
# MPL-2.0
# Unlicense OR MIT
# Zlib OR Apache-2.0 OR MIT
License:        Apache-2.0 AND BSD-3-Clause AND MIT AND MPL-2.0 AND Unicode-DFS-2016 AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (MIT OR Apache-2.0 OR Zlib) AND (Unlicense OR MIT)
# LICENSE.dependencies contains a full license breakdown

# nano is the fallback in case no editor is configured
Recommends:     nano

%description -n %{crate} %{_description}

%files       -n %{crate}
%license LICENSE-APACHE
%license LICENSE-MIT
%license LICENSE.dependencies
%doc CHANGELOG.md
%doc README.md
%{_bindir}/fedora-update-feedback
%{bash_completions_dir}/fedora-update-feedback.bash
%{fish_completions_dir}/fedora-update-feedback.fish
%{zsh_completions_dir}/_fedora-update-feedback

%prep
%autosetup -n %{crate}-%{version} -p1
%cargo_prep

%generate_buildrequires
%cargo_generate_buildrequires

%build
%cargo_build
%{cargo_license_summary}
%{cargo_license} > LICENSE.dependencies

%install
%cargo_install
# install shell completions
install -Dpm 0644 target/release/build/%{crate}-*/out/fedora-update-feedback.bash \
    %{buildroot}/%{bash_completions_dir}/fedora-update-feedback.bash
install -Dpm 0644 target/release/build/%{crate}-*/out/fedora-update-feedback.fish \
    %{buildroot}/%{fish_completions_dir}/fedora-update-feedback.fish
install -Dpm 0644 target/release/build/%{crate}-*/out/_fedora-update-feedback \
    %{buildroot}/%{zsh_completions_dir}/_fedora-update-feedback

%if %{with check}
%check
%cargo_test
%endif

%changelog
%autochangelog