# Generated by rust2rpm 11
%bcond_without check
%global debug_package %{nil}
%global crate battery
Name: rust-%{crate}
Version: 0.7.5
Release: 1%{?dist}
Summary: Cross-platform information about the notebook batteries
# Upstream license specification: Apache-2.0 OR MIT
License: ASL 2.0 or MIT
URL: https://crates.io/crates/battery
Source: %{crates_source}
# Remove Windows and Mac only dependencies
Patch0: battery-fix-metadata.diff
ExclusiveArch: %{rust_arches}
%if %{__cargo_skip_build}
BuildArch: noarch
%endif
BuildRequires: rust-packaging
%global _description %{expand:
battery provides a cross-platform unified API to a notebook batteries state.
Its main goal is to wrap the OS-specific interfaces, cover all the hacks and
legacy cases and get the batteries information (such as state of charge, energy
rate, voltage and temperature) as a typed values, recalculated as necessary to
be returned as a SI measurement units.}
%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-APACHE LICENSE-MIT
%doc README.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
* Wed Nov 27 02:08:01 EET 2019 Artem Polishchuk <ego.cordatus@gmail.com> - 0.7.5-1
- Update to 0.7.5
* Mon Nov 25 09:22:32 EET 2019 Artem Polishchuk <ego.cordatus@gmail.com> - 0.7.4-1
- Initial package