From 4106783861d81163581551e097bb584ae4cb657c Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Tue, 24 May 2022 22:53:35 +0200 Subject: [PATCH] Initial import (petgraph 0.5 compat package) --- .gitignore | 1 + README.md | 3 - petgraph-fix-metadata.diff | 31 +++++++ rust-petgraph0.5.spec | 186 +++++++++++++++++++++++++++++++++++++ sources | 1 + 5 files changed, 219 insertions(+), 3 deletions(-) create mode 100644 .gitignore delete mode 100644 README.md create mode 100644 petgraph-fix-metadata.diff create mode 100644 rust-petgraph0.5.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3ec1ab4 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/petgraph-0.5.1.crate diff --git a/README.md b/README.md deleted file mode 100644 index 927fab2..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# rust-petgraph0.5 - -The rust-petgraph0.5 package diff --git a/petgraph-fix-metadata.diff b/petgraph-fix-metadata.diff new file mode 100644 index 0000000..1093f66 --- /dev/null +++ b/petgraph-fix-metadata.diff @@ -0,0 +1,31 @@ +--- petgraph-0.5.1/Cargo.toml 2020-05-23T13:27:38+00:00 ++++ petgraph-0.5.1/Cargo.toml 2022-05-24T14:58:33.508639+00:00 +@@ -21,6 +21,7 @@ + categories = ["data-structures"] + license = "MIT/Apache-2.0" + repository = "https://github.com/petgraph/petgraph" ++exclude = ["/custom.css", "/graph-example.dot", "/Makefile"] + [package.metadata.docs.rs] + features = ["serde-1", "quickcheck"] + +@@ -40,11 +41,6 @@ + + [dependencies.indexmap] + version = "1.0.2" +- +-[dependencies.quickcheck] +-version = "0.8" +-optional = true +-default-features = false + + [dependencies.serde] + version = "1.0" +@@ -67,7 +63,7 @@ + version = "0.5.5" + + [features] +-all = ["unstable", "quickcheck", "matrix_graph", "stable_graph", "graphmap"] ++all = ["unstable", "matrix_graph", "stable_graph", "graphmap"] + default = ["graphmap", "stable_graph", "matrix_graph"] + generate = [] + graphmap = [] diff --git a/rust-petgraph0.5.spec b/rust-petgraph0.5.spec new file mode 100644 index 0000000..b78ddf7 --- /dev/null +++ b/rust-petgraph0.5.spec @@ -0,0 +1,186 @@ +# Generated by rust2rpm 21 +# * dev-dependencies are outdated +%bcond_with check +%global debug_package %{nil} + +%global crate petgraph + +Name: rust-%{crate}0.5 +Version: 0.5.1 +Release: %autorelease +Summary: Graph data structure library + +# Upstream license specification: MIT/Apache-2.0 +License: MIT or ASL 2.0 +URL: https://crates.io/crates/petgraph +Source: %{crates_source} +# Initial patched metadata +# * drop optional feature with outdated quickcheck dependency +# * exclude files that are only useful for upstream development +Patch0: petgraph-fix-metadata.diff + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging >= 21 + +%global _description %{expand: +Graph data structure library. Provides graph types and graph algorithms.} + +%description %{_description} + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel %{_description} + +This package contains library source intended for building other packages which +use the "%{crate}" crate. + +%files devel +%license %{crate_instdir}/LICENSE-APACHE +%license %{crate_instdir}/LICENSE-MIT +%doc %{crate_instdir}/CONTRIBUTING.rst +%doc %{crate_instdir}/README.rst +%{crate_instdir}/ + +%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 the "default" feature of the "%{crate}" crate. + +%files -n %{name}+default-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+all-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+all-devel %{_description} + +This package contains library source intended for building other packages which +use the "all" feature of the "%{crate}" crate. + +%files -n %{name}+all-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+generate-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+generate-devel %{_description} + +This package contains library source intended for building other packages which +use the "generate" feature of the "%{crate}" crate. + +%files -n %{name}+generate-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+graphmap-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+graphmap-devel %{_description} + +This package contains library source intended for building other packages which +use the "graphmap" feature of the "%{crate}" crate. + +%files -n %{name}+graphmap-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+matrix_graph-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+matrix_graph-devel %{_description} + +This package contains library source intended for building other packages which +use the "matrix_graph" feature of the "%{crate}" crate. + +%files -n %{name}+matrix_graph-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+serde-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+serde-devel %{_description} + +This package contains library source intended for building other packages which +use the "serde" feature of the "%{crate}" crate. + +%files -n %{name}+serde-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+serde-1-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+serde-1-devel %{_description} + +This package contains library source intended for building other packages which +use the "serde-1" feature of the "%{crate}" crate. + +%files -n %{name}+serde-1-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+serde_derive-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+serde_derive-devel %{_description} + +This package contains library source intended for building other packages which +use the "serde_derive" feature of the "%{crate}" crate. + +%files -n %{name}+serde_derive-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+stable_graph-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+stable_graph-devel %{_description} + +This package contains library source intended for building other packages which +use the "stable_graph" feature of the "%{crate}" crate. + +%files -n %{name}+stable_graph-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+unstable-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+unstable-devel %{_description} + +This package contains library source intended for building other packages which +use the "unstable" feature of the "%{crate}" crate. + +%files -n %{name}+unstable-devel +%ghost %{crate_instdir}/Cargo.toml + +%prep +%autosetup -n %{crate}-%{version_no_tilde} -p1 +%cargo_prep + +%generate_buildrequires +%cargo_generate_buildrequires + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +%autochangelog diff --git a/sources b/sources new file mode 100644 index 0000000..2201c7d --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (petgraph-0.5.1.crate) = c3d5f53b1a0900084b0693a6f3a849bb9b443b1b6fd1ad88bce8beb12ed1b45f2399b68db3366ba15f33c2d5682e052b733dbde76fb1b646b7bb1e660a38d8bd