# Generated by rust2rpm %bcond_without check %global debug_package %{nil} %global crate google-drive3-fork Name: rust-%{crate} Version: 1.0.10 Release: 1%{?dist} Summary: Fork of Sebastian Thiel's complete library to interact with drive (protocol v3) License: MIT URL: https://crates.io/crates/google-drive3-fork Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate # Initial patched metadata # * Bump url to 1 # * hyper-rustls → hyper-native-tls Patch0: google-drive3-fork-1.0.10-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging # [dependencies] BuildRequires: (crate(hyper) >= 0.10.0 with crate(hyper) < 0.11.0) BuildRequires: (crate(mime) >= 0.2.0 with crate(mime) < 0.3.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) BuildRequires: (crate(yup-oauth2) >= 1.0.0 with crate(yup-oauth2) < 2.0.0) %if %{with check} # [dev-dependencies] BuildRequires: (crate(hyper-native-tls) >= 0.2.0 with crate(hyper-native-tls) < 0.3.0) %endif %description %{summary}. %package devel Summary: %{summary} BuildArch: noarch %description devel A fork of Sebastian Thiel's complete library to interact with drive (protocol v3). This package contains library source intended for building other packages which use %{crate} from crates.io. %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep # Fix everything hard find -type f -exec sed -r -i \ -e "s/&url::form_urlencoded::serialize\(([^)]+)\)/url::form_urlencoded::Serializer::new(String::new()).extend_pairs(\1).finish().as_str()/" \ -e "s/(extern crate hyper)_rustls/\1_native_tls/;s/hyper_rustls::TlsClient::new\(\)/hyper_native_tls::NativeTlsClient::new().unwrap()/" \ -e "s/(extern crate google_drive3)( as drive3)/\1_fork\2/" \ "{}" \+ %build %cargo_build %install %cargo_install %if %{with check} %check %cargo_test %endif %files devel %license LICENSE.md %doc README.md %{cargo_registry}/%{crate}-%{version}/ %changelog * Thu Jul 26 2018 Igor Gnatenko - 1.0.10-1 - Initial package