From 833b67e542ffd67ec5ca9dc3df4a04e1cd62ba83 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Wed, 27 Jul 2022 14:44:08 +0200 Subject: [PATCH] Update to version 0.3.1; Fixes RHBZ#2041711 --- .gitignore | 1 + getch-fix-metadata-auto.diff | 8 ++++++++ getch-fix-metadata.diff | 10 ---------- rust-getch.spec | 33 ++++++++++++++------------------- sources | 2 +- 5 files changed, 24 insertions(+), 30 deletions(-) create mode 100644 getch-fix-metadata-auto.diff delete mode 100644 getch-fix-metadata.diff diff --git a/.gitignore b/.gitignore index 1a5e4b3..5799897 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /getch-0.2.1.crate +/getch-0.3.1.crate diff --git a/getch-fix-metadata-auto.diff b/getch-fix-metadata-auto.diff new file mode 100644 index 0000000..47cb3a3 --- /dev/null +++ b/getch-fix-metadata-auto.diff @@ -0,0 +1,8 @@ +--- getch-0.3.1/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ getch-0.3.1/Cargo.toml 1970-01-01T00:00:01+00:00 +@@ -21,5 +21,3 @@ + repository = "https://nest.pijul.com/pmeunier/getch" + [target."cfg(unix)".dependencies.termios] + version = "0.3.3" +-[target."cfg(windows)".dependencies.libc] +-version = "0.2" diff --git a/getch-fix-metadata.diff b/getch-fix-metadata.diff deleted file mode 100644 index 226f28b..0000000 --- a/getch-fix-metadata.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- 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 index 1b01bfe..32d354b 100644 --- a/rust-getch.spec +++ b/rust-getch.spec @@ -1,29 +1,24 @@ -# Generated by rust2rpm 13 +# Generated by rust2rpm 22 %bcond_without check %global debug_package %{nil} %global crate getch -Name: rust-%{crate} -Version: 0.2.1 +Name: rust-getch +Version: 0.3.1 Release: %autorelease -Summary: Portable implementation of getch, using _getch on Windows, and termios on Unix +Summary: Portable implementation of getch -# Upstream license specification: Apache-2.0 # https://nest.pijul.com/pijul_org/getch/discussions/4 -License: ASL 2.0 +License: Apache-2.0 URL: https://crates.io/crates/getch Source: %{crates_source} -# Initial patched metadata -# * Update termios to 0.3 -Patch0: getch-fix-metadata.diff +# Automatically generated patch to strip foreign dependencies +Patch: getch-fix-metadata-auto.diff ExclusiveArch: %{rust_arches} -%if %{__cargo_skip_build} -BuildArch: noarch -%endif -BuildRequires: rust-packaging +BuildRequires: rust-packaging >= 21 %global _description %{expand: Portable implementation of getch, using _getch on Windows, and termios on Unix.} @@ -36,11 +31,11 @@ BuildArch: noarch %description devel %{_description} -This package contains library source intended for building other packages -which use "%{crate}" crate. +This package contains library source intended for building other packages which +use the "%{crate}" crate. %files devel -%{cargo_registry}/%{crate}-%{version_no_tilde}/ +%{crate_instdir}/ %package -n %{name}+default-devel Summary: %{summary} @@ -48,11 +43,11 @@ 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. +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 %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 diff --git a/sources b/sources index 3e1f6e3..f6c4b87 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (getch-0.2.1.crate) = 2b9b390ffec230dde7d73af1dcddca525e3800024c7142b1a8cef4a3dfd840fac5752ac821e497aac0f13c2b99692242810eff45f66a7b7c1d3eb99dbda50bc6 +SHA512 (getch-0.3.1.crate) = f3bd91d55b64c985c9425301e5bf20e8d80ee285b8da82675ed761a9502f7f9fd5282d50bf172b3598d89124b47516a397ace517de2ea8947fc6fb8b4fa42b27