From 5efc641b5233424722eba4bdcbbe342b65765685 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Sun, 21 Aug 2022 22:17:30 +0200 Subject: [PATCH] Initial import (tiff 0.6 compat package) --- .gitignore | 4 +++ README.md | 3 -- rust-tiff0.6.spec | 76 ++++++++++++++++++++++++++++++++++++++++++ sources | 1 + tiff-fix-metadata.diff | 14 ++++++++ 5 files changed, 95 insertions(+), 3 deletions(-) create mode 100644 .gitignore delete mode 100644 README.md create mode 100644 rust-tiff0.6.spec create mode 100644 sources create mode 100644 tiff-fix-metadata.diff diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1988990 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +/results_*/ +/*.src.rpm + +/tiff-0.6.1.crate diff --git a/README.md b/README.md deleted file mode 100644 index dd9bc94..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# rust-tiff0.6 - -The rust-tiff0.6 package diff --git a/rust-tiff0.6.spec b/rust-tiff0.6.spec new file mode 100644 index 0000000..544a425 --- /dev/null +++ b/rust-tiff0.6.spec @@ -0,0 +1,76 @@ +# Generated by rust2rpm 22 +%bcond_without check +%global debug_package %{nil} + +%global crate tiff + +Name: rust-tiff0.6 +Version: 0.6.1 +Release: %autorelease +Summary: TIFF decoding and encoding library in pure Rust + +License: MIT +URL: https://crates.io/crates/tiff +Source: %{crates_source} +# Manually created patch for downstream crate metadata changes +# * drop unused, benchmark-only criterion dev-dependency to speed up builds +# * bump miniz_oxide from 0.4.1 to 0.5 +Patch: tiff-fix-metadata.diff + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging >= 21 + +%global _description %{expand: +TIFF decoding and encoding library in pure Rust.} + +%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 + +%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 +# * files for unit / integration tests are not included in published crates +%cargo_test -- --doc +%endif + +%changelog +%autochangelog diff --git a/sources b/sources new file mode 100644 index 0000000..abdafd4 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (tiff-0.6.1.crate) = ece5aaef610e0a7bcdea8c40571d497cd3ec79931e25129060b4f51cb40a28ef03fc131494bc841fa5b08eaa49a5acbc9332553cbc542019f1ec5eb5945d3538 diff --git a/tiff-fix-metadata.diff b/tiff-fix-metadata.diff new file mode 100644 index 0000000..d499f29 --- /dev/null +++ b/tiff-fix-metadata.diff @@ -0,0 +1,14 @@ +--- tiff-0.6.1/Cargo.toml 2020-12-12T19:23:19+00:00 ++++ tiff-0.6.1/Cargo.toml 2022-08-21T11:12:33.539697+00:00 +@@ -29,10 +29,7 @@ + package = "jpeg-decoder" + + [dependencies.miniz_oxide] +-version = "0.4.1" +-features = ["no_extern_crate_alloc"] ++version = "0.5" + + [dependencies.weezl] + version = "0.1.0" +-[dev-dependencies.criterion] +-version = "0.3.1"