From 03715b4b2d595d5303fb37b6f30f964e43f13577 Mon Sep 17 00:00:00 2001 From: blinxen Date: Mon, 5 Jun 2023 00:53:36 +0200 Subject: [PATCH] Initial package --- .gitignore | 1 + io-close-fix-metadata-auto.diff | 9 ++++ rust-io-close.spec | 85 +++++++++++++++++++++++++++++++++ sources | 1 + 4 files changed, 96 insertions(+) create mode 100644 .gitignore create mode 100644 io-close-fix-metadata-auto.diff create mode 100644 rust-io-close.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ef158f8 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/io-close-0.3.7.crate diff --git a/io-close-fix-metadata-auto.diff b/io-close-fix-metadata-auto.diff new file mode 100644 index 0000000..7d2a37c --- /dev/null +++ b/io-close-fix-metadata-auto.diff @@ -0,0 +1,9 @@ +--- io-close-0.3.7/Cargo.toml 1970-01-01T00:00:00+00:00 ++++ io-close-0.3.7/Cargo.toml 2023-05-28T21:20:16.344283+00:00 +@@ -28,6 +28,3 @@ + version = "3.1.0" + [target."cfg(unix)".dependencies.libc] + version = "0.2.80" +-[target."cfg(windows)".dependencies.winapi] +-version = "0.3.9" +-features = ["handleapi", "std", "winsock2"] diff --git a/rust-io-close.spec b/rust-io-close.spec new file mode 100644 index 0000000..00c8ca9 --- /dev/null +++ b/rust-io-close.spec @@ -0,0 +1,85 @@ +# Generated by rust2rpm 24 +%bcond_without check +%global debug_package %{nil} + +%global crate io-close + +Name: rust-io-close +Version: 0.3.7 +Release: %autorelease +Summary: Extension trait for safely dropping I/O writers such as File and BufWriter + +License: MIT OR Apache-2.0 +URL: https://crates.io/crates/io-close +Source: %{crates_source} +# Automatically generated patch to strip foreign dependencies +Patch: io-close-fix-metadata-auto.diff + +BuildRequires: rust-packaging >= 21 + +%global _description %{expand: +An extension trait for safely dropping I/O writers such as File and +BufWriter.} + +%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 +%license %{crate_instdir}/LICENSE-APACHE +%license %{crate_instdir}/LICENSE-MIT +%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}+os_pipe-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+os_pipe-devel %{_description} + +This package contains library source intended for building other packages which +use the "os_pipe" feature of the "%{crate}" crate. + +%files -n %{name}+os_pipe-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..f120a62 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (io-close-0.3.7.crate) = 0cc06245da4ad9f8708ab03619734dda41d1cbb2777a7944df10e2efb0ed0a6d34aab3ee55210b05eb4507c802d01a301b6718ddd6cb8e2b4abdd2e1be11303b