Blob Blame History Raw
# Generated by rust2rpm 24
%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.2
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:  rust-packaging >= 23

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

%description %{_description}

%package     -n %{crate}
Summary:        %{summary}
# nano is the fallback in case no editor is configured
Recommends:     nano
# (Apache-2.0 OR MIT) AND BSD-3-Clause
# (MIT OR Apache-2.0) AND Unicode-DFS-2016
# Apache-2.0
# 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
# Unlicense OR MIT
# Zlib OR Apache-2.0 OR MIT
License:        Apache-2.0 AND BSD-3-Clause AND MIT AND Unicode-DFS-2016
# LICENSE.dependencies contains a full license breakdown

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

%files       -n %{crate}
%license LICENSE-APACHE
%license LICENSE-MIT
%license LICENSE.dependencies
%doc NEWS.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_no_tilde} -p1
%cargo_prep

%generate_buildrequires
%cargo_generate_buildrequires

%build
%cargo_build
# write license summary and breakdown
%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