From e31a50054abde46435296b82ac46d83aeda8b674 Mon Sep 17 00:00:00 2001 From: Davide Cavalca Date: Fri, 28 Jan 2022 06:47:50 -0800 Subject: [PATCH] Initial import; Fixes: RHBZ#1987158 --- .gitignore | 2 + rust-termbg.spec | 83 ++++++++++++++++++++++++++++++++++++++++ sources | 1 + termbg-fix-metadata.diff | 9 +++++ 4 files changed, 95 insertions(+) create mode 100644 .gitignore create mode 100644 rust-termbg.spec create mode 100644 sources create mode 100644 termbg-fix-metadata.diff diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..66f63dd --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/termbg-0.3.0.crate +/termbg-0.4.0.crate diff --git a/rust-termbg.spec b/rust-termbg.spec new file mode 100644 index 0000000..8d60bed --- /dev/null +++ b/rust-termbg.spec @@ -0,0 +1,83 @@ +# Generated by rust2rpm 20 +%bcond_without check + +%global crate termbg + +Name: rust-%{crate} +Version: 0.4.0 +Release: %autorelease +Summary: Terminal background color detection + +# Upstream license specification: MIT OR Apache-2.0 +License: MIT or ASL 2.0 +URL: https://crates.io/crates/termbg +Source: %{crates_source} +# Initial patched metadata +# * Drop Windows dependencies +Patch0: termbg-fix-metadata.diff + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging + +%global _description %{expand: +Terminal background color detection.} + +%description %{_description} + +%package -n %{crate} +Summary: %{summary} + +%description -n %{crate} %{_description} + +%files -n %{crate} +%license LICENSE-APACHE LICENSE-MIT +%doc CHANGELOG.md README.md +%{_bindir}/termbg + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel %{_description} + +This package contains library source intended for building other packages which +use the "%{crate}" crate. + +%files devel +%license LICENSE-APACHE LICENSE-MIT +%doc CHANGELOG.md README.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 the "default" feature of the "%{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 +%autochangelog diff --git a/sources b/sources new file mode 100644 index 0000000..efb3260 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (termbg-0.4.0.crate) = 814acdbde464de951c3b80a1b076876216ed8532fb930ecd27e937aa926dde7c709fa21c54adaf346fb4c7a8522eaa1cdb12ed13df34d689cc9c7bdb73736761 diff --git a/termbg-fix-metadata.diff b/termbg-fix-metadata.diff new file mode 100644 index 0000000..ee1bd8e --- /dev/null +++ b/termbg-fix-metadata.diff @@ -0,0 +1,9 @@ +--- termbg-0.4.0/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ termbg-0.4.0/Cargo.toml 2022-01-28T14:48:24.927191+00:00 +@@ -54,6 +54,3 @@ + + [dependencies.thiserror] + version = "1" +-[target."cfg(target_os = \"windows\")".dependencies.winapi] +-version = "0.3" +-features = ["wincon", "winbase", "processenv", "impl-default"]