# Generated by rust2rpm # * Tests require nightly compiler %bcond_with check %global debug_package %{nil} %global crate snowflake Name: rust-%{crate} Version: 1.3.0 Release: 1%{?dist} Summary: Module for generating guaranteed process unique IDs License: MIT or ASL 2.0 URL: https://crates.io/crates/snowflake Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate # Initial patched metadata # * Bump uuid to 0.6 and rand to 0.4, https://github.com/Stebalien/snowflake/commit/6b7d40c42d9d3048c796e679bf9f8852bef79b14 Patch0: snowflake-1.3.0-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging # [dependencies] BuildRequires: (crate(serde) >= 1.0.0 with crate(serde) < 2.0.0) BuildRequires: (crate(serde_derive) >= 1.0.0 with crate(serde_derive) < 2.0.0) %if %{with check} # [dev-dependencies] BuildRequires: (crate(rand) >= 0.4.0 with crate(rand) < 0.5.0) BuildRequires: (crate(threadpool) >= 1.0.0 with crate(threadpool) < 2.0.0) BuildRequires: (crate(time) >= 0.1.0 with crate(time) < 0.2.0) BuildRequires: ((crate(uuid) >= 0.6.0 with crate(uuid) < 0.7.0) with crate(uuid/v4)) %endif %description %{summary}. %package devel Summary: %{summary} BuildArch: noarch %description devel A module for generating guaranteed process unique IDs. 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.md %{cargo_registry}/%{crate}-%{version}/ %changelog * Fri Jul 06 2018 Igor Gnatenko - 1.3.0-1 - Initial package