# Generated by rust2rpm 24 %bcond_without check %global crate bat Name: rust-bat Version: 0.23.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 Patch: bat-fix-metadata.diff Patch: 0001-port-from-path_abs-to-path-absolutize.patch BuildRequires: rust-packaging >= 23 %global _description %{expand: A cat(1) clone with wings.} %description %{_description} %package -n %{crate} Summary: %{summary} # (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 # CC0-1.0 # LGPL-3.0-or-later # MIT # MIT OR Apache-2.0 # MIT OR Apache-2.0 OR Zlib # MIT OR Zlib OR Apache-2.0 # MPL-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 MPL-2.0 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} %files -n %{crate} %license LICENSE-APACHE %license LICENSE-MIT %license NOTICE %license LICENSE.dependencies %doc CHANGELOG.md %doc CONTRIBUTING.md %doc README.md %{_bindir}/bat %{_mandir}/man1/bat.1* %{bash_completions_dir}/bat.bash %{fish_completions_dir}/bat.fish %{zsh_completions_dir}/_bat %package devel Summary: %{summary} BuildArch: noarch %description devel %{_description} This package contains library source intended for building other packages which use the "%{crate}" crate. %files devel %license %{crate_instdir}/LICENSE-APACHE %license %{crate_instdir}/LICENSE-MIT %license %{crate_instdir}/NOTICE %doc %{crate_instdir}/CHANGELOG.md %doc %{crate_instdir}/CONTRIBUTING.md %doc %{crate_instdir}/README.md %{crate_instdir}/ %package -n %{name}+default-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+default-devel %{_description} This package contains library source intended for building other packages which use the "default" feature of the "%{crate}" crate. %files -n %{name}+default-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+application-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+application-devel %{_description} This package contains library source intended for building other packages which 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 %description -n %{name}+bugreport-devel %{_description} This package contains library source intended for building other packages which use the "bugreport" feature of the "%{crate}" crate. %files -n %{name}+bugreport-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+build-assets-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+build-assets-devel %{_description} This package contains library source intended for building other packages which use the "build-assets" feature of the "%{crate}" crate. %files -n %{name}+build-assets-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+clap-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+clap-devel %{_description} This package contains library source intended for building other packages which use the "clap" feature of the "%{crate}" crate. %files -n %{name}+clap-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+dirs-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+dirs-devel %{_description} This package contains library source intended for building other packages which use the "dirs" feature of the "%{crate}" crate. %files -n %{name}+dirs-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+git-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+git-devel %{_description} This package contains library source intended for building other packages which use the "git" feature of the "%{crate}" crate. %files -n %{name}+git-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+git2-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+git2-devel %{_description} This package contains library source intended for building other packages which use the "git2" feature of the "%{crate}" crate. %files -n %{name}+git2-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+grep-cli-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+grep-cli-devel %{_description} This package contains library source intended for building other packages which use the "grep-cli" feature of the "%{crate}" crate. %files -n %{name}+grep-cli-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+minimal-application-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+minimal-application-devel %{_description} This package contains library source intended for building other packages which use the "minimal-application" feature of the "%{crate}" crate. %files -n %{name}+minimal-application-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+paging-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+paging-devel %{_description} This package contains library source intended for building other packages which use the "paging" feature of the "%{crate}" crate. %files -n %{name}+paging-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+regex-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+regex-devel %{_description} This package contains library source intended for building other packages which use the "regex" feature of the "%{crate}" crate. %files -n %{name}+regex-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+regex-fancy-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+regex-fancy-devel %{_description} This package contains library source intended for building other packages which use the "regex-fancy" feature of the "%{crate}" crate. %files -n %{name}+regex-fancy-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+regex-onig-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+regex-onig-devel %{_description} This package contains library source intended for building other packages which use the "regex-onig" feature of the "%{crate}" crate. %files -n %{name}+regex-onig-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+shell-words-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+shell-words-devel %{_description} This package contains library source intended for building other packages which use the "shell-words" feature of the "%{crate}" crate. %files -n %{name}+shell-words-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+walkdir-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+walkdir-devel %{_description} This package contains library source intended for building other packages which use the "walkdir" feature of the "%{crate}" crate. %files -n %{name}+walkdir-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+wild-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+wild-devel %{_description} This package contains library source intended for building other packages which use the "wild" feature of the "%{crate}" crate. %files -n %{name}+wild-devel %ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 %cargo_prep %generate_buildrequires %cargo_generate_buildrequires -a %build %cargo_build %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}/%{bash_completions_dir}/bat.bash install -Dpm0644 target/release/build/%{crate}-*/out/assets/completions/bat.fish \ %{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 %cargo_test %endif %changelog %autochangelog