diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..38c5806 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/async-channel-1.6.1.crate diff --git a/async-channel-fix-metadata.patch b/async-channel-fix-metadata.patch new file mode 100644 index 0000000..9fa6933 --- /dev/null +++ b/async-channel-fix-metadata.patch @@ -0,0 +1,12 @@ +diff -Naur a/Cargo.toml b/Cargo.toml +--- a/Cargo.toml 1969-12-31 16:00:00.000000000 -0800 ++++ b/Cargo.toml 2021-05-06 14:39:01.647519493 -0700 +@@ -30,8 +30,6 @@ + + [dependencies.futures-core] + version = "0.3.5" +-[dev-dependencies.blocking] +-version = "1" + + [dev-dependencies.easy-parallel] + version = "3.1.0" diff --git a/rust-async-channel.spec b/rust-async-channel.spec new file mode 100644 index 0000000..ccde98c --- /dev/null +++ b/rust-async-channel.spec @@ -0,0 +1,77 @@ +# Generated by rust2rpm 16 +%bcond_without check +%global debug_package %{nil} + +%global crate async-channel + +Name: rust-%{crate} +Version: 1.6.1 +Release: 1%{?dist} +Summary: Async multi-producer multi-consumer channel + +# Upstream license specification: Apache-2.0 OR MIT +License: ASL 2.0 or MIT +URL: https://crates.io/crates/async-channel +Source: %{crates_source} +# Break circular dependency with blocking +Patch0: async-channel-fix-metadata.patch + +ExclusiveArch: %{rust_arches} +%if %{__cargo_skip_build} +BuildArch: noarch +%endif + +BuildRequires: rust-packaging + +%global _description %{expand: +Async multi-producer multi-consumer channel.} + +%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 +%license LICENSE +%doc 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 "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 +* Thu May 06 13:24:45 PDT 2021 Davide Cavalca - 1.6.1-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..2e56247 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (async-channel-1.6.1.crate) = 797b1f5b4c07853f78670e62b67fb787c329ffa2c89475a3767a963d524a69dce082cc7f3a2878d9c990f00ae2d9cd7e0d21743fc4186769c238467bdb20c65e