diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e6e946c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/either-1.3.0.crate diff --git a/rust-either.spec b/rust-either.spec new file mode 100644 index 0000000..c2fbd1c --- /dev/null +++ b/rust-either.spec @@ -0,0 +1,75 @@ +# Generated by rust2rpm +%bcond_without check +%global debug_package %{nil} + +%global crate either + +Name: rust-%{crate} +Version: 1.3.0 +Release: 1%{?dist} +Summary: Enum `Either` is a general purpose sum type with two cases + +License: MIT or ASL 2.0 +URL: https://crates.io/crates/either +Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging +# [dependencies] +BuildRequires: ((crate(serde) >= 1.0.0 with crate(serde) < 2.0.0) with crate(serde/derive)) + +%description +%{summary}. + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel +The enum `Either` with variants `Left` and `Right` is a general purpose +sum type with two cases. + +Either has methods that are similar to Option and Result, and it also implements +traits like `Iterator`. + +Includes macros `try_left!()` and `try_right!()` to use for +short-circuiting logic, similar to how the `?` operator is used with `Result`. +Note that `Either` is general purpose. For describing success or error, use the +regular `Result`. + +This package contains library source intended for building other packages +which use %{crate} from crates.io. + +%prep +%autosetup -n %{crate}-%{version} -p1 +%cargo_prep + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%files devel +%license LICENSE-MIT LICENSE-APACHE +%doc README.rst +%{cargo_registry}/%{crate}-%{version}/ + +%changelog +* Wed Nov 08 2017 Igor Gnatenko - 1.3.0-1 +- Update to 1.3.0 + +* Wed Jun 14 2017 Igor Gnatenko - 1.1.0-2 +- Port to use rust-packaging + +* Thu Mar 30 2017 Igor Gnatenko - 1.1.0-1 +- Update to 1.1.0 + +* Sun Feb 26 2017 Igor Gnatenko - 1.0.3-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..77f682c --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (either-1.3.0.crate) = 28b14da059d81ca7a23e7e7626908493cf7ffdbd93ea21c920a346ade11a9c31aebf87c0b74271e3da52ec10c270631a8a68934eb886fcbbde8e6c937c5c3f82