From dc635a8c53590e4c021a10cccee1b62229265fb1 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Sun, 21 Aug 2022 22:21:14 +0200 Subject: [PATCH] Initial import (image 0.23 compat package) --- .gitignore | 1 + README.md | 3 - image-fix-metadata.diff | 12 ++ rust-image0.23.spec | 256 ++++++++++++++++++++++++++++++++++++++++ rust2rpm.conf | 11 ++ sources | 1 + 6 files changed, 281 insertions(+), 3 deletions(-) create mode 100644 .gitignore delete mode 100644 README.md create mode 100644 image-fix-metadata.diff create mode 100644 rust-image0.23.spec create mode 100644 rust2rpm.conf create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..567dfa0 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/image-0.23.14.crate diff --git a/README.md b/README.md deleted file mode 100644 index cfed195..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# rust-image0.23 - -The rust-image0.23 package diff --git a/image-fix-metadata.diff b/image-fix-metadata.diff new file mode 100644 index 0000000..42001fe --- /dev/null +++ b/image-fix-metadata.diff @@ -0,0 +1,12 @@ +--- image-0.23.14/Cargo.toml 1970-01-01T00:00:00+00:00 ++++ image-0.23.14/Cargo.toml 2022-08-21T11:34:05.320445+00:00 +@@ -104,9 +104,6 @@ + [dev-dependencies.crc32fast] + version = "1.2.0" + +-[dev-dependencies.criterion] +-version = "0.3" +- + [dev-dependencies.glob] + version = "0.3" + diff --git a/rust-image0.23.spec b/rust-image0.23.spec new file mode 100644 index 0000000..afcd54c --- /dev/null +++ b/rust-image0.23.spec @@ -0,0 +1,256 @@ +# Generated by rust2rpm 22 +%bcond_without check +%global debug_package %{nil} + +%global crate image + +Name: rust-image0.23 +Version: 0.23.14 +Release: %autorelease +Summary: Imaging library written in Rust + +License: MIT +URL: https://crates.io/crates/image +Source: %{crates_source} +# Manually created patch for downstream crate metadata changes +# * drop unused, benchmark-only criterion dev-dependency to speed up builds +Patch: image-fix-metadata.diff + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging >= 21 + +%global _description %{expand: +Imaging library written in Rust. Provides basic filters and decoders for the +most common image formats.} + +%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}/CHANGES.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}+bmp-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+bmp-devel %{_description} + +This package contains library source intended for building other packages which +use the "bmp" feature of the "%{crate}" crate. + +%files -n %{name}+bmp-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+dds-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+dds-devel %{_description} + +This package contains library source intended for building other packages which +use the "dds" feature of the "%{crate}" crate. + +%files -n %{name}+dds-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+dxt-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+dxt-devel %{_description} + +This package contains library source intended for building other packages which +use the "dxt" feature of the "%{crate}" crate. + +%files -n %{name}+dxt-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+farbfeld-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+farbfeld-devel %{_description} + +This package contains library source intended for building other packages which +use the "farbfeld" feature of the "%{crate}" crate. + +%files -n %{name}+farbfeld-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+gif-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+gif-devel %{_description} + +This package contains library source intended for building other packages which +use the "gif" feature of the "%{crate}" crate. + +%files -n %{name}+gif-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+hdr-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+hdr-devel %{_description} + +This package contains library source intended for building other packages which +use the "hdr" feature of the "%{crate}" crate. + +%files -n %{name}+hdr-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+ico-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+ico-devel %{_description} + +This package contains library source intended for building other packages which +use the "ico" feature of the "%{crate}" crate. + +%files -n %{name}+ico-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+jpeg-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+jpeg-devel %{_description} + +This package contains library source intended for building other packages which +use the "jpeg" feature of the "%{crate}" crate. + +%files -n %{name}+jpeg-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+jpeg_rayon-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+jpeg_rayon-devel %{_description} + +This package contains library source intended for building other packages which +use the "jpeg_rayon" feature of the "%{crate}" crate. + +%files -n %{name}+jpeg_rayon-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+png-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+png-devel %{_description} + +This package contains library source intended for building other packages which +use the "png" feature of the "%{crate}" crate. + +%files -n %{name}+png-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+pnm-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+pnm-devel %{_description} + +This package contains library source intended for building other packages which +use the "pnm" feature of the "%{crate}" crate. + +%files -n %{name}+pnm-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+scoped_threadpool-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+scoped_threadpool-devel %{_description} + +This package contains library source intended for building other packages which +use the "scoped_threadpool" feature of the "%{crate}" crate. + +%files -n %{name}+scoped_threadpool-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+tga-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+tga-devel %{_description} + +This package contains library source intended for building other packages which +use the "tga" feature of the "%{crate}" crate. + +%files -n %{name}+tga-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+tiff-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+tiff-devel %{_description} + +This package contains library source intended for building other packages which +use the "tiff" feature of the "%{crate}" crate. + +%files -n %{name}+tiff-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+webp-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+webp-devel %{_description} + +This package contains library source intended for building other packages which +use the "webp" feature of the "%{crate}" crate. + +%files -n %{name}+webp-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 +# * skip tests with missing test files (not included in published crates) +%cargo_test -- -- --skip codecs::bmp::decoder::test::read_rect --skip codecs::png::tests::ensure_no_decoder_off_by_one --skip codecs::png::tests::underlying_error --skip dynimage::test::image_dimensions --skip dynimage::test::open_16bpc_png --skip imageops::sample::tests::resize_transparent_image +%endif + +%changelog +%autochangelog diff --git a/rust2rpm.conf b/rust2rpm.conf new file mode 100644 index 0000000..5516778 --- /dev/null +++ b/rust2rpm.conf @@ -0,0 +1,11 @@ +[DEFAULT] +unwanted-features = + dav1d + dcv-color-primitives + mp4parse + ravif + rgb + avif + avif-decoder + avif-encoder + benchmarks diff --git a/sources b/sources new file mode 100644 index 0000000..aae261a --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (image-0.23.14.crate) = 4eb07fd698c2d902979ab06ae0baef4a53db74da78493c45f0c32d5903c5399cb8a1a25a2e89bf504ffb612e8153eaba4ae41df3d17f02c27e7991fdca518f63