# Generated by rust2rpm %bcond_without check %global debug_package %{nil} %global crate cast Name: rust-%{crate} Version: 0.2.2 Release: 1%{?dist} Summary: Ergonomic, checked cast functions for primitive types # Upstream license specification: MIT OR Apache-2.0 License: MIT or ASL 2.0 URL: https://crates.io/crates/cast Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate # Initial patched metadata # * Bump quickcheck to 0.7, https://github.com/japaric/cast.rs/pull/17 # * Remove CI files, https://github.com/japaric/cast.rs/pull/18 Patch0: cast-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging %if %{with check} # [dev-dependencies] BuildRequires: (crate(quickcheck) >= 0.7.0 with crate(quickcheck) < 0.8.0) %endif %description %{summary}. %package devel Summary: %{summary} BuildArch: noarch %description devel Ergonomic, checked cast functions for primitive types. This package contains library source intended for building other packages which use %{crate} from crates.io. %prep %autosetup -n %{crate}-%{version} -p1 # https://github.com/japaric/cast.rs/pull/19 sed -i -e '/#!\[deny(warnings)\]/d' src/lib.rs %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 CHANGELOG.md %{cargo_registry}/%{crate}-%{version}/ %changelog * Tue Sep 11 2018 Igor Gnatenko - 0.2.2-1 - Initial package