diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ee38592 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/home-0.3.0.crate diff --git a/home-0.3.0-fix-metadata.diff b/home-0.3.0-fix-metadata.diff new file mode 100644 index 0000000..a1fb079 --- /dev/null +++ b/home-0.3.0-fix-metadata.diff @@ -0,0 +1,20 @@ +--- home-0.3.0/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ home-0.3.0/Cargo.toml 2018-01-13T17:54:25.352638+01:00 +@@ -18,17 +18,3 @@ + documentation = "https://docs.rs/home" + license = "MIT/Apache-2.0" + repository = "https://github.com/brson/home" +-[target."cfg(windows)".dependencies.winapi] +-version = "0.2.8" +- +-[target."cfg(windows)".dependencies.kernel32-sys] +-version = "0.2.1" +- +-[target."cfg(windows)".dependencies.scopeguard] +-version = "0.1.2" +- +-[target."cfg(windows)".dependencies.userenv-sys] +-version = "0.2.0" +- +-[target."cfg(windows)".dependencies.advapi32-sys] +-version = "0.2.0" diff --git a/rust-home.spec b/rust-home.spec new file mode 100644 index 0000000..833cdbe --- /dev/null +++ b/rust-home.spec @@ -0,0 +1,58 @@ +# Generated by rust2rpm +%bcond_without check +%global debug_package %{nil} + +%global crate home + +Name: rust-%{crate} +Version: 0.3.0 +Release: 1%{?dist} +Summary: Shared definitions of home directories + +# https://github.com/brson/home/issues/2 +License: MIT or ASL 2.0 +URL: https://crates.io/crates/home +Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate +# Initial patched metadata +# * No windows +Patch0: home-0.3.0-fix-metadata.diff + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging + +%description +%{summary}. + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel +Shared definitions of home directories. + +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 +%doc README.md +%{cargo_registry}/%{crate}-%{version}/ + +%changelog +* Sat Jan 13 2018 Igor Gnatenko - 0.3.0-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..c41df79 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (home-0.3.0.crate) = 8e16d5d3b99e1e8afc33894659aafc59ff3656e7f55cf9c1ee801d9f3d356cedf36f13253e17498a7642dc0edbed77dbf7ae2d40523ca241b15826e7958cf585