# Generated by rust2rpm %bcond_without check %global crate cpp_demangle Name: rust-%{crate} Version: 0.2.7 Release: 1%{?dist} Summary: Crate for demangling C++ symbols License: ASL 2.0 or MIT URL: https://crates.io/crates/cpp_demangle Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate # Initial patched metadata # * afl is nightly Patch0: cpp_demangle-0.2.7-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging # [dependencies] BuildRequires: (crate(clap) >= 2.27.1 with crate(clap) < 3.0.0) # [build-dependencies] BuildRequires: (crate(glob) >= 0.2.11 with crate(glob) < 0.3.0) %if %{with check} # [dev-dependencies] BuildRequires: (crate(diff) >= 0.1.10 with crate(diff) < 0.2.0) %endif %description %{summary}. %package -n %{crate} Summary: c++filt clone in Rust %description -n %{crate} c++filt clone as an example of how to use the cpp_demangle crate. %package devel Summary: %{summary} BuildArch: noarch %description devel A crate for demangling C++ symbols. 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/cpp_demangle/pull/118 find -type f -name '*.rs' -executable -exec chmod -x {} ';' %cargo_prep %build %cargo_build %install %cargo_install %if %{with check} %check %cargo_test %endif %files -n %{crate} %license LICENSE-MIT LICENSE-APACHE %doc CHANGELOG.md README.md %{_bindir}/cppfilt %files devel %license LICENSE-MIT LICENSE-APACHE %doc CHANGELOG.md CONTRIBUTING.md README.md %{cargo_registry}/%{crate}-%{version}/ %changelog * Fri Dec 01 2017 Igor Gnatenko - 0.2.7-1 - Initial package