From 7b66beb2aede5d72efacbaab45d3ef1d7598b555 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Fri, 19 Jan 2024 20:31:22 +0100 Subject: [PATCH] Initial import (which 4 compat package) --- .gitignore | 1 + README.md | 3 -- rust-which4.spec | 84 ++++++++++++++++++++++++++++++++++++ sources | 1 + which-fix-metadata-auto.diff | 8 ++++ 5 files changed, 94 insertions(+), 3 deletions(-) create mode 100644 .gitignore delete mode 100644 README.md create mode 100644 rust-which4.spec create mode 100644 sources create mode 100644 which-fix-metadata-auto.diff diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..730adf8 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/which-4.4.2.crate diff --git a/README.md b/README.md deleted file mode 100644 index bd5168f..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# rust-which4 - -The rust-which4 package diff --git a/rust-which4.spec b/rust-which4.spec new file mode 100644 index 0000000..430c342 --- /dev/null +++ b/rust-which4.spec @@ -0,0 +1,84 @@ +# Generated by rust2rpm 25 +%bcond_without check +%global debug_package %{nil} + +%global crate which + +Name: rust-which4 +Version: 4.4.2 +Release: %autorelease +Summary: Rust equivalent of Unix command "which" + +License: MIT +URL: https://crates.io/crates/which +Source: %{crates_source} +# Automatically generated patch to strip dependencies and normalize metadata +Patch: which-fix-metadata-auto.diff + +BuildRequires: cargo-rpm-macros >= 24 + +%global _description %{expand: +A Rust equivalent of Unix command "which". Locate installed executable +in cross platforms.} + +%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.txt +%doc %{crate_instdir}/CHANGELOG.md +%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}+regex-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+regex-devel %{_description} + +This package contains library source intended for building other packages which +use the "regex" feature of the "%{crate}" crate. + +%files -n %{name}+regex-devel +%ghost %{crate_instdir}/Cargo.toml + +%prep +%autosetup -n %{crate}-%{version} -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..2cecb7d --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (which-4.4.2.crate) = 2d12aa1d4c2dbc140e39c8f15bd4ee1eeb8e8de71bcdf579479ef4be860fb0839eaf4cdb818addba242d50420f6e08acaf2bfc979a889e092c83644819246fd5 diff --git a/which-fix-metadata-auto.diff b/which-fix-metadata-auto.diff new file mode 100644 index 0000000..7e8ba11 --- /dev/null +++ b/which-fix-metadata-auto.diff @@ -0,0 +1,8 @@ +--- which-4.4.2/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ which-4.4.2/Cargo.toml 2024-01-19T19:30:28.339537+00:00 +@@ -55,5 +55,3 @@ + [target."cfg(any(windows, unix, target_os = \"redox\"))".dependencies.home] + version = "0.5.5" + +-[target."cfg(windows)".dependencies.once_cell] +-version = "1"