877c9e8
# Generated by rust2rpm 24
cecff3f
%bcond_without check
e82c1d1
e82c1d1
%global crate bat
e82c1d1
1918166
Name:           rust-bat
95a13e3
Version:        0.24.0
38dcc67
Release:        %autorelease
0ff52b5
Summary:        Cat(1) clone with wings
e82c1d1
1918166
License:        MIT OR Apache-2.0
e82c1d1
URL:            https://crates.io/crates/bat
1918166
Source:         %{crates_source}
877c9e8
# Automatically generated patch to strip foreign dependencies
877c9e8
Patch:          bat-fix-metadata-auto.diff
1918166
# Manually created patch for downstream crate metadata changes
877c9e8
# * remove compiler settings that are incompatible with RPM packaging
0ae1ca8
# * Port from path_abs to path-absolutize:
0ae1ca8
#   https://github.com/sharkdp/bat/pull/1025
b543e3b
# * Bump nu-ansi-term from 0.49.0 to 0.50.0
95a13e3
# * Bump os_str_bytes from 6.4 to 6.6
1918166
Patch:          bat-fix-metadata.diff
1918166
Patch:          0001-port-from-path_abs-to-path-absolutize.patch
e82c1d1
1918166
BuildRequires:  rust-packaging >= 23
e82c1d1
1a340b5
%global _description %{expand:
877c9e8
A cat(1) clone with wings.}
e82c1d1
e82c1d1
%description %{_description}
e82c1d1
e82c1d1
%package     -n %{crate}
e82c1d1
Summary:        %{summary}
95a13e3
# (Apache-2.0 OR MIT) AND BSD-3-Clause
877c9e8
# (MIT OR Apache-2.0) AND BSD-3-Clause AND GPL-2.0-only WITH GCC-exception-2.0 AND MIT
877c9e8
# (MIT OR Apache-2.0) AND Unicode-DFS-2016
877c9e8
# 0BSD OR MIT OR Apache-2.0
877c9e8
# Apache-2.0
877c9e8
# Apache-2.0 OR BSL-1.0
877c9e8
# Apache-2.0 OR MIT
877c9e8
# Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT
877c9e8
# BSD-2-Clause
877c9e8
# LGPL-3.0-or-later
ddcc744
# MIT
877c9e8
# MIT OR Apache-2.0
877c9e8
# MIT OR Apache-2.0 OR Zlib
877c9e8
# MIT OR Zlib OR Apache-2.0
877c9e8
# Unlicense OR MIT
877c9e8
# Zlib OR Apache-2.0 OR MIT
95a13e3
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)
0ae1ca8
# LICENSE.dependencies contains a full license breakdown
e82c1d1
96878c2
%description -n %{crate} %{_description}
e82c1d1
e82c1d1
%files       -n %{crate}
0ae1ca8
%license LICENSE-APACHE
0ae1ca8
%license LICENSE-MIT
0ae1ca8
%license NOTICE
0ae1ca8
%license LICENSE.dependencies
0ae1ca8
%doc CHANGELOG.md
0ae1ca8
%doc CONTRIBUTING.md
0ae1ca8
%doc README.md
e82c1d1
%{_bindir}/bat
e82c1d1
%{_mandir}/man1/bat.1*
877c9e8
%{bash_completions_dir}/bat.bash
877c9e8
%{fish_completions_dir}/bat.fish
877c9e8
%{zsh_completions_dir}/_bat
9020f8a
9020f8a
%package        devel
9020f8a
Summary:        %{summary}
9020f8a
BuildArch:      noarch
9020f8a
9020f8a
%description    devel %{_description}
9020f8a
0ae1ca8
This package contains library source intended for building other packages which
0ae1ca8
use the "%{crate}" crate.
9020f8a
9020f8a
%files          devel
0ae1ca8
%license %{crate_instdir}/LICENSE-APACHE
0ae1ca8
%license %{crate_instdir}/LICENSE-MIT
0ae1ca8
%license %{crate_instdir}/NOTICE
0ae1ca8
%doc %{crate_instdir}/CHANGELOG.md
0ae1ca8
%doc %{crate_instdir}/CONTRIBUTING.md
0ae1ca8
%doc %{crate_instdir}/README.md
0ae1ca8
%{crate_instdir}/
9020f8a
9020f8a
%package     -n %{name}+default-devel
9020f8a
Summary:        %{summary}
9020f8a
BuildArch:      noarch
9020f8a
9020f8a
%description -n %{name}+default-devel %{_description}
9020f8a
0ae1ca8
This package contains library source intended for building other packages which
0ae1ca8
use the "default" feature of the "%{crate}" crate.
9020f8a
9020f8a
%files       -n %{name}+default-devel
0ae1ca8
%ghost %{crate_instdir}/Cargo.toml
e82c1d1
bc44127
%package     -n %{name}+application-devel
bc44127
Summary:        %{summary}
bc44127
BuildArch:      noarch
bc44127
bc44127
%description -n %{name}+application-devel %{_description}
bc44127
0ae1ca8
This package contains library source intended for building other packages which
0ae1ca8
use the "application" feature of the "%{crate}" crate.
bc44127
bc44127
%files       -n %{name}+application-devel
0ae1ca8
%ghost %{crate_instdir}/Cargo.toml
bc44127
0ae1ca8
%package     -n %{name}+bugreport-devel
0ae1ca8
Summary:        %{summary}
0ae1ca8
BuildArch:      noarch
0ae1ca8
0ae1ca8
%description -n %{name}+bugreport-devel %{_description}
0ae1ca8
0ae1ca8
This package contains library source intended for building other packages which
0ae1ca8
use the "bugreport" feature of the "%{crate}" crate.
0ae1ca8
0ae1ca8
%files       -n %{name}+bugreport-devel
0ae1ca8
%ghost %{crate_instdir}/Cargo.toml
0ae1ca8
0ae1ca8
%package     -n %{name}+build-assets-devel
0ae1ca8
Summary:        %{summary}
0ae1ca8
BuildArch:      noarch
0ae1ca8
0ae1ca8
%description -n %{name}+build-assets-devel %{_description}
0ae1ca8
0ae1ca8
This package contains library source intended for building other packages which
0ae1ca8
use the "build-assets" feature of the "%{crate}" crate.
0ae1ca8
0ae1ca8
%files       -n %{name}+build-assets-devel
0ae1ca8
%ghost %{crate_instdir}/Cargo.toml
bc44127
bc44127
%package     -n %{name}+clap-devel
bc44127
Summary:        %{summary}
bc44127
BuildArch:      noarch
bc44127
bc44127
%description -n %{name}+clap-devel %{_description}
bc44127
0ae1ca8
This package contains library source intended for building other packages which
0ae1ca8
use the "clap" feature of the "%{crate}" crate.
bc44127
bc44127
%files       -n %{name}+clap-devel
0ae1ca8
%ghost %{crate_instdir}/Cargo.toml
bc44127
95a13e3
%package     -n %{name}+etcetera-devel
bc44127
Summary:        %{summary}
bc44127
BuildArch:      noarch
bc44127
95a13e3
%description -n %{name}+etcetera-devel %{_description}
bc44127
0ae1ca8
This package contains library source intended for building other packages which
95a13e3
use the "etcetera" feature of the "%{crate}" crate.
bc44127
95a13e3
%files       -n %{name}+etcetera-devel
0ae1ca8
%ghost %{crate_instdir}/Cargo.toml
bc44127
bc44127
%package     -n %{name}+git-devel
bc44127
Summary:        %{summary}
bc44127
BuildArch:      noarch
bc44127
bc44127
%description -n %{name}+git-devel %{_description}
bc44127
0ae1ca8
This package contains library source intended for building other packages which
0ae1ca8
use the "git" feature of the "%{crate}" crate.
bc44127
bc44127
%files       -n %{name}+git-devel
0ae1ca8
%ghost %{crate_instdir}/Cargo.toml
bc44127
bc44127
%package     -n %{name}+git2-devel
bc44127
Summary:        %{summary}
bc44127
BuildArch:      noarch
bc44127
bc44127
%description -n %{name}+git2-devel %{_description}
bc44127
0ae1ca8
This package contains library source intended for building other packages which
0ae1ca8
use the "git2" feature of the "%{crate}" crate.
bc44127
bc44127
%files       -n %{name}+git2-devel
0ae1ca8
%ghost %{crate_instdir}/Cargo.toml
bc44127
0ae1ca8
%package     -n %{name}+grep-cli-devel
bc44127
Summary:        %{summary}
bc44127
BuildArch:      noarch
bc44127
0ae1ca8
%description -n %{name}+grep-cli-devel %{_description}
0ae1ca8
0ae1ca8
This package contains library source intended for building other packages which
0ae1ca8
use the "grep-cli" feature of the "%{crate}" crate.
0ae1ca8
0ae1ca8
%files       -n %{name}+grep-cli-devel
0ae1ca8
%ghost %{crate_instdir}/Cargo.toml
0ae1ca8
95a13e3
%package     -n %{name}+lessopen-devel
95a13e3
Summary:        %{summary}
95a13e3
BuildArch:      noarch
95a13e3
95a13e3
%description -n %{name}+lessopen-devel %{_description}
95a13e3
95a13e3
This package contains library source intended for building other packages which
95a13e3
use the "lessopen" feature of the "%{crate}" crate.
95a13e3
95a13e3
%files       -n %{name}+lessopen-devel
95a13e3
%ghost %{crate_instdir}/Cargo.toml
95a13e3
0ae1ca8
%package     -n %{name}+minimal-application-devel
0ae1ca8
Summary:        %{summary}
0ae1ca8
BuildArch:      noarch
bc44127
0ae1ca8
%description -n %{name}+minimal-application-devel %{_description}
bc44127
0ae1ca8
This package contains library source intended for building other packages which
0ae1ca8
use the "minimal-application" feature of the "%{crate}" crate.
0ae1ca8
0ae1ca8
%files       -n %{name}+minimal-application-devel
0ae1ca8
%ghost %{crate_instdir}/Cargo.toml
bc44127
95a13e3
%package     -n %{name}+os_str_bytes-devel
95a13e3
Summary:        %{summary}
95a13e3
BuildArch:      noarch
95a13e3
95a13e3
%description -n %{name}+os_str_bytes-devel %{_description}
95a13e3
95a13e3
This package contains library source intended for building other packages which
95a13e3
use the "os_str_bytes" feature of the "%{crate}" crate.
95a13e3
95a13e3
%files       -n %{name}+os_str_bytes-devel
95a13e3
%ghost %{crate_instdir}/Cargo.toml
95a13e3
bc44127
%package     -n %{name}+paging-devel
bc44127
Summary:        %{summary}
bc44127
BuildArch:      noarch
bc44127
bc44127
%description -n %{name}+paging-devel %{_description}
bc44127
0ae1ca8
This package contains library source intended for building other packages which
0ae1ca8
use the "paging" feature of the "%{crate}" crate.
bc44127
bc44127
%files       -n %{name}+paging-devel
0ae1ca8
%ghost %{crate_instdir}/Cargo.toml
0ae1ca8
0ae1ca8
%package     -n %{name}+regex-devel
0ae1ca8
Summary:        %{summary}
0ae1ca8
BuildArch:      noarch
0ae1ca8
0ae1ca8
%description -n %{name}+regex-devel %{_description}
0ae1ca8
0ae1ca8
This package contains library source intended for building other packages which
0ae1ca8
use the "regex" feature of the "%{crate}" crate.
0ae1ca8
0ae1ca8
%files       -n %{name}+regex-devel
0ae1ca8
%ghost %{crate_instdir}/Cargo.toml
0ae1ca8
0ae1ca8
%package     -n %{name}+regex-fancy-devel
0ae1ca8
Summary:        %{summary}
0ae1ca8
BuildArch:      noarch
0ae1ca8
0ae1ca8
%description -n %{name}+regex-fancy-devel %{_description}
0ae1ca8
0ae1ca8
This package contains library source intended for building other packages which
0ae1ca8
use the "regex-fancy" feature of the "%{crate}" crate.
0ae1ca8
0ae1ca8
%files       -n %{name}+regex-fancy-devel
0ae1ca8
%ghost %{crate_instdir}/Cargo.toml
bc44127
bc44127
%package     -n %{name}+regex-onig-devel
bc44127
Summary:        %{summary}
bc44127
BuildArch:      noarch
bc44127
bc44127
%description -n %{name}+regex-onig-devel %{_description}
bc44127
0ae1ca8
This package contains library source intended for building other packages which
0ae1ca8
use the "regex-onig" feature of the "%{crate}" crate.
bc44127
bc44127
%files       -n %{name}+regex-onig-devel
0ae1ca8
%ghost %{crate_instdir}/Cargo.toml
bc44127
95a13e3
%package     -n %{name}+run_script-devel
95a13e3
Summary:        %{summary}
95a13e3
BuildArch:      noarch
95a13e3
95a13e3
%description -n %{name}+run_script-devel %{_description}
95a13e3
95a13e3
This package contains library source intended for building other packages which
95a13e3
use the "run_script" feature of the "%{crate}" crate.
95a13e3
95a13e3
%files       -n %{name}+run_script-devel
95a13e3
%ghost %{crate_instdir}/Cargo.toml
95a13e3
bc44127
%package     -n %{name}+shell-words-devel
bc44127
Summary:        %{summary}
bc44127
BuildArch:      noarch
bc44127
bc44127
%description -n %{name}+shell-words-devel %{_description}
bc44127
0ae1ca8
This package contains library source intended for building other packages which
0ae1ca8
use the "shell-words" feature of the "%{crate}" crate.
bc44127
bc44127
%files       -n %{name}+shell-words-devel
0ae1ca8
%ghost %{crate_instdir}/Cargo.toml
0ae1ca8
0ae1ca8
%package     -n %{name}+walkdir-devel
0ae1ca8
Summary:        %{summary}
0ae1ca8
BuildArch:      noarch
0ae1ca8
0ae1ca8
%description -n %{name}+walkdir-devel %{_description}
0ae1ca8
0ae1ca8
This package contains library source intended for building other packages which
0ae1ca8
use the "walkdir" feature of the "%{crate}" crate.
0ae1ca8
0ae1ca8
%files       -n %{name}+walkdir-devel
0ae1ca8
%ghost %{crate_instdir}/Cargo.toml
bc44127
bc44127
%package     -n %{name}+wild-devel
bc44127
Summary:        %{summary}
bc44127
BuildArch:      noarch
bc44127
bc44127
%description -n %{name}+wild-devel %{_description}
bc44127
0ae1ca8
This package contains library source intended for building other packages which
0ae1ca8
use the "wild" feature of the "%{crate}" crate.
bc44127
bc44127
%files       -n %{name}+wild-devel
0ae1ca8
%ghost %{crate_instdir}/Cargo.toml
bc44127
e82c1d1
%prep
e82c1d1
%autosetup -n %{crate}-%{version_no_tilde} -p1
e82c1d1
%cargo_prep
e82c1d1
1a340b5
%generate_buildrequires
95a13e3
%cargo_generate_buildrequires
1a340b5
e82c1d1
%build
e82c1d1
%cargo_build
95a13e3
%{cargo_license_summary}
1918166
%{cargo_license} > LICENSE.dependencies
e82c1d1
e82c1d1
%install
e82c1d1
%cargo_install
877c9e8
# install man page
19104e2
install -Dpm0644 target/release/build/%{crate}-*/out/assets/manual/bat.1 \
877c9e8
    -t %{buildroot}%{_mandir}/man1/
877c9e8
# install shell completions
19104e2
install -Dpm0644 target/release/build/%{crate}-*/out/assets/completions/bat.bash \
877c9e8
    %{buildroot}/%{bash_completions_dir}/bat.bash
19104e2
install -Dpm0644 target/release/build/%{crate}-*/out/assets/completions/bat.fish \
877c9e8
    %{buildroot}/%{fish_completions_dir}/bat.fish
877c9e8
install -Dpm0644 target/release/build/%{crate}-*/out/assets/completions/bat.zsh \
877c9e8
    %{buildroot}/%{zsh_completions_dir}/_bat
e82c1d1
e82c1d1
%if %{with check}
e82c1d1
%check
e82c1d1
%cargo_test
e82c1d1
%endif
e82c1d1
e82c1d1
%changelog
38dcc67
%autochangelog