From b77f83fae2fdfa5b3b78b6146dda7b715460f6b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Thu, 27 Aug 2020 18:08:37 +0400 Subject: [PATCH] Initial package, rhbz#1862945 --- .gitignore | 1 + rust-fastrand.spec | 75 ++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 77 insertions(+) create mode 100644 .gitignore create mode 100644 rust-fastrand.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1a5bfeb --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/fastrand-1.3.4.crate diff --git a/rust-fastrand.spec b/rust-fastrand.spec new file mode 100644 index 0000000..3127066 --- /dev/null +++ b/rust-fastrand.spec @@ -0,0 +1,75 @@ +# Generated by rust2rpm 15 +%bcond_without check +%global debug_package %{nil} + +%global crate fastrand + +Name: rust-%{crate} +Version: 1.3.4 +Release: 1%{?dist} +Summary: Simple random number generator + +# Upstream license specification: Apache-2.0 OR MIT +License: ASL 2.0 or MIT +URL: https://crates.io/crates/fastrand +Source: %{crates_source} + +ExclusiveArch: %{rust_arches} +%if %{__cargo_skip_build} +BuildArch: noarch +%endif + +BuildRequires: rust-packaging + +%global _description %{expand: +Simple random number generator.} + +%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 +%doc README.md +%license LICENSE-APACHE LICENSE-MIT +%{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 +* Mon Aug 03 02:00:40 +04 2020 Marc-André Lureau - 1.3.4-1 +- Initial package, rhbz#1862945 diff --git a/sources b/sources new file mode 100644 index 0000000..f2889c0 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (fastrand-1.3.4.crate) = d5cff914667e6597e4232f3744456d9c9c758e038ec6810a3a235c92889a27be5eb2171bec2e8b7b5b3e4fa59a5767d78ecb2f9b4c6e2529b88f45e2b5768018