From f15329b9d56c12ff143e9971c9db7f7ba2bc33ed Mon Sep 17 00:00:00 2001 From: Artem Polishchuk Date: Dec 12 2019 14:16:02 +0000 Subject: Initial import (#1776142). --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..17cfc4c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/gethostname-0.2.0.crate diff --git a/gethostname-fix-metadata.diff b/gethostname-fix-metadata.diff new file mode 100644 index 0000000..95d4f5f --- /dev/null +++ b/gethostname-fix-metadata.diff @@ -0,0 +1,13 @@ +--- gethostname-0.2.0/Cargo.toml 1970-01-01T00:00:00+00:00 ++++ gethostname-0.2.0/Cargo.toml 2019-11-24T01:50:45.826449+00:00 +@@ -24,9 +24,6 @@ + license = "Apache-2.0" + repository = "https://github.com/lunaryorn/gethostname.rs.git" + [dev-dependencies.pretty_assertions] +-version = "^0.5" ++version = "^0.6" + [target."cfg(not(windows))".dependencies.libc] + version = "^0.2" +-[target."cfg(windows)".dependencies.winapi] +-version = "^0.3" +-features = ["sysinfoapi"] diff --git a/rust-gethostname.spec b/rust-gethostname.spec new file mode 100644 index 0000000..8d75f5e --- /dev/null +++ b/rust-gethostname.spec @@ -0,0 +1,87 @@ +# Generated by rust2rpm 10 + +%bcond_without check +%global debug_package %{nil} +%global crate gethostname + +Name: rust-%{crate} +Version: 0.2.0 +Release: 3%{?dist} +Summary: Gethostname for all platforms + +# Upstream license specification: Apache-2.0 +License: ASL 2.0 +URL: https://crates.io/crates/gethostname +Source: %{crates_source} + +# Initial patched metadata +# * Remove Windows-only dependencies +# * Bump pretty_assertions to 0.6.1 +# * https://github.com/lunaryorn/gethostname.rs/commit/4b50f071448ea153a5222199e562d5454baab127 +Patch0: gethostname-fix-metadata.diff + +ExclusiveArch: %{rust_arches} +%if %{__cargo_skip_build} +BuildArch: noarch +%endif + +BuildRequires: rust-packaging +%if %{with check} +BuildRequires: hostname +%endif + +%global _description %{expand: +Gethostname for all platforms.} + +%description %{_description} + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel %{_description} + +This package contains library source intended for building other packages +which use "%{crate}" crate. + +%files devel +%license LICENSE +%doc README.md CHANGELOG.md +%{cargo_registry}/%{crate}-%{version}/ + +%package -n %{name}+default-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+default-devel %{_description} + +This package contains library source intended for building other packages +which use "default" feature of "%{crate}" crate. + +%files -n %{name}+default-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%prep +%autosetup -n %{crate}-%{version_no_tilde} -p1 +%cargo_prep + +%generate_buildrequires +%cargo_generate_buildrequires + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +* Sat Dec 07 2019 Artem Polishchuk - 0.2.0-3 +- Spec file fixes + +* Sun Nov 24 03:51:34 EET 2019 Artem Polishchuk - 0.2.0-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..13ce8c8 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (gethostname-0.2.0.crate) = d7ee6cab846b30dd8a3fd94c0f0b2186202dfaf12f42877adf2883575bd6c46a4910d1082e538cf26f1541b005d885e5c17e5c64c50c8a7355b47e16a3b74520