From 1c7242fc5c6507f926447ca2ff47cbab96843efa Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Wed, 22 Feb 2023 12:44:48 +0100 Subject: [PATCH] Initial import (errno 0.2 compat package) --- .gitignore | 1 + README.md | 3 -- errno-fix-metadata-auto.diff | 17 ++++++++ rust-errno0.2.spec | 85 ++++++++++++++++++++++++++++++++++++ sources | 1 + 5 files changed, 104 insertions(+), 3 deletions(-) create mode 100644 .gitignore delete mode 100644 README.md create mode 100644 errno-fix-metadata-auto.diff create mode 100644 rust-errno0.2.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..75afa44 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/errno-0.2.8.crate diff --git a/README.md b/README.md deleted file mode 100644 index 8f2e17d..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# rust-errno0.2 - -The rust-errno0.2 package diff --git a/errno-fix-metadata-auto.diff b/errno-fix-metadata-auto.diff new file mode 100644 index 0000000..dcd98a7 --- /dev/null +++ b/errno-fix-metadata-auto.diff @@ -0,0 +1,17 @@ +--- errno-0.2.8/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ errno-0.2.8/Cargo.toml 2023-02-16T15:04:57.540417+00:00 +@@ -22,14 +22,5 @@ + [features] + default = ["std"] + std = [] +-[target."cfg(target_os=\"dragonfly\")".dependencies.errno-dragonfly] +-version = "0.1.1" +-[target."cfg(target_os=\"hermit\")".dependencies.libc] +-version = "0.2" +-[target."cfg(target_os=\"wasi\")".dependencies.libc] +-version = "0.2" + [target."cfg(unix)".dependencies.libc] + version = "0.2" +-[target."cfg(windows)".dependencies.winapi] +-version = "0.3" +-features = ["errhandlingapi", "minwindef", "ntdef", "winbase"] diff --git a/rust-errno0.2.spec b/rust-errno0.2.spec new file mode 100644 index 0000000..21cc709 --- /dev/null +++ b/rust-errno0.2.spec @@ -0,0 +1,85 @@ +# Generated by rust2rpm 24 +%bcond_without check +%global debug_package %{nil} + +%global crate errno + +Name: rust-errno0.2 +Version: 0.2.8 +Release: %autorelease +Summary: Cross-platform interface to the errno variable + +# Upstream license specification: MIT/Apache-2.0 +License: MIT OR Apache-2.0 +URL: https://crates.io/crates/errno +Source: %{crates_source} +# Automatically generated patch to strip foreign dependencies +Patch: errno-fix-metadata-auto.diff + +BuildRequires: rust-packaging >= 21 + +%global _description %{expand: +Cross-platform interface to the `errno` variable.} + +%description %{_description} + +%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 %{crate_instdir}/LICENSE-APACHE +%license %{crate_instdir}/LICENSE-MIT +%doc %{crate_instdir}/CHANGELOG.md +%doc %{crate_instdir}/README.md +%{crate_instdir}/ + +%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 %{crate_instdir}/Cargo.toml + +%package -n %{name}+std-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+std-devel %{_description} + +This package contains library source intended for building other packages which +use the "std" feature of the "%{crate}" crate. + +%files -n %{name}+std-devel +%ghost %{crate_instdir}/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..0c15af0 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (errno-0.2.8.crate) = 1f513743224cd9a9b7e4caaf33dab075a4a79efa90c9f46c9edfb0c8600daccd3ad2677ba2116621e19fcf8be456954da5d611cbcea4b6f1410f7731828b50d1