From c4a023137299a4c241f49ea51c7d7ce56030f01a Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Nov 07 2017 17:41:35 +0000 Subject: initial import Signed-off-by: Igor Gnatenko --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..88686af --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/time-0.1.38.crate diff --git a/rust-time.spec b/rust-time.spec new file mode 100644 index 0000000..70889c7 --- /dev/null +++ b/rust-time.spec @@ -0,0 +1,78 @@ +# Generated by rust2rpm +%bcond_without check +%global debug_package %{nil} + +%global crate time + +Name: rust-%{crate} +Version: 0.1.38 +Release: 2%{?dist} +Summary: Utilities for working with time-related functions in Rust + +License: MIT or ASL 2.0 +URL: https://crates.io/crates/time +Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate +# Initial patched metadata +# * No windows +Patch0: time-0.1.38-fix-metadata.diff + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging +# [dependencies] +BuildRequires: (crate(libc) >= 0.2.1 with crate(libc) < 0.3.0) +BuildRequires: (crate(rustc-serialize) >= 0.3.0 with crate(rustc-serialize) < 0.4.0) +%if %{with check} +# [dev-dependencies] +BuildRequires: (crate(log) >= 0.3.0 with crate(log) < 0.4.0) +%endif + +%description +%{summary}. + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel +Utilities for working with time-related functions in Rust. + +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 +%{cargo_registry}/%{crate}-%{version}/ +%exclude %{cargo_registry}/%{crate}-%{version}/appveyor.yml + +%changelog +* Mon Nov 06 2017 Igor Gnatenko - 0.1.38-2 +- Exclude unneeded files + +* Fri Jul 07 2017 Igor Gnatenko - 0.1.38-1 +- Update to 0.1.38 + +* Wed Jun 14 2017 Igor Gnatenko - 0.1.36-3 +- Port to use rust-packaging + +* Fri Feb 24 2017 Igor Gnatenko - 0.1.36-2 +- Use rich dependencies + +* Sat Feb 18 2017 Igor Gnatenko - 0.1.36-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..c7237bc --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (time-0.1.38.crate) = 9052d6bc6c9222d331d23f7cb79b534bea6b1cc0f259c97f465321bcdad11b643cbd2e9bb3a456770a19a2a84dabfbab55e522cbb745f4c64e228736eaaeaf24 diff --git a/time-0.1.38-fix-metadata.diff b/time-0.1.38-fix-metadata.diff new file mode 100644 index 0000000..a4e7f23 --- /dev/null +++ b/time-0.1.38-fix-metadata.diff @@ -0,0 +1,18 @@ +--- time-0.1.38/Cargo.toml 2017-07-07T16:14:17+02:00 ++++ time-0.1.38/Cargo.toml 2017-07-07T20:06:24.936383+02:00 +@@ -15,15 +15,5 @@ + libc = "0.2.1" + rustc-serialize = { version = "0.3", optional = true } + +-[target.'cfg(target_os = "redox")'.dependencies] +-redox_syscall = "0.1" +- +-[target.'cfg(windows)'.dependencies] +-winapi = "0.2.0" +-kernel32-sys = "0.2.0" +- + [dev-dependencies] + log = "0.3" +- +-[target.'cfg(windows)'.dev-dependencies] +-advapi32-sys = "0.1.2"