Blob Blame History Raw
# Generated by rust2rpm
%bcond_without check
%global debug_package %{nil}

%global crate cssparser-macros

Name:           rust-%{crate}
Version:        0.3.0
Release:        3%{?dist}
Summary:        Procedural macros for cssparser

# https://github.com/servo/rust-cssparser/pull/201
License:        MPLv2.0
URL:            https://crates.io/crates/cssparser-macros
Source0:        https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate
# Initial patched metadata
# * No paths
# * Bump syn to 0.12, quote to 0.4, https://github.com/servo/rust-cssparser/commit/a244c3c36194a90e8081a1a89bf424a3cc70294d
Patch0:         cssparser-macros-0.3.0-fix-metadata.diff
Patch1:         0001-Update-syn-to-0.12-and-quote-to-0.4.patch

ExclusiveArch:  %{rust_arches}

BuildRequires:  rust-packaging
# [dependencies]
BuildRequires:  (crate(phf_codegen) >= 0.7.0 with crate(phf_codegen) < 0.8.0)
BuildRequires:  (crate(proc-macro2) >= 0.2.0 with crate(proc-macro2) < 0.3.0)
BuildRequires:  (crate(procedural-masquerade) >= 0.1.0 with crate(procedural-masquerade) < 0.2.0)
BuildRequires:  (crate(quote) >= 0.4.0 with crate(quote) < 0.5.0)
BuildRequires:  ((crate(syn) >= 0.12.0 with crate(syn) < 0.13.0) with crate(syn/full))

%description
%{summary}.

%package        devel
Summary:        %{summary}
BuildArch:      noarch

%description    devel
Procedural macros for cssparser.

This package contains library source intended for building other packages
which use %{crate} from crates.io.

%prep
%autosetup -n %{crate}-%{version} -N
%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
* Fri Mar 09 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.3.0-3
- Bump syn to 0.12, quote to 0.4

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Wed Jan 24 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.3.0-1
- Initial package