From 08534d6f7da8bef5c04c5d5dca2c91cca47183f4 Mon Sep 17 00:00:00 2001 From: blinxen Date: Tue, 17 Oct 2023 18:36:26 +0200 Subject: [PATCH] Initial package (rhbz#2244311) --- .gitignore | 2 + README.md | 3 - nucleo-matcher-fix-metadata.diff | 23 +++++++ rust-nucleo-matcher.spec | 111 +++++++++++++++++++++++++++++++ sources | 2 + 5 files changed, 138 insertions(+), 3 deletions(-) create mode 100644 .gitignore delete mode 100644 README.md create mode 100644 nucleo-matcher-fix-metadata.diff create mode 100644 rust-nucleo-matcher.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..da3a5f6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/nucleo-matcher-0.2.0.crate +/LICENSE diff --git a/README.md b/README.md deleted file mode 100644 index 8cefbc4..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# rust-nucleo-matcher - -The rust-nucleo-matcher package diff --git a/nucleo-matcher-fix-metadata.diff b/nucleo-matcher-fix-metadata.diff new file mode 100644 index 0000000..05d69ad --- /dev/null +++ b/nucleo-matcher-fix-metadata.diff @@ -0,0 +1,23 @@ +--- nucleo-matcher-0.2.0/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ nucleo-matcher-0.2.0/Cargo.toml 2023-10-15T18:17:53.413069+00:00 +@@ -19,20 +19,12 @@ + license = "MPL-2.0" + repository = "https://github.com/helix-editor/nucleo" + +-[dependencies.cov-mark] +-version = "1.1.0" +-default-features = false +- + [dependencies.memchr] + version = "2.5.0" + + [dependencies.unicode-segmentation] + version = "1.10" + optional = true +- +-[dev-dependencies.cov-mark] +-version = "1.1.0" +-default-features = true + + [features] + default = [ diff --git a/rust-nucleo-matcher.spec b/rust-nucleo-matcher.spec new file mode 100644 index 0000000..b23d2b6 --- /dev/null +++ b/rust-nucleo-matcher.spec @@ -0,0 +1,111 @@ +# Generated by rust2rpm 25 +%bcond_without check +%global debug_package %{nil} + +%global crate nucleo-matcher + +Name: rust-nucleo-matcher +Version: 0.2.0 +Release: %autorelease +Summary: Plug and play high performance fuzzy matcher + +License: MPL-2.0 +URL: https://crates.io/crates/nucleo-matcher +Source: %{crates_source} +# See https://github.com/helix-editor/nucleo/pull/28 +Source1: https://raw.githubusercontent.com/helix-editor/nucleo/nucleo-v%{version}/LICENSE +# Manually created patch for downstream crate metadata changes +# * Drop unused dependency (see https://github.com/helix-editor/nucleo/pull/29) +Patch: nucleo-matcher-fix-metadata.diff + +BuildRequires: cargo-rpm-macros >= 24 + +%global _description %{expand: +Plug and play high performance fuzzy matcher.} + +%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 +%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}+unicode-casefold-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+unicode-casefold-devel %{_description} + +This package contains library source intended for building other packages which +use the "unicode-casefold" feature of the "%{crate}" crate. + +%files -n %{name}+unicode-casefold-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+unicode-normalization-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+unicode-normalization-devel %{_description} + +This package contains library source intended for building other packages which +use the "unicode-normalization" feature of the "%{crate}" crate. + +%files -n %{name}+unicode-normalization-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+unicode-segmentation-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+unicode-segmentation-devel %{_description} + +This package contains library source intended for building other packages which +use the "unicode-segmentation" feature of the "%{crate}" crate. + +%files -n %{name}+unicode-segmentation-devel +%ghost %{crate_instdir}/Cargo.toml + +%prep +%autosetup -n %{crate}-%{version} -p1 +# Add license file +cp %{SOURCE1} . +%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..d606279 --- /dev/null +++ b/sources @@ -0,0 +1,2 @@ +SHA512 (nucleo-matcher-0.2.0.crate) = d2c685201e9235bcdfd55b3b49f627e48fcd461890e2ffc59d0fb958a05cd6440e44faec705e18e8c76bf0e4c0a16ec1cedfedc023235fbbb3a599b88900140b +SHA512 (LICENSE) = c1e3a0c8f5267fb5c0b65733bda037c62d914ed989bee0f510d8196b1029eec00d40f415ce1514a4996d420ba02d856d04db0915b64573ef4a36033cc5efb94e