From 62e912d7d2931723cb0cdc38e3efeb251ff4322e Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sat, 2 Dec 2017 08:20:27 +0100 Subject: [PATCH] initial import Signed-off-by: Igor Gnatenko --- .gitignore | 1 + cpp_demangle-0.2.7-fix-metadata.diff | 24 +++++++++ rust-cpp_demangle.spec | 78 ++++++++++++++++++++++++++++ sources | 1 + 4 files changed, 104 insertions(+) create mode 100644 .gitignore create mode 100644 cpp_demangle-0.2.7-fix-metadata.diff create mode 100644 rust-cpp_demangle.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c11058c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/cpp_demangle-0.2.7.crate diff --git a/cpp_demangle-0.2.7-fix-metadata.diff b/cpp_demangle-0.2.7-fix-metadata.diff new file mode 100644 index 0000000..dad677d --- /dev/null +++ b/cpp_demangle-0.2.7-fix-metadata.diff @@ -0,0 +1,24 @@ +--- cpp_demangle-0.2.7/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ cpp_demangle-0.2.7/Cargo.toml 2017-12-01T15:52:46.759567+01:00 +@@ -29,13 +29,6 @@ + name = "cppfilt" + path = "src/bin/cppfilt.rs" + required-features = ["cppfilt"] +-[dependencies.afl] +-version = "0.1.5" +-optional = true +- +-[dependencies.afl-plugin] +-version = "0.1.5" +-optional = true + + [dependencies.clap] + version = "2.27.1" +@@ -48,7 +41,6 @@ + [features] + cppfilt = ["clap"] + default = ["cppfilt"] +-fuzz = ["afl", "afl-plugin"] + logging = [] + nightly = [] + run_libiberty_tests = [] diff --git a/rust-cpp_demangle.spec b/rust-cpp_demangle.spec new file mode 100644 index 0000000..cc4ee72 --- /dev/null +++ b/rust-cpp_demangle.spec @@ -0,0 +1,78 @@ +# 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 diff --git a/sources b/sources new file mode 100644 index 0000000..72a482b --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (cpp_demangle-0.2.7.crate) = c521b4bdb24db17092e958fea3d5afc95dd5435c27f3162f333515c059954c4adfb37f26e8da46709d3c1c897e4a789b4ff775601732d3efdf1d143446ac66b1