From 4261ae2ec8d922c9054e4170cb5763c42ae007b9 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Fri, 8 Dec 2023 17:54:26 +0100 Subject: [PATCH] Initial import (palette 0.6 compat package) --- .gitignore | 1 + README.md | 3 - palette-fix-metadata.diff | 55 ++++++++++ rust-palette0.6.spec | 207 ++++++++++++++++++++++++++++++++++++++ sources | 1 + 5 files changed, 264 insertions(+), 3 deletions(-) create mode 100644 .gitignore delete mode 100644 README.md create mode 100644 palette-fix-metadata.diff create mode 100644 rust-palette0.6.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c60762a --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/palette-0.6.0.crate diff --git a/README.md b/README.md deleted file mode 100644 index 4a0ede3..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# rust-palette0.6 - -The rust-palette0.6 package diff --git a/palette-fix-metadata.diff b/palette-fix-metadata.diff new file mode 100644 index 0000000..334763b --- /dev/null +++ b/palette-fix-metadata.diff @@ -0,0 +1,55 @@ +--- palette-0.6.0/Cargo.toml 1970-01-01T00:00:00+00:00 ++++ palette-0.6.0/Cargo.toml 2023-12-08T16:45:06.500506+00:00 +@@ -28,20 +28,6 @@ + [lib] + bench = false + +-[[bench]] +-name = "cie_conversion" +-path = "benches/cie.rs" +-harness = false +- +-[[bench]] +-name = "rgb_conversion" +-path = "benches/rgb.rs" +-harness = false +- +-[[bench]] +-name = "matrix" +-path = "benches/matrix.rs" +-harness = false + [dependencies.approx] + version = "0.5" + default-features = false +@@ -58,7 +44,7 @@ + version = "0.6.0" + + [dependencies.phf] +-version = "0.9" ++version = "0.8" + features = ["macros"] + optional = true + default-features = false +@@ -76,10 +62,6 @@ + version = "2" + default-features = false + +-[dev-dependencies.criterion] +-version = "0.3" +-default-features = false +- + [dev-dependencies.csv] + version = "1" + +@@ -90,11 +72,6 @@ + + [dev-dependencies.lazy_static] + version = "1" +- +-[dev-dependencies.rand_mt] +-version = "4" +-features = ["rand-traits"] +-default-features = false + + [dev-dependencies.serde] + version = "1" diff --git a/rust-palette0.6.spec b/rust-palette0.6.spec new file mode 100644 index 0000000..315b0f4 --- /dev/null +++ b/rust-palette0.6.spec @@ -0,0 +1,207 @@ +# Generated by rust2rpm 25 +%bcond_without check +%global debug_package %{nil} + +%global crate palette + +Name: rust-palette0.6 +Version: 0.6.0 +Release: %autorelease +Summary: Convert and manage colors with a focus on correctness, flexibility and ease of use + +License: MIT OR Apache-2.0 +URL: https://crates.io/crates/palette +Source: %{crates_source} +# Manually created patch for downstream crate metadata changes +# * temporarily downgrade phf from 0.9 to 0.8 +# * drop unused rand_mt dev-dependency +# * drop unused, benchmark-only criterion dev-dependency to speed up builds +Patch: palette-fix-metadata.diff + +BuildRequires: cargo-rpm-macros >= 24 + +%global _description %{expand: +Convert and manage colors with a focus on correctness, flexibility and +ease of use.} + +%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}/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}+bytemuck-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+bytemuck-devel %{_description} + +This package contains library source intended for building other packages which +use the "bytemuck" feature of the "%{crate}" crate. + +%files -n %{name}+bytemuck-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+libm-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+libm-devel %{_description} + +This package contains library source intended for building other packages which +use the "libm" feature of the "%{crate}" crate. + +%files -n %{name}+libm-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+named-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+named-devel %{_description} + +This package contains library source intended for building other packages which +use the "named" feature of the "%{crate}" crate. + +%files -n %{name}+named-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+named_from_str-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+named_from_str-devel %{_description} + +This package contains library source intended for building other packages which +use the "named_from_str" feature of the "%{crate}" crate. + +%files -n %{name}+named_from_str-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+named_gradients-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+named_gradients-devel %{_description} + +This package contains library source intended for building other packages which +use the "named_gradients" feature of the "%{crate}" crate. + +%files -n %{name}+named_gradients-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+phf-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+phf-devel %{_description} + +This package contains library source intended for building other packages which +use the "phf" feature of the "%{crate}" crate. + +%files -n %{name}+phf-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+rand-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+rand-devel %{_description} + +This package contains library source intended for building other packages which +use the "rand" feature of the "%{crate}" crate. + +%files -n %{name}+rand-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+random-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+random-devel %{_description} + +This package contains library source intended for building other packages which +use the "random" feature of the "%{crate}" crate. + +%files -n %{name}+random-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}+serializing-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+serializing-devel %{_description} + +This package contains library source intended for building other packages which +use the "serializing" feature of the "%{crate}" crate. + +%files -n %{name}+serializing-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+std-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+std-devel %{_description} + +This package contains library source intended for building other packages which +use the "std" feature of the "%{crate}" crate. + +%files -n %{name}+std-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..07391d4 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (palette-0.6.0.crate) = 541ebb5112651b1d688c26a7b122ccb76fae89a6a6b00e98a6c2b714587ec166f3f97ebe2cb21a5321b406718803d47b6fa1f4df30b55012a8cfb8cd4d7a280e