From 279401fb39c2ff2d16816291e37884d0bd574245 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Jul 15 2018 10:54:31 +0000 Subject: initial import Signed-off-by: Igor Gnatenko --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e64a2d3 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/mime-0.2.6.crate diff --git a/0001-allow-deprecation-warning-for-AsciiExt.patch b/0001-allow-deprecation-warning-for-AsciiExt.patch new file mode 100644 index 0000000..3f38a70 --- /dev/null +++ b/0001-allow-deprecation-warning-for-AsciiExt.patch @@ -0,0 +1,25 @@ +From 43789279517b4bbadd49f929dfe11c839f476cb1 Mon Sep 17 00:00:00 2001 +From: Sean McArthur +Date: Thu, 26 Apr 2018 12:07:58 -0700 +Subject: [PATCH] allow deprecation warning for AsciiExt + +(cherry picked from commit f2cf5d5d062beaea2212121ec80971b766d55976) +--- + src/lib.rs | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/lib.rs b/src/lib.rs +index 7eabbd9..e4cc111 100644 +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -36,6 +36,7 @@ extern crate serde_json; + #[cfg(feature = "heapsize")] + extern crate heapsize; + ++#[allow(deprecated,unused_imports)] + use std::ascii::AsciiExt; + use std::fmt; + use std::iter::Enumerate; +-- +2.18.0 + diff --git a/mime-0.2.6-fix-metadata.diff b/mime-0.2.6-fix-metadata.diff new file mode 100644 index 0000000..c71cc9e --- /dev/null +++ b/mime-0.2.6-fix-metadata.diff @@ -0,0 +1,21 @@ +--- mime-0.2.6/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ mime-0.2.6/Cargo.toml 2018-07-15T12:42:38.953400+02:00 +@@ -19,10 +19,6 @@ + keywords = ["mime", "media-extensions", "media-types"] + license = "MIT" + repository = "https://github.com/hyperium/mime.rs" +-[dependencies.heapsize] +-version = ">=0.2.0, <0.4" +-optional = true +- + [dependencies.log] + version = "0.3" + +@@ -31,7 +27,3 @@ + optional = true + [dev-dependencies.serde_json] + version = ">=0.7, <0.9" +- +-[features] +-heap_size = ["heapsize"] +-nightly = [] diff --git a/rust-mime0.2.spec b/rust-mime0.2.spec new file mode 100644 index 0000000..9cfb186 --- /dev/null +++ b/rust-mime0.2.spec @@ -0,0 +1,65 @@ +# Generated by rust2rpm +%bcond_without check +%global debug_package %{nil} + +%global crate mime + +Name: rust-%{crate}0.2 +Version: 0.2.6 +Release: 1%{?dist} +Summary: Strongly Typed Mimes + +License: MIT +URL: https://crates.io/crates/mime +Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate +# Initial patched metadata +# * No heapsize, it's outdated +# * No nightly +Patch0: mime-0.2.6-fix-metadata.diff +Patch0001: 0001-allow-deprecation-warning-for-AsciiExt.patch + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging +# [dependencies] +BuildRequires: (crate(log) >= 0.3.0 with crate(log) < 0.4.0) +BuildRequires: (crate(serde) >= 0.7.0 with crate(serde) < 0.9.0) +%if %{with check} +# [dev-dependencies] +BuildRequires: (crate(serde_json) >= 0.7.0 with crate(serde_json) < 0.9.0) +%endif + +%description +%{summary}. + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel +Strongly Typed Mimes. + +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 +%{cargo_registry}/%{crate}-%{version}/ + +%changelog +* Sun Jul 15 2018 Igor Gnatenko - 0.2.6-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..da0e014 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (mime-0.2.6.crate) = 30e0cd95c8961ddce61759fa2c7273dfd37d490f96a5715d558c6c7775457560268309c3ad1222ff8150beab8f328b3a958dc05729d9550233d3efa0a1e13137