You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rust-url/rust-url.spec

89 lines
2.8 KiB

# Generated by rust2rpm
%bcond_without check
%global debug_package %{nil}
%global crate url
Name: rust-%{crate}
Version: 1.7.0
Release: 2%{?dist}
Summary: URL library for Rust, based on the WHATWG URL Standard
License: MIT or ASL 2.0
URL: https://crates.io/crates/url
Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate
# Initial patched metadata
# * Bump rustc-test to 0.3, https://github.com/servo/rust-url/commit/9d500e76a0e1644c93b3869588f979e4440e74d6
Patch0: url-1.7.0-fix-metadata.diff
# Make it work with new rustc-test
Patch1: 0001-Update-to-rustc_test-0.3-unbreak-tests-on-nightly-20.patch
ExclusiveArch: %{rust_arches}
BuildRequires: rust-packaging
# [dependencies]
BuildRequires: (crate(encoding) >= 0.2.0 with crate(encoding) < 0.3.0)
BuildRequires: (crate(heapsize) >= 0.4.1 with crate(heapsize) < 0.5.0)
BuildRequires: (crate(idna) >= 0.1.0 with crate(idna) < 0.2.0)
BuildRequires: (crate(matches) >= 0.1.0 with crate(matches) < 0.2.0)
BuildRequires: (crate(percent-encoding) >= 1.0.0 with crate(percent-encoding) < 2.0.0)
BuildRequires: (crate(rustc-serialize) >= 0.3.0 with crate(rustc-serialize) < 0.4.0)
BuildRequires: (crate(serde) >= 0.6.1 with crate(serde) < 0.9.0)
%if %{with check}
# [dev-dependencies]
BuildRequires: (crate(rustc-serialize) >= 0.3.0 with crate(rustc-serialize) < 0.4.0)
BuildRequires: (crate(rustc-test) >= 0.3.0 with crate(rustc-test) < 0.4.0)
BuildRequires: (crate(serde_json) >= 0.6.1 with crate(serde_json) < 0.9.0)
%endif
%description
%{summary}.
%package devel
Summary: %{summary}
BuildArch: noarch
%description devel
URL library for Rust, based on the WHATWG URL Standard.
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
# https://github.com/servo/rust-url/issues/437
%cargo_test || :
%endif
%files devel
%license LICENSE-MIT LICENSE-APACHE
%doc README.md UPGRADING.md
%{cargo_registry}/%{crate}-%{version}/
%exclude %{cargo_registry}/%{crate}-%{version}/{appveyor.yml,docs}
%changelog
* Tue Mar 13 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.7.0-2
- Bump rustc-test to 0.3
* Wed Feb 21 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.7.0-1
- Update to 1.7.0
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Mon Jan 08 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.6.0-2
- Rebuild for rust-packaging v5
* Fri Nov 10 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.6.0-1
- Initial package