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

%global crate prometheus

Name:           rust-%{crate}
Version:        0.6.1
Release:        2%{?dist}
Summary:        Prometheus instrumentation library for Rust applications

# Upstream license specification: Apache-2.0
License:        ASL 2.0
URL:            https://crates.io/crates/prometheus
Source:         %{crates_source}
# Fix manifest to update to hyper 0.12
Patch0:         prometheus-fix-manifest.diff
# See: https://github.com/pingcap/rust-prometheus/pull/249
Patch0001:      0001-update-example-hyper.diff
# See: https://github.com/pingcap/rust-prometheus/pull/246
Patch0002:      0002-fix-should-panic-tests.diff

ExclusiveArch:  %{rust_arches}
%if %{__cargo_skip_build}
BuildArch:      noarch
%endif

BuildRequires:  rust-packaging
%if ! %{__cargo_skip_build}
BuildRequires:  (crate(cfg-if/default) >= 0.1.0 with crate(cfg-if/default) < 0.2.0)
BuildRequires:  (crate(fnv/default) >= 1.0.0 with crate(fnv/default) < 2.0.0)
BuildRequires:  (crate(lazy_static/default) >= 1.1.0 with crate(lazy_static/default) < 2.0.0)
BuildRequires:  (crate(protobuf/default) >= 2.0.0 with crate(protobuf/default) < 3.0.0)
BuildRequires:  (crate(quick-error/default) >= 1.2.2 with crate(quick-error/default) < 2.0.0)
BuildRequires:  (crate(spin/default) >= 0.5.0 with crate(spin/default) < 0.6.0)
%if %{with check}
BuildRequires:  (crate(getopts/default) >= 0.2.0 with crate(getopts/default) < 0.3.0)
BuildRequires:  (crate(hyper) >= 0.12.0 with crate(hyper) < 0.13.0)
%endif
%endif

%global _description %{expand:
Prometheus instrumentation library for Rust applications.}

%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
%doc README.md
%{cargo_registry}/%{crate}-%{version}/
%license LICENSE

%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

%package     -n %{name}+gen-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+gen-devel %{_description}

This package contains library source intended for building other packages
which use "gen" feature of "%{crate}" crate.

%files       -n %{name}+gen-devel
%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml

%package     -n %{name}+libc-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+libc-devel %{_description}

This package contains library source intended for building other packages
which use "libc" feature of "%{crate}" crate.

%files       -n %{name}+libc-devel
%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml

%package     -n %{name}+nightly-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+nightly-devel %{_description}

This package contains library source intended for building other packages
which use "nightly" feature of "%{crate}" crate.

%files       -n %{name}+nightly-devel
%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml

%package     -n %{name}+process-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+process-devel %{_description}

This package contains library source intended for building other packages
which use "process" feature of "%{crate}" crate.

%files       -n %{name}+process-devel
%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml

%package     -n %{name}+procinfo-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+procinfo-devel %{_description}

This package contains library source intended for building other packages
which use "procinfo" feature of "%{crate}" crate.

%files       -n %{name}+procinfo-devel
%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml

%package     -n %{name}+protobuf-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+protobuf-devel %{_description}

This package contains library source intended for building other packages
which use "protobuf" feature of "%{crate}" crate.

%files       -n %{name}+protobuf-devel
%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml

%package     -n %{name}+protobuf-codegen-pure-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+protobuf-codegen-pure-devel %{_description}

This package contains library source intended for building other packages
which use "protobuf-codegen-pure" feature of "%{crate}" crate.

%files       -n %{name}+protobuf-codegen-pure-devel
%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml

%package     -n %{name}+push-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+push-devel %{_description}

This package contains library source intended for building other packages
which use "push" feature of "%{crate}" crate.

%files       -n %{name}+push-devel
%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml

%package     -n %{name}+reqwest-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+reqwest-devel %{_description}

This package contains library source intended for building other packages
which use "reqwest" feature of "%{crate}" crate.

%files       -n %{name}+reqwest-devel
%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml

%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
%cargo_prep

%build
%cargo_build

%install
%cargo_install

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

%changelog
* Mon Jun 17 10:50:00 UTC 2019 Robert Fairley <rfairley@redhat.com> - 0.6.1-2
- Update to hyper 0.12 (https://github.com/pingcap/rust-prometheus/pull/249)

* Mon Jun 10 19:00:25 UTC 2019 Robert Fairley <rfairley@redhat.com> - 0.6.1-1
- Initial package (#1717614)