rust-bat/rust-bat.spec

243 lines
6.6 KiB
RPMSpec
Raw Normal View History

2021-11-14 19:25:06 +00:00
# Generated by rust2rpm 18
%bcond_without check
%global crate bat
Name: rust-%{crate}
2021-11-14 19:25:06 +00:00
Version: 0.18.3
2021-11-14 16:25:25 +00:00
Release: %autorelease
2021-11-14 19:25:06 +00:00
Summary: Cat(1) clone with wings
# Upstream license specification: MIT/Apache-2.0
License: MIT or ASL 2.0
URL: https://crates.io/crates/bat
Source: %{crates_source}
# Initial patched metadata
# * Switch to path-absolutize, https://github.com/sharkdp/bat/pull/1025
2021-11-14 19:25:06 +00:00
# * Bump assert_cmd to 2.0.0
# * Bump nix to 0.22.0
Patch0: bat-fix-metadata.diff
2021-11-14 19:25:06 +00:00
Patch0001: 0001-Switch-to-path-absolutize.patch
ExclusiveArch: %{rust_arches}
%if %{__cargo_skip_build}
BuildArch: noarch
%endif
BuildRequires: rust-packaging
%global _description %{expand:
Cat(1) clone with wings.}
%description %{_description}
%if ! %{__cargo_skip_build}
%package -n %{crate}
Summary: %{summary}
2020-10-27 13:03:24 +00:00
# 0BSD or MIT or ASL 2.0
# ASL 2.0
# ASL 2.0 or Boost
# BSD
# CC0
# LGPLv3+
# MIT
# MIT or ASL 2.0
2020-12-12 23:51:37 +00:00
# MIT or ASL 2.0 or zlib
# Unlicense or MIT
2020-12-12 23:51:37 +00:00
License: ASL 2.0 and BSD and CC0 and LGPLv3+ and MIT
2019-06-01 00:21:49 +00:00
%description -n %{crate} %{_description}
%files -n %{crate}
%license LICENSE-MIT LICENSE-APACHE
2021-11-14 19:25:06 +00:00
%doc doc README.md CONTRIBUTING.md CHANGELOG.md
%{_bindir}/bat
%{_mandir}/man1/bat.1*
%dir %{_datadir}/fish
%dir %{_datadir}/fish/vendor_completions.d
%{_datadir}/fish/vendor_completions.d/bat.fish
%endif
%package devel
Summary: %{summary}
BuildArch: noarch
%description devel %{_description}
This package contains library source intended for building other packages
which use "%{crate}" crate.
%files devel
%license LICENSE-MIT LICENSE-APACHE
2021-11-14 19:25:06 +00:00
%doc doc README.md CONTRIBUTING.md CHANGELOG.md
%{cargo_registry}/%{crate}-%{version_no_tilde}/
%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 "default" feature of "%{crate}" crate.
%files -n %{name}+default-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
2020-04-23 01:14:52 +00:00
%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 "application" feature of "%{crate}" crate.
%files -n %{name}+application-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/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 "atty" feature of "%{crate}" crate.
%files -n %{name}+atty-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/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 "clap" feature of "%{crate}" crate.
%files -n %{name}+clap-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
2021-11-14 19:25:06 +00:00
%package -n %{name}+dirs-next-devel
2020-04-23 01:14:52 +00:00
Summary: %{summary}
BuildArch: noarch
2021-11-14 19:25:06 +00:00
%description -n %{name}+dirs-next-devel %{_description}
2020-04-23 01:14:52 +00:00
This package contains library source intended for building other packages
2021-11-14 19:25:06 +00:00
which use "dirs-next" feature of "%{crate}" crate.
2020-04-23 01:14:52 +00:00
2021-11-14 19:25:06 +00:00
%files -n %{name}+dirs-next-devel
2020-04-23 01:14:52 +00:00
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/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 "git" feature of "%{crate}" crate.
%files -n %{name}+git-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/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 "git2" feature of "%{crate}" crate.
%files -n %{name}+git2-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%package -n %{name}+lazy_static-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+lazy_static-devel %{_description}
This package contains library source intended for building other packages
which use "lazy_static" feature of "%{crate}" crate.
%files -n %{name}+lazy_static-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/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 "paging" feature of "%{crate}" crate.
%files -n %{name}+paging-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/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 "regex-onig" feature of "%{crate}" crate.
%files -n %{name}+regex-onig-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/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 "shell-words" feature of "%{crate}" crate.
%files -n %{name}+shell-words-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/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 "wild" feature of "%{crate}" crate.
%files -n %{name}+wild-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires
%build
%cargo_build
%install
%cargo_install
install -Dpm0644 -t %{buildroot}%{_mandir}/man1 \
target/release/build/%{crate}-*/out/assets/manual/bat.1
install -Dpm0644 -t %{buildroot}%{_datadir}/fish/vendor_completions.d \
target/release/build/%{crate}-*/out/assets/completions/bat.fish
%if %{with check}
%check
%cargo_test
%endif
%changelog
2021-11-14 16:25:25 +00:00
%autochangelog