From d5631bd5cfbf2e21afe27f2cadf14262907ce253 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 3 Sep 2018 20:09:21 +0200 Subject: [PATCH] initial import Signed-off-by: Igor Gnatenko --- .gitignore | 1 + console-fix-metadata.diff | 25 ++++++++++++++ rust-console.spec | 68 +++++++++++++++++++++++++++++++++++++++ sources | 1 + 4 files changed, 95 insertions(+) create mode 100644 .gitignore create mode 100644 console-fix-metadata.diff create mode 100644 rust-console.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0438c64 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/console-0.6.1.crate diff --git a/console-fix-metadata.diff b/console-fix-metadata.diff new file mode 100644 index 0000000..5ce7f4c --- /dev/null +++ b/console-fix-metadata.diff @@ -0,0 +1,25 @@ +--- console-0.6.1/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ console-0.6.1/Cargo.toml 2018-09-03T09:35:42.329911+02:00 +@@ -24,7 +24,7 @@ + version = "0.2.0" + + [dependencies.lazy_static] +-version = "0.2" ++version = "1" + + [dependencies.libc] + version = "0" +@@ -33,12 +33,9 @@ + version = "0" + + [dependencies.regex] +-version = "0.2" ++version = "1" + + [dependencies.unicode-width] + version = "0.1" + [target."cfg(unix)".dependencies.termios] +-version = "0.2" +-[target."cfg(windows)".dependencies.winapi] + version = "0.3" +-features = ["winbase", "winuser", "consoleapi", "processenv", "wincon"] diff --git a/rust-console.spec b/rust-console.spec new file mode 100644 index 0000000..3b60a47 --- /dev/null +++ b/rust-console.spec @@ -0,0 +1,68 @@ +# Generated by rust2rpm +%bcond_without check +%global debug_package %{nil} + +%global crate console + +Name: rust-%{crate} +Version: 0.6.1 +Release: 1%{?dist} +Summary: Terminal and console abstraction for Rust + +License: MIT +URL: https://crates.io/crates/console +Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate +# Initial patched metadata +# * Bump lazy_static to 1 and regex to 1 and termios to 0.3, https://github.com/mitsuhiko/console/pull/6 +# * No Windows +Patch0: console-fix-metadata.diff + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging +# [dependencies] +BuildRequires: (crate(clicolors-control) >= 0.2.0 with crate(clicolors-control) < 0.3.0) +BuildRequires: (crate(lazy_static) >= 1.0.0 with crate(lazy_static) < 2.0.0) +BuildRequires: (crate(libc) >= 0.0.0 with crate(libc) < 1.0.0) +BuildRequires: (crate(parking_lot) >= 0.0.0 with crate(parking_lot) < 1.0.0) +BuildRequires: (crate(regex) >= 1.0.0 with crate(regex) < 2.0.0) +BuildRequires: (crate(termios) >= 0.3.0 with crate(termios) < 0.4.0) +BuildRequires: (crate(unicode-width) >= 0.1.0 with crate(unicode-width) < 0.2.0) + +%description +%{summary}. + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel +A terminal and console abstraction for Rust. + +This package contains library source intended for building other packages +which use %{crate} from crates.io. + +%prep +%autosetup -n %{crate}-%{version} -p1 +%cargo_prep + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%files devel +%license LICENSE +%doc README.md +%{cargo_registry}/%{crate}-%{version}/ +%exclude %{cargo_registry}/%{crate}-%{version}/appveyor.yml + +%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..92000f0 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (console-0.6.1.crate) = 92d567cfee16d581fce21f3170f778fb85caaea35e8d28232158f0f8f470cac25ce39eb2920e3906d2fb3c80b1f1f90493c8d571abfabba046d0e7061af3ba34