From 43c7f9b4340b8bbf90af3ba249e205b1880e0506 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Wed, 7 Sep 2022 21:05:46 +0200 Subject: [PATCH] Initial import (#2120005) --- .gitignore | 4 ++ README.md | 3 -- rust-unsafe-libyaml.spec | 74 ++++++++++++++++++++++++++++++++ sources | 1 + unsafe-libyaml-fix-metadata.diff | 10 +++++ 5 files changed, 89 insertions(+), 3 deletions(-) create mode 100644 .gitignore delete mode 100644 README.md create mode 100644 rust-unsafe-libyaml.spec create mode 100644 sources create mode 100644 unsafe-libyaml-fix-metadata.diff diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3aa5c74 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +/results_*/ +/*.src.rpm + +/unsafe-libyaml-0.2.2.crate diff --git a/README.md b/README.md deleted file mode 100644 index d6579de..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# rust-unsafe-libyaml - -The rust-unsafe-libyaml package diff --git a/rust-unsafe-libyaml.spec b/rust-unsafe-libyaml.spec new file mode 100644 index 0000000..99bcd5a --- /dev/null +++ b/rust-unsafe-libyaml.spec @@ -0,0 +1,74 @@ +# Generated by rust2rpm 22 +# * tests can only be run in-tree +%bcond_with check +%global debug_package %{nil} + +%global crate unsafe-libyaml + +Name: rust-unsafe-libyaml +Version: 0.2.2 +Release: %autorelease +Summary: Libyaml transpiled to rust by c2rust + +License: MIT +URL: https://crates.io/crates/unsafe-libyaml +Source: %{crates_source} +# Manually created patch for downstream crate metadata changes +# * skip building unused test binaries +Patch: unsafe-libyaml-fix-metadata.diff + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging >= 21 + +%global _description %{expand: +Libyaml transpiled to rust by c2rust.} + +%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-MIT +%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 + +%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..13e2fd5 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (unsafe-libyaml-0.2.2.crate) = 385fed83536204170f356d3c430e7b898cfd6bd302396a63da119c55c874a5b54d0e54da0d018d7d9dab8361f268d8f645ed87f3406bbc2a07aef3a3f95712c2 diff --git a/unsafe-libyaml-fix-metadata.diff b/unsafe-libyaml-fix-metadata.diff new file mode 100644 index 0000000..591cb3c --- /dev/null +++ b/unsafe-libyaml-fix-metadata.diff @@ -0,0 +1,10 @@ +--- unsafe-libyaml-0.2.2/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ unsafe-libyaml-0.2.2/Cargo.toml 2022-08-20T19:50:31.359289+00:00 +@@ -27,6 +27,7 @@ + license = "MIT" + repository = "https://github.com/dtolnay/unsafe-libyaml" + resolver = "2" ++autobins = false + + [package.metadata.docs.rs] + targets = ["x86_64-unknown-linux-gnu"]