# Generated by rust2rpm %bcond_without check %global debug_package %{nil} %global crate newtype_derive Name: rust-%{crate} Version: 0.1.6 Release: 1%{?dist} Summary: Macros for deriving common traits for newtype structures # https://github.com/DanielKeep/rust-custom-derive/issues/36 License: MIT or ASL 2.0 URL: https://crates.io/crates/newtype_derive Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate # Initial patched metadata # * Bump rustc_version to 0.2, https://github.com/DanielKeep/rust-custom-derive/pull/37 Patch0: newtype_derive-0.1.6-fix-metadata.diff # Make it work with rustc_version v0.2 Patch1: 0001-bump-rustc_version-to-0.2.patch ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging # [build-dependencies] BuildRequires: (crate(rustc_version) >= 0.2.0 with crate(rustc_version) < 0.3.0) %if %{with check} # [dev-dependencies] BuildRequires: (crate(custom_derive) >= 0.1.1 with crate(custom_derive) < 0.2.0) %endif %description %{summary}. %package devel Summary: %{summary} BuildArch: noarch %description devel This crate provides macros for deriving common traits for newtype structures. This package contains library source intended for building other packages which use %{crate} from crates.io. %prep %autosetup -n %{crate}-%{version} -N # https://github.com/DanielKeep/rust-custom-derive/issues/35 grep -IUlr $'\r' | xargs sed -i 's/\r$//' %patch0 -p1 %patch1 -p2 %cargo_prep %build %cargo_build %install %cargo_install %if %{with check} %check %cargo_test %endif %files devel %{cargo_registry}/%{crate}-%{version}/ %changelog * Tue Dec 05 2017 Igor Gnatenko - 0.1.6-1 - Initial package