From f27cc05ace689e8754745102531df2709bb73c64 Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Fri, 20 Dec 2024 15:28:45 +0300 Subject: [PATCH] import rust-exr-1.73.0-1.el10 --- .gitignore | 1 + .rust-exr.metadata | 1 + SOURCES/rust2rpm.toml | 37 +++++++++++++ SPECS/rust-exr.spec | 118 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 157 insertions(+) create mode 100644 .gitignore create mode 100644 .rust-exr.metadata create mode 100644 SOURCES/rust2rpm.toml create mode 100644 SPECS/rust-exr.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..11eb7b3 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/exr-1.73.0.crate diff --git a/.rust-exr.metadata b/.rust-exr.metadata new file mode 100644 index 0000000..dd73943 --- /dev/null +++ b/.rust-exr.metadata @@ -0,0 +1 @@ +b9717d2490b7385a92d17eeb8e884a61cc49002b SOURCES/exr-1.73.0.crate diff --git a/SOURCES/rust2rpm.toml b/SOURCES/rust2rpm.toml new file mode 100644 index 0000000..558d48b --- /dev/null +++ b/SOURCES/rust2rpm.toml @@ -0,0 +1,37 @@ +[requires] +build = [ + "dos2unix", + "tomcli", +] + +[scripts] +prep.post = [ + "# fix CRLF line endings in source files: https://github.com/johannesvollmer/exrs/issues/239", + "find . -type f \\( -name '*.md' -o -name '*.rs' \\) -execdir dos2unix --keepdate '{}' '+'", + "# Do not depend on bencher; it is needed only for benchmarks.", + "tomcli set Cargo.toml del dev-dependencies.bencher", + "# Avoid a circular dependency on image.", + "tomcli set Cargo.toml del dev-dependencies.image", + "# These are the tests and examples that would have required the image crate.", + "rm tests/across_compression.rs", + "rm examples/6_extract_mip_map_pngs.rs", + "rm examples/1b_convert_exr_to_png.rs", + "rm examples/7_crop_alpha_rgba.rs", + "rm examples/7_crop_alpha_any_image.rs", + "rm examples/5b_extract_exr_layers_as_pngs.rs", +] + +[tests] +skip = [ + "compression::b44::test::border_on_multiview", + "image::validate_results::test_value_result::test_error", + "compare_compression_contents_", + "compare_png_to_", + "damaged", + "fuzzed", + "roundtrip_all_files_in_repository_x4", +] +comments = [ + "skip tests which require test data that is not included in published crates", +] + diff --git a/SPECS/rust-exr.spec b/SPECS/rust-exr.spec new file mode 100644 index 0000000..456556d --- /dev/null +++ b/SPECS/rust-exr.spec @@ -0,0 +1,118 @@ +## START: Set by rpmautospec +## (rpmautospec version 0.7.3) +## RPMAUTOSPEC: autorelease, autochangelog +%define autorelease(e:s:pb:n) %{?-p:0.}%{lua: + release_number = 1; + base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); + print(release_number + base_release_number - 1); +}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} +## END: Set by rpmautospec + +# Generated by rust2rpm 26 +%bcond_without check +%global debug_package %{nil} + +%global crate exr + +Name: rust-exr +Version: 1.73.0 +Release: %autorelease +Summary: Read and write OpenEXR files without any unsafe code + +License: BSD-3-Clause +URL: https://crates.io/crates/exr +Source: %{crates_source} + +BuildRequires: cargo-rpm-macros >= 24 +BuildRequires: dos2unix +BuildRequires: tomcli + +%global _description %{expand: +Read and write OpenEXR files without any unsafe code.} + +%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.md +%doc %{crate_instdir}/CONTRIBUTORS.md +%doc %{crate_instdir}/GUIDE.md +%doc %{crate_instdir}/README.md +%doc %{crate_instdir}/releasing.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} -p1 +%cargo_prep +# fix CRLF line endings in source files: https://github.com/johannesvollmer/exrs/issues/239 +find . -type f \( -name '*.md' -o -name '*.rs' \) -execdir dos2unix --keepdate '{}' '+' +# Do not depend on bencher; it is needed only for benchmarks. +tomcli set Cargo.toml del dev-dependencies.bencher +# Avoid a circular dependency on image. +tomcli set Cargo.toml del dev-dependencies.image +# These are the tests and examples that would have required the image crate. +rm tests/across_compression.rs +rm examples/6_extract_mip_map_pngs.rs +rm examples/1b_convert_exr_to_png.rs +rm examples/7_crop_alpha_rgba.rs +rm examples/7_crop_alpha_any_image.rs +rm examples/5b_extract_exr_layers_as_pngs.rs + +%generate_buildrequires +%cargo_generate_buildrequires + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%ifarch s390x +# * skip tests which require test data that is not included in published crates +# * skip a test that is an expected failure on big-endian architectures +%cargo_test -- -- --skip compression::b44::test::border_on_multiview --skip image::validate_results::test_value_result::test_error --skip compare_compression_contents_ --skip compare_png_to_ --skip damaged --skip fuzzed --skip roundtrip_all_files_in_repository_x4 --skip pxr24_expect_error_on_big_endian +%else +# * skip tests which require test data that is not included in published crates +%cargo_test -- -- --skip compression::b44::test::border_on_multiview --skip image::validate_results::test_value_result::test_error --skip compare_compression_contents_ --skip compare_png_to_ --skip damaged --skip fuzzed --skip roundtrip_all_files_in_repository_x4 +%endif +%endif + +%changelog +* Fri Dec 20 2024 MSVSphere Packaging Team - 1.73.0-1 +- Rebuilt for MSVSphere 10 + +## START: Generated by rpmautospec +* Tue Nov 05 2024 Fabio Valentini - 1.73.0-1 +- Update to version 1.73.0; Fixes RHBZ#2322909 + +* Sun Sep 15 2024 Benjamin A. Beasley - 1.72.0-3 +- Avoid a circular dependency on image + +* Sun Sep 15 2024 Benjamin A. Beasley - 1.72.0-2 +- Drop benchmark-only dev-dependency on bencher + +* Sun Aug 04 2024 Fabio Valentini - 1.72.0-1 +- Initial import (#2297646) +## END: Generated by rpmautospec