diff --git a/cpp_demangle-fix-metadata.diff b/cpp_demangle-fix-metadata.diff index 732145f..4dcc497 100644 --- a/cpp_demangle-fix-metadata.diff +++ b/cpp_demangle-fix-metadata.diff @@ -1,13 +1,9 @@ ---- cpp_demangle-0.2.11/Cargo.toml 1970-01-01T01:00:00+01:00 -+++ cpp_demangle-0.2.11/Cargo.toml 2018-08-10T14:22:30.129580+02:00 -@@ -31,14 +31,6 @@ - path = "src/bin/cppfilt.rs" - required-features = ["cppfilt"] - --[[bin]] --name = "afl_runner" --path = "src/bin/afl_runner.rs" --required-features = ["afl"] +--- cpp_demangle-0.2.12/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ cpp_demangle-0.2.12/Cargo.toml 2018-11-02T18:54:42.881123+01:00 +@@ -35,10 +35,6 @@ + name = "afl_runner" + path = "src/bin/afl_runner.rs" + required-features = ["afl"] -[dependencies.afl] -version = "0.4" -optional = true @@ -15,11 +11,16 @@ [dependencies.cfg-if] version = "0.1.4" [dev-dependencies.clap] -@@ -53,7 +45,6 @@ +@@ -51,12 +47,8 @@ + + [features] alloc = [] - cppfilt = [] +-cppfilt = [] default = ["std"] -fuzz = ["afl"] logging = [] - nightly = [] - run_libiberty_tests = [] +-nightly = [] +-run_libiberty_tests = [] + std = [] + [badges.travis-ci] + repository = "gimli-rs/cpp_demangle" diff --git a/rust-cpp_demangle.spec b/rust-cpp_demangle.spec index 4192d91..4a8f9b8 100644 --- a/rust-cpp_demangle.spec +++ b/rust-cpp_demangle.spec @@ -1,11 +1,14 @@ # Generated by rust2rpm -%bcond_without check +# * Tests are run in infrastructure +%bcond_with check + +%global __cargo_is_bin() false %global crate cpp_demangle Name: rust-%{crate} Version: 0.2.12 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Crate for demangling C++ symbols # Upstream license specification: Apache-2.0/MIT @@ -19,61 +22,99 @@ Patch0: cpp_demangle-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -# [dependencies] -BuildRequires: (crate(cfg-if) >= 0.1.4 with crate(cfg-if) < 0.2.0) -# [build-dependencies] -BuildRequires: (crate(glob) >= 0.2.11 with crate(glob) < 0.3.0) +BuildRequires: (crate(cfg-if/default) >= 0.1.4 with crate(cfg-if/default) < 0.2.0) +BuildRequires: (crate(glob/default) >= 0.2.11 with crate(glob/default) < 0.3.0) %if %{with check} -# [dev-dependencies] -BuildRequires: (crate(clap) >= 2.27.1 with crate(clap) < 3.0.0) -BuildRequires: (crate(diff) >= 0.1.10 with crate(diff) < 0.2.0) +BuildRequires: (crate(clap/default) >= 2.27.1 with crate(clap/default) < 3.0.0) +BuildRequires: (crate(diff/default) >= 0.1.10 with crate(diff/default) < 0.2.0) %endif -%description -%{summary}. - -%package -n %{crate} -Summary: c++filt clone in Rust +%global _description \ +A crate for demangling C++ symbols. -%description -n %{crate} -c++filt clone as an example of how to use the cpp_demangle crate. +%description %{_description} %package devel Summary: %{summary} BuildArch: noarch -%description devel -A crate for demangling C++ symbols. +%description devel %{_description} This package contains library source intended for building other packages -which use %{crate} from crates.io. +which use "%{crate}" crate. + +%files devel +%license LICENSE-MIT LICENSE-APACHE +%doc CHANGELOG.md CONTRIBUTING.md README.md +%{cargo_registry}/%{crate}-%{version}/ + +%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}+alloc-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+alloc-devel %{_description} + +This package contains library source intended for building other packages +which use "alloc" feature of "%{crate}" crate. + +%files -n %{name}+alloc-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+logging-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+logging-devel %{_description} + +This package contains library source intended for building other packages +which use "logging" feature of "%{crate}" crate. + +%files -n %{name}+logging-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+std-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+std-devel %{_description} + +This package contains library source intended for building other packages +which use "std" feature of "%{crate}" crate. + +%files -n %{name}+std-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep %build -%cargo_build -- --example cppfilt +%cargo_build %install -%cargo_install -- --example cppfilt +%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 Nov 02 2018 Igor Gnatenko - 0.2.12-2 +- Adapt to new packaging + * Tue Sep 11 2018 Josh Stone - 0.2.12-1 - Update to 0.2.12