@ -1,47 +1,52 @@
# Generated by rust2rpm 23
# Generated by rust2rpm 24
%bcond_without check
%global crate bat
Name: rust-bat
Version: 0.21 .0
Version: 0.24 .0
Release: %autorelease
Summary: Cat(1) clone with wings
# Upstream license specification: MIT/Apache-2.0
License: MIT OR Apache-2.0
URL: https://crates.io/crates/bat
Source: %{crates_source}
# Automatically generated patch to strip foreign dependencies
Patch: bat-fix-metadata-auto.diff
# Manually created patch for downstream crate metadata changes
# * remove compiler settings that are incompatible with RPM packaging
# * Port from path_abs to path-absolutize:
# https://github.com/sharkdp/bat/pull/1025
# * Bump os_str_bytes from 6.4 to 6.6
Patch: bat-fix-metadata.diff
Patch: 0001-port-from-path_abs-to-path-absolutize.patch
BuildRequires: rust-packaging >= 23
%global _description %{expand:
C at(1) clone with wings.}
A c at(1) clone with wings.}
%description %{_description}
%package -n %{crate}
Summary: %{summary}
# 0BSD or MIT or ASL 2.0
# ASL 2.0
# ASL 2.0 or Boost
# ASL 2.0 or MIT
# BSD
# CC0
# LGPLv3+
# (Apache-2.0 OR MIT) AND BSD-3-Clause
# (MIT OR Apache-2.0) AND BSD-3-Clause AND GPL-2.0-only WITH GCC-exception-2.0 AND MIT
# (MIT OR Apache-2.0) AND Unicode-DFS-2016
# 0BSD OR MIT OR Apache-2.0
# 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-2-Clause
# LGPL-3.0-or-later
# MIT
# MIT and GPLv2 with exceptions and BSD
# MIT or ASL 2.0
# MIT or ASL 2.0 or zlib
# MIT or zlib or ASL 2.0
# Unlicense or MIT
# zlib or ASL 2.0 or MIT
License: ASL 2.0 and BSD and CC0 and GPLv2 with exceptions and LGPLv3+ and MIT
# MIT OR Apache-2.0
# MIT OR Apache-2.0 OR Zlib
# MIT OR Zlib OR Apache-2.0
# Unlicense OR MIT
# Zlib OR Apache-2.0 OR MIT
License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND CC0-1.0 AND GPL-2.0-only WITH GCC-exception-2.0 AND LGPL-3.0-or-later AND MIT AND Unicode-DFS-2016 AND (0BSD OR MIT OR Apache-2.0) 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
%description -n %{crate} %{_description}
@ -56,13 +61,9 @@ License: ASL 2.0 and BSD and CC0 and GPLv2 with exceptions and LGPLv3+ an
%doc README.md
%{_bindir}/bat
%{_mandir}/man1/bat.1*
%{_datadir}/bash-completion/completions/bat
%dir %{_datadir}/zsh
%dir %{_datadir}/zsh/site-functions
%{_datadir}/zsh/site-functions/_bat
%dir %{_datadir}/fish
%dir %{_datadir}/fish/vendor_completions.d
%{_datadir}/fish/vendor_completions.d/bat.fish
%{bash_completions_dir}/bat.bash
%{fish_completions_dir}/bat.fish
%{zsh_completions_dir}/_bat
%package devel
Summary: %{summary}
@ -106,18 +107,6 @@ use the "application" feature of the "%{crate}" crate.
%files -n %{name}+application-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+atty-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+atty-devel %{_description}
This package contains library source intended for building other packages which
use the "atty" feature of the "%{crate}" crate.
%files -n %{name}+atty-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+bugreport-devel
Summary: %{summary}
BuildArch: noarch
@ -154,16 +143,16 @@ use the "clap" feature of the "%{crate}" crate.
%files -n %{name}+clap-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+dirs-next -devel
%package -n %{name}+etcetera -devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+dirs-next -devel %{_description}
%description -n %{name}+etcetera -devel %{_description}
This package contains library source intended for building other packages which
use the "dirs-next " feature of the "%{crate}" crate.
use the "etcetera " feature of the "%{crate}" crate.
%files -n %{name}+dirs-next -devel
%files -n %{name}+etcetera -devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+git-devel
@ -202,6 +191,18 @@ use the "grep-cli" feature of the "%{crate}" crate.
%files -n %{name}+grep-cli-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+lessopen-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+lessopen-devel %{_description}
This package contains library source intended for building other packages which
use the "lessopen" feature of the "%{crate}" crate.
%files -n %{name}+lessopen-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+minimal-application-devel
Summary: %{summary}
BuildArch: noarch
@ -214,6 +215,18 @@ use the "minimal-application" feature of the "%{crate}" crate.
%files -n %{name}+minimal-application-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+os_str_bytes-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+os_str_bytes-devel %{_description}
This package contains library source intended for building other packages which
use the "os_str_bytes" feature of the "%{crate}" crate.
%files -n %{name}+os_str_bytes-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+paging-devel
Summary: %{summary}
BuildArch: noarch
@ -262,6 +275,18 @@ use the "regex-onig" feature of the "%{crate}" crate.
%files -n %{name}+regex-onig-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+run_script-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+run_script-devel %{_description}
This package contains library source intended for building other packages which
use the "run_script" feature of the "%{crate}" crate.
%files -n %{name}+run_script-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+shell-words-devel
Summary: %{summary}
BuildArch: noarch
@ -303,40 +328,30 @@ use the "wild" feature of the "%{crate}" crate.
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires -a
%cargo_generate_buildrequires
%build
%cargo_build
%cargo_license_summary
%{ cargo_license_summary}
%{cargo_license} > LICENSE.dependencies
%install
%cargo_install
# install man page
install -Dpm0644 target/release/build/%{crate}-*/out/assets/manual/bat.1 \
-t %{buildroot}%{_mandir}/man1/
# install shell completions
install -Dpm0644 target/release/build/%{crate}-*/out/assets/completions/bat.bash \
%{buildroot}%{_datadir}/bash-completion/completions/bat
install -Dpm0644 target/release/build/%{crate}-*/out/assets/completions/bat.zsh \
%{buildroot}%{_datadir}/zsh/site-functions/_bat
%{buildroot}/%{bash_completions_dir}/bat.bash
install -Dpm0644 target/release/build/%{crate}-*/out/assets/completions/bat.fish \
-t %{buildroot}%{_datadir}/fish/vendor_completions.d/
%{buildroot}/%{fish_completions_dir}/bat.fish
install -Dpm0644 target/release/build/%{crate}-*/out/assets/completions/bat.zsh \
%{buildroot}/%{zsh_completions_dir}/_bat
%if %{with check}
%check
%ifarch %{arm} ppc64le
# * doctests fail to compile on armv7hl with LLVM 14:
# https://bugzilla.redhat.com/show_bug.cgi?id=2086106
# * doctests fail to compile on ppc64le with LLVM 15:
# https://bugzilla.redhat.com/show_bug.cgi?id=2142648
%cargo_test -- --lib
%else
%cargo_test
%endif
%endif
%changelog
%autochangelog