diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8f1b48d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/difference-2.0.0.crate diff --git a/difference-2.0.0-fix-metadata.diff b/difference-2.0.0-fix-metadata.diff new file mode 100644 index 0000000..eed0a65 --- /dev/null +++ b/difference-2.0.0-fix-metadata.diff @@ -0,0 +1,23 @@ +--- difference-2.0.0/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ difference-2.0.0/Cargo.toml 2018-01-24T16:03:59.500546+01:00 +@@ -25,17 +25,13 @@ + [[bin]] + name = "difference" + doc = false +-[dependencies.getopts] +-version = "0.2" +-optional = true + [dev-dependencies.quickcheck] ++version = "0.6" ++ ++[dev-dependencies.term] + version = "0.4" + +-[dev-dependencies.term] +-version = "0.2.7" +- + [features] +-bin = ["getopts"] + default = [] + [badges.appveyor] + repository = "johannhof/difference.rs" diff --git a/rust-difference.spec b/rust-difference.spec new file mode 100644 index 0000000..d0d628d --- /dev/null +++ b/rust-difference.spec @@ -0,0 +1,69 @@ +# Generated by rust2rpm +%bcond_without check +%global debug_package %{nil} + +# Binary is pretty useless +%global __cargo_is_bin() false + +%global crate difference + +Name: rust-%{crate} +Version: 2.0.0 +Release: 1%{?dist} +Summary: Rust text diffing and assertion library + +License: MIT +URL: https://crates.io/crates/difference +Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate +# Initial patched metadata +# * Bump term to 0.4, https://github.com/johannhof/difference.rs/pull/27 +# * Bump quickcheck to 0.6, https://github.com/johannhof/difference.rs/pull/26 +# * Remove bin feature, it is useless +Patch0: difference-2.0.0-fix-metadata.diff + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging +%if %{with check} +# [dev-dependencies] +BuildRequires: (crate(quickcheck) >= 0.6.0 with crate(quickcheck) < 0.7.0) +BuildRequires: (crate(term) >= 0.4.0 with crate(term) < 0.5.0) +%endif + +%description +%{summary}. + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel +A Rust text diffing and assertion library. + +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 +%doc README.md +%{cargo_registry}/%{crate}-%{version}/ +%exclude %{cargo_registry}/%{crate}-%{version}/appveyor.yml + +%changelog +* Wed Jan 24 2018 Igor Gnatenko - 2.0.0-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..1d6395f --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (difference-2.0.0.crate) = cc9956757770ecf237d8f46abef25ce219193c877be6cf83163e87c494956cca3202951ac01bba0728e7202fcde2261009c1b4599f389cf979858f25936a5482