Blob Blame History Raw
# Generated by rust2rpm 11
%bcond_without check
%global debug_package %{nil}

%global crate gethostname

Name:           rust-%{crate}
Version:        0.2.0
Release:        4%{?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
# * No windows
# * Update 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

%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
%if %{with check}
echo '/usr/bin/hostname'
%endif

%build
%cargo_build

%install
%cargo_install

%if %{with check}
%check
%cargo_test
%endif

%changelog
* Fri Dec 13 18:37:54 CET 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.2.0-4
- Update patch

* Sat Dec 07 2019 Artem Polishchuk <ego.cordatus@gmail.com> - 0.2.0-3
- Spec file fixes

* Sun Nov 24 03:51:34 EET 2019 Artem Polishchuk <ego.cordatus@gmail.com> - 0.2.0-1
- Initial package