diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2e6a259 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/exr-1.72.0.crate diff --git a/README.md b/README.md deleted file mode 100644 index 5bbef1c..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# rust-exr - -The rust-exr package diff --git a/rust-exr.spec b/rust-exr.spec new file mode 100644 index 0000000..e23d759 --- /dev/null +++ b/rust-exr.spec @@ -0,0 +1,81 @@ +# Generated by rust2rpm 26 +%bcond_without check +%global debug_package %{nil} + +%global crate exr + +Name: rust-exr +Version: 1.72.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 + +%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 '{}' '+' + +%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 +%autochangelog diff --git a/rust2rpm.toml b/rust2rpm.toml new file mode 100644 index 0000000..d7c80ea --- /dev/null +++ b/rust2rpm.toml @@ -0,0 +1,23 @@ +[requires] +build = ["dos2unix"] + +[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 '{}' '+'", +] + +[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/sources b/sources new file mode 100644 index 0000000..975a83b --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (exr-1.72.0.crate) = eeab15189ca6801d3b3748c88395de9d2a3fd970f182f70bd39ff7dbc960bd27d06191a42d1a5cb895a334787f18dd3ff31af74d223419e1845396a5f696dd1c