# Generated by rust2rpm # Not all deps are packaged %bcond_with check %global debug_package %{nil} %global crate yup-oauth2 Name: rust-%{crate} Version: 1.0.7 Release: 1%{?dist} Summary: Oauth2 implementation License: MIT or ASL 2.0 URL: https://crates.io/crates/yup-oauth2 Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate # Initial patched metadata # * Bump deps to modern versions # * Switch to hyper-native-tls + openssl # https://github.com/dermesser/yup-oauth2/pull/72 Patch0: yup-oauth2-1.0.7-fix-metadata.diff # https://github.com/dermesser/yup-oauth2/commit/f529404ccb097ca0678519e4ef3abd8532ad44d9 Patch0001: 0001-docs-update-the-example-to-use-the-hyper-tls-connect.patch Patch1001: 0001-deps-update-chrono-to-0.4.patch Patch1002: 0002-deps-update-url-to-1.patch Patch1003: 0003-deps-hyper-rustls-hyper-native-tls.patch Patch1004: 0004-deps-rustls-openssl.patch ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging # [dependencies] BuildRequires: (crate(base64) >= 0.9.0 with crate(base64) < 0.10.0) BuildRequires: (crate(chrono) >= 0.4.0 with crate(chrono) < 0.5.0) BuildRequires: (crate(hyper) >= 0.10.2 with crate(hyper) < 0.11.0) BuildRequires: (crate(hyper-native-tls) >= 0.2.0 with crate(hyper-native-tls) < 0.3.0) BuildRequires: (crate(itertools) >= 0.7.0 with crate(itertools) < 0.8.0) BuildRequires: (crate(log) >= 0.3.0 with crate(log) < 0.4.0) BuildRequires: (crate(openssl) >= 0.10.0 with crate(openssl) < 0.11.0) 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) BuildRequires: (crate(serde_json) >= 1.0.0 with crate(serde_json) < 2.0.0) BuildRequires: (crate(url) >= 1.0.0 with crate(url) < 2.0.0) %if %{with check} # [dev-dependencies] BuildRequires: (crate(getopts) >= 0.2.0 with crate(getopts) < 0.3.0) BuildRequires: (crate(open) >= 1.1.0 with crate(open) < 2.0.0) BuildRequires: (crate(yup-hyper-mock) >= 2.0.0 with crate(yup-hyper-mock) < 3.0.0) %endif %description %{summary}. %package devel Summary: %{summary} BuildArch: noarch %description devel An oauth2 implementation, providing the 'device', 'service account' and 'installed' authorization flows. 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 changelog.md %{cargo_registry}/%{crate}-%{version}/ %exclude %{cargo_registry}/%{crate}-%{version}/etc %changelog * Wed Jul 25 2018 Igor Gnatenko - 1.0.7-1 - Initial package