You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rust-gimli/rust-gimli.spec

75 lines
2.1 KiB

# Generated by rust2rpm
%bcond_without check
%global debug_package %{nil}
%global crate gimli
Name: rust-%{crate}
Version: 0.15.0
Release: 1%{?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.6, https://github.com/gimli-rs/gimli/pull/265
Patch0: gimli-0.15.0-fix-metadata.diff
# Make it work with object-v0.6
Patch1: 0001-bump-object-to-0.6.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.6.0 with crate(object) < 0.7.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
* Sun Dec 03 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.15.0-1
- Initial package