From a1824ca2fc50e69c52dccd4e5478f23fa574b12f Mon Sep 17 00:00:00 2001 From: Igor Raits Date: Tue, 18 Feb 2020 11:59:55 +0100 Subject: [PATCH] Initial import Signed-off-by: Igor Raits --- .gitignore | 1 + getch-fix-metadata.diff | 10 ++++++ rust-getch.spec | 77 +++++++++++++++++++++++++++++++++++++++++ sources | 1 + 4 files changed, 89 insertions(+) create mode 100644 .gitignore create mode 100644 getch-fix-metadata.diff create mode 100644 rust-getch.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1a5e4b3 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/getch-0.2.1.crate diff --git a/getch-fix-metadata.diff b/getch-fix-metadata.diff new file mode 100644 index 0000000..226f28b --- /dev/null +++ b/getch-fix-metadata.diff @@ -0,0 +1,10 @@ +--- getch-0.2.1/Cargo.toml 1970-01-01T00:00:00+00:00 ++++ getch-0.2.1/Cargo.toml 2020-02-14T09:44:31.273575+00:00 +@@ -21,6 +21,4 @@ + license = "Apache-2.0" + repository = "https://nest.pijul.com/pijul_org/getch" + [target."cfg(unix)".dependencies.termios] +-version = "0.2" +-[target."cfg(windows)".dependencies.libc] +-version = "0.2" ++version = "0.3" diff --git a/rust-getch.spec b/rust-getch.spec new file mode 100644 index 0000000..42b8982 --- /dev/null +++ b/rust-getch.spec @@ -0,0 +1,77 @@ +# Generated by rust2rpm 13 +%bcond_without check +%global debug_package %{nil} + +%global crate getch + +Name: rust-%{crate} +Version: 0.2.1 +Release: 1%{?dist} +Summary: Portable implementation of getch, using _getch on Windows, and termios on Unix + +# Upstream license specification: Apache-2.0 +# https://nest.pijul.com/pijul_org/getch/discussions/4 +License: ASL 2.0 +URL: https://crates.io/crates/getch +Source: %{crates_source} +# Initial patched metadata +# * Update termios to 0.3 +Patch0: getch-fix-metadata.diff + +ExclusiveArch: %{rust_arches} +%if %{__cargo_skip_build} +BuildArch: noarch +%endif + +BuildRequires: rust-packaging + +%global _description %{expand: +Portable implementation of getch, using _getch on Windows, and termios on Unix.} + +%description %{_description} + +%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 +%{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 + +%prep +%autosetup -n %{crate}-%{version_no_tilde} -p1 +%cargo_prep + +%generate_buildrequires +%cargo_generate_buildrequires + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +* Fri Feb 14 10:44:31 CET 2020 Igor Raits - 0.2.1-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..3e1f6e3 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (getch-0.2.1.crate) = 2b9b390ffec230dde7d73af1dcddca525e3800024c7142b1a8cef4a3dfd840fac5752ac821e497aac0f13c2b99692242810eff45f66a7b7c1d3eb99dbda50bc6