diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..50d4b30 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/bat-0.6.1.crate diff --git a/rust-bat.spec b/rust-bat.spec new file mode 100644 index 0000000..875609a --- /dev/null +++ b/rust-bat.spec @@ -0,0 +1,67 @@ +# Generated by rust2rpm +%bcond_without check + +%global crate bat + +Name: rust-%{crate} +Version: 0.6.1 +Release: 1%{?dist} +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 +Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging +# [dependencies] +BuildRequires: (crate(ansi_term) >= 0.11.0 with crate(ansi_term) < 0.12.0) +BuildRequires: (crate(atty) >= 0.2.2 with crate(atty) < 0.3.0) +BuildRequires: ((crate(clap) >= 2.32.0 with crate(clap) < 3.0.0) with crate(clap/suggestions) with crate(clap/color) with crate(clap/wrap_help)) +BuildRequires: (crate(console) >= 0.6.0 with crate(console) < 0.7.0) +BuildRequires: (crate(directories) >= 1.0.0 with crate(directories) < 2.0.0) +BuildRequires: (crate(error-chain) >= 0.12.0 with crate(error-chain) < 0.13.0) +BuildRequires: (crate(git2) >= 0.7.0 with crate(git2) < 0.8.0) +BuildRequires: (crate(lazy_static) >= 1.0.0 with crate(lazy_static) < 2.0.0) +BuildRequires: ((crate(syntect) >= 2.1.0 with crate(syntect) < 3.0.0) with crate(syntect/parsing) with crate(syntect/yaml-load) with crate(syntect/dump-load) with crate(syntect/dump-create)) +%if %{with check} +# [dev-dependencies] +BuildRequires: (crate(tempdir) >= 0.3.0 with crate(tempdir) < 0.4.0) +%endif + +%description +%{summary}. + +%package -n %{crate} +Summary: %{summary} + +%description -n %{crate} +%{summary}. + +%prep +%autosetup -n %{crate}-%{version} -p1 +%cargo_prep + +%build +%cargo_build + +%install +%cargo_install +%{__install} -Dpm0644 -t %{buildroot}%{_mandir}/man1 doc/bat.1 + +%if %{with check} +%check +%cargo_test +%endif + +%files -n %{crate} +%license LICENSE-MIT LICENSE-APACHE +%doc README.md +%{_bindir}/bat +%{_mandir}/man1/bat.1* + +%changelog +* Mon Sep 03 2018 Igor Gnatenko - 0.6.1-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..79eb02f --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (bat-0.6.1.crate) = 59d8fd68d8194c23601a369126dd3babef99b143d18afa9f04d26f070e04ad3ec543e08392e1234df0921be22cdb09ce1f34328185aaf07d9ed50143f85cca0f