From 650acc2eed106450d40005eab5379c2638a34b0c Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Mon, 26 Dec 2022 21:26:19 -0600 Subject: [PATCH] Initial Fedora package Signed-off-by: Michel Alexandre Salim --- .gitignore | 1 + rust-rxml.spec | 193 +++++++++++++++++++++++++++++++++++++++++ rxml-fix-metadata.diff | 22 +++++ sources | 1 + 4 files changed, 217 insertions(+) create mode 100644 .gitignore create mode 100644 rust-rxml.spec create mode 100644 rxml-fix-metadata.diff create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..147d690 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/rxml-0.8.2.crate diff --git a/rust-rxml.spec b/rust-rxml.spec new file mode 100644 index 0000000..4e18b5a --- /dev/null +++ b/rust-rxml.spec @@ -0,0 +1,193 @@ +# Generated by rust2rpm 23 +%bcond_without check +%global debug_package %{nil} + +%global crate rxml + +Name: rust-rxml +Version: 0.8.2 +Release: %autorelease +Summary: Minimalistic, restricted XML 1.0 parser which does not include dangerous XML features + +License: MIT +URL: https://crates.io/crates/rxml +Source: %{crates_source} +# Manually created patch for downstream crate metadata changes +# - disable criterion +# - bump smartstring dependency to 1.0 +Patch: rxml-fix-metadata.diff + +BuildRequires: rust-packaging >= 21 + +%global _description %{expand: +Minimalistic, restricted XML 1.0 parser which does not include dangerous XML +features.} + +%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}/COPYING +%doc %{crate_instdir}/README.md +%{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}+async-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+async-devel %{_description} + +This package contains library source intended for building other packages which +use the "async" feature of the "%{crate}" crate. + +%files -n %{name}+async-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+futures-core-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+futures-core-devel %{_description} + +This package contains library source intended for building other packages which +use the "futures-core" feature of the "%{crate}" crate. + +%files -n %{name}+futures-core-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+macros-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+macros-devel %{_description} + +This package contains library source intended for building other packages which +use the "macros" feature of the "%{crate}" crate. + +%files -n %{name}+macros-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+mt-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+mt-devel %{_description} + +This package contains library source intended for building other packages which +use the "mt" feature of the "%{crate}" crate. + +%files -n %{name}+mt-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+pin-project-lite-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+pin-project-lite-devel %{_description} + +This package contains library source intended for building other packages which +use the "pin-project-lite" feature of the "%{crate}" crate. + +%files -n %{name}+pin-project-lite-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+rxml_proc-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+rxml_proc-devel %{_description} + +This package contains library source intended for building other packages which +use the "rxml_proc" feature of the "%{crate}" crate. + +%files -n %{name}+rxml_proc-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+shared_ns-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+shared_ns-devel %{_description} + +This package contains library source intended for building other packages which +use the "shared_ns" feature of the "%{crate}" crate. + +%files -n %{name}+shared_ns-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+stream-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+stream-devel %{_description} + +This package contains library source intended for building other packages which +use the "stream" feature of the "%{crate}" crate. + +%files -n %{name}+stream-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+tokio-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+tokio-devel %{_description} + +This package contains library source intended for building other packages which +use the "tokio" feature of the "%{crate}" crate. + +%files -n %{name}+tokio-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+weak-table-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+weak-table-devel %{_description} + +This package contains library source intended for building other packages which +use the "weak-table" feature of the "%{crate}" crate. + +%files -n %{name}+weak-table-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/rxml-fix-metadata.diff b/rxml-fix-metadata.diff new file mode 100644 index 0000000..7188883 --- /dev/null +++ b/rxml-fix-metadata.diff @@ -0,0 +1,22 @@ +--- rxml-0.8.2/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ rxml-0.8.2/Cargo.toml 2022-12-20T20:32:31.897792+00:00 +@@ -56,7 +56,7 @@ + version = "^0.8.0" + + [dependencies.smartstring] +-version = "^0.2" ++version = "^1.0" + + [dependencies.tokio] + version = "^1" +@@ -66,10 +66,6 @@ + [dependencies.weak-table] + version = "^0.3" + optional = true +- +-[dev-dependencies.criterion] +-version = "^0.3" +-features = ["html_reports"] + + [dev-dependencies.tokio] + version = "^1" diff --git a/sources b/sources new file mode 100644 index 0000000..c993a65 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (rxml-0.8.2.crate) = 43679b7af2aa022a6d941ab018a950dfc39e22d790d8946d636be03ecb2a3401a09eceeb76c4eb7aad4f7da4e8c0b8dc4a4ada8fa11bf53befd9b17ba947c64c