Blob Blame History Raw
# Generated by rust2rpm
# addr2line(dev) -> backtrace(opt) -> addr2line
# findshlibs depends on bindgen which is not packaged
%bcond_with check
%global debug_package %{nil}

%global crate addr2line

Name:           rust-%{crate}
Version:        0.7.0
Release:        2%{?dist}
Summary:        Cross-platform symbolication library written in Rust, using `gimli`

# Upstream license specification: Apache-2.0/MIT
License:        ASL 2.0 or MIT
URL:            https://crates.io/crates/addr2line
Source0:        https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate
# Initial patched metadata
# * bump object to 0.10
Patch0:         addr2line-fix-metadata.diff

ExclusiveArch:  %{rust_arches}

BuildRequires:  rust-packaging
# [dependencies]
BuildRequires:  (crate(cpp_demangle) >= 0.2.0 with crate(cpp_demangle) < 0.3.0)
BuildRequires:  (crate(fallible-iterator) >= 0.1.0 with crate(fallible-iterator) < 0.2.0)
BuildRequires:  (crate(gimli) >= 0.16.0 with crate(gimli) < 0.17.0)
BuildRequires:  (crate(intervaltree) >= 0.2.0 with crate(intervaltree) < 0.3.0)
BuildRequires:  (crate(lazycell) >= 1.0.0 with crate(lazycell) < 2.0.0)
BuildRequires:  (crate(object) >= 0.10.0 with crate(object) < 0.11.0)
BuildRequires:  (crate(rustc-demangle) >= 0.1.0 with crate(rustc-demangle) < 0.2.0)
BuildRequires:  (crate(smallvec) >= 0.6.0 with crate(smallvec) < 0.7.0)
%if %{with check}
# [dev-dependencies]
BuildRequires:  (crate(backtrace) >= 0.3.0 with crate(backtrace) < 0.4.0)
BuildRequires:  (crate(clap) >= 2.0.0 with crate(clap) < 3.0.0)
BuildRequires:  (crate(findshlibs) >= 0.4.0 with crate(findshlibs) < 0.5.0)
BuildRequires:  (crate(memmap) >= 0.6.0 with crate(memmap) < 0.7.0)
BuildRequires:  (crate(rustc-test) >= 0.3.0 with crate(rustc-test) < 0.4.0)
%endif

%description
%{summary}.

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

%description    devel
A cross-platform symbolication library written in Rust, using `gimli`.

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

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

%build
%cargo_build

%install
%cargo_install

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

%files          devel
%license LICENSE-APACHE LICENSE-MIT
%doc README.md
%{cargo_registry}/%{crate}-%{version}/
%exclude %{cargo_registry}/%{crate}-%{version}/{benchmark.sh,bench.plot.r,coverage,memory.png,time.png}

%changelog
* Tue Oct 02 2018 Josh Stone <jistone@redhat.com> - 0.7.0-2
- Bump object to 0.10

* Sat Jul 28 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.7.0-1
- Update to 0.7.0

* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Sat Apr 14 2018 Josh Stone <jistone@redhat.com> - 0.6.0-1
- Update to 0.6.0

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

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

* Fri Jan 05 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.5.0-1
- Initial package