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

%global crate gimli

Name:           rust-%{crate}
Version:        0.15.0
Release:        4%{?dist}
Summary:        Blazing fast DWARF debugging format parser

License:        ASL 2.0 or MIT
URL:            https://crates.io/crates/gimli
Source0:        https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate
# Initial patched metadata
# * Bump object to 0.7, https://github.com/gimli-rs/gimli/pull/277
Patch0:         gimli-0.15.0-fix-metadata.diff
# Make it work with object-v0.6, https://github.com/gimli-rs/gimli/pull/265
Patch1:         0001-bump-object-to-0.6.patch
# https://github.com/gimli-rs/gimli/commit/31c8914bb530bc89ec8cda045b2e4d6537d6b750
Patch2:         0001-Fix-tests-for-32-bit-builds.patch
# https://github.com/gimli-rs/gimli/commit/391beaee2397b86480b2e855571a00b4af58b2d2
Patch3:         0001-Fix-BigEndian-build.patch

ExclusiveArch:  %{rust_arches}

BuildRequires:  rust-packaging
# [dependencies]
BuildRequires:  (crate(arrayvec) >= 0.4.6 with crate(arrayvec) < 0.5.0)
BuildRequires:  (crate(byteorder) >= 1.0.0 with crate(byteorder) < 2.0.0)
BuildRequires:  (crate(fallible-iterator) >= 0.1.2 with crate(fallible-iterator) < 0.2.0)
%if %{with check}
# [dev-dependencies]
BuildRequires:  (crate(getopts) >= 0.2.0 with crate(getopts) < 0.3.0)
BuildRequires:  (crate(memmap) >= 0.6.0 with crate(memmap) < 0.7.0)
BuildRequires:  (crate(object) >= 0.7.0 with crate(object) < 0.8.0)
BuildRequires:  (crate(test-assembler) >= 0.1.3 with crate(test-assembler) < 0.2.0)
%endif

%description
%{summary}.

%package        devel
Summary:        %{summary}
BuildArch:      noarch

%description    devel
A blazing fast DWARF debugging format parser.

This package contains library source intended for building other packages
which use %{crate} from crates.io.

%prep
%autosetup -n %{crate}-%{version} -p1
# https://github.com/gimli-rs/gimli/pull/266
chmod -x benches/bench.rs examples/dwarfdump.rs src/test_util.rs
%cargo_prep

%build
%cargo_build

%install
%cargo_install

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

%files          devel
%license LICENSE-APACHE LICENSE-MIT
%doc CONTRIBUTING.md README.md
%{cargo_registry}/%{crate}-%{version}/
%exclude %{cargo_registry}/%{crate}-%{version}/{coverage,format,releases}

%changelog
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.15.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.15.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Mon Jan 08 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.15.0-2
- Rebuild for rust-packaging v5

* Sun Dec 03 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.15.0-1
- Initial package