From 5b5d0e155249b77d5a2816fd7533a19cf8bf128a Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Fri, 20 Dec 2024 16:01:39 +0300 Subject: [PATCH] import rust-imagequant-sys-4.0.3-5.el10 --- .gitignore | 1 + .rust-imagequant-sys.metadata | 1 + ...ersion_suffix_components-for-recent-.patch | 25 +++ SOURCES/README.md | 3 + SPECS/rust-imagequant-sys.spec | 188 ++++++++++++++++++ 5 files changed, 218 insertions(+) create mode 100644 .gitignore create mode 100644 .rust-imagequant-sys.metadata create mode 100644 SOURCES/0001-explicitly-set-version_suffix_components-for-recent-.patch create mode 100644 SOURCES/README.md create mode 100644 SPECS/rust-imagequant-sys.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e2d08d3 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/imagequant-sys-4.0.3.crate diff --git a/.rust-imagequant-sys.metadata b/.rust-imagequant-sys.metadata new file mode 100644 index 0000000..aa8613e --- /dev/null +++ b/.rust-imagequant-sys.metadata @@ -0,0 +1 @@ +8b19fdd468b80cb2ffc16d1d6f0ffdf09e313a30 SOURCES/imagequant-sys-4.0.3.crate diff --git a/SOURCES/0001-explicitly-set-version_suffix_components-for-recent-.patch b/SOURCES/0001-explicitly-set-version_suffix_components-for-recent-.patch new file mode 100644 index 0000000..2ac9547 --- /dev/null +++ b/SOURCES/0001-explicitly-set-version_suffix_components-for-recent-.patch @@ -0,0 +1,25 @@ +From c4bfd7479fbbfac1915eedbdbbace2bb36abf3bd Mon Sep 17 00:00:00 2001 +From: Fabio Valentini +Date: Tue, 5 Dec 2023 12:32:48 +0100 +Subject: [PATCH] explicitly set version_suffix_components for recent cargo-c + versions + +--- + Cargo.toml | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Cargo.toml b/Cargo.toml +index 55ffb97..c854871 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -55,6 +55,7 @@ from = "libimagequant.h" + [package.metadata.capi.library] + name = "imagequant" + version = "0.0.4" ++version_suffix_components = 1 + + [package.metadata.capi.pkg_config] + description = "Convert 24/32-bit images to 8-bit palette with alpha channel." +-- +2.43.0 + diff --git a/SOURCES/README.md b/SOURCES/README.md new file mode 100644 index 0000000..026b4be --- /dev/null +++ b/SOURCES/README.md @@ -0,0 +1,3 @@ +# rust-imagequant-sys + +The rust-imagequant-sys package diff --git a/SPECS/rust-imagequant-sys.spec b/SPECS/rust-imagequant-sys.spec new file mode 100644 index 0000000..d2bc207 --- /dev/null +++ b/SPECS/rust-imagequant-sys.spec @@ -0,0 +1,188 @@ +## START: Set by rpmautospec +## (rpmautospec version 0.7.3) +## RPMAUTOSPEC: autorelease, autochangelog +%define autorelease(e:s:pb:n) %{?-p:0.}%{lua: + release_number = 5; + 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 25 +%bcond_without check + +# C library name +%global lib libimagequant +%global crate imagequant-sys + +Name: rust-imagequant-sys +Version: 4.0.3 +Release: %autorelease +Summary: Convert 24/32-bit images to 8-bit palette with alpha channel + +License: GPL-3.0-or-later +URL: https://crates.io/crates/imagequant-sys +Source: %{crates_source} +# * compatibility fixes for cargo-c v0.9.26 and newer: +# https://github.com/lu-zero/cargo-c/pull/346 +# https://github.com/lu-zero/cargo-c/pull/352 +Patch: 0001-explicitly-set-version_suffix_components-for-recent-.patch + +BuildRequires: cargo-rpm-macros >= 24 + +%global _description %{expand: +Convert 24/32-bit images to 8-bit palette with alpha channel. C API/FFI +libimagequant that powers pngquant lossy PNG compressor. Dual-licensed +like pngquant. See https://pngquant.org for details.} + +%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}/COPYRIGHT +%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}+capi-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+capi-devel %{_description} + +This package contains library source intended for building other packages which +use the "capi" feature of the "%{crate}" crate. + +%files -n %{name}+capi-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+threads-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+threads-devel %{_description} + +This package contains library source intended for building other packages which +use the "threads" feature of the "%{crate}" crate. + +%files -n %{name}+threads-devel +%ghost %{crate_instdir}/Cargo.toml + +# C library packages + +%package -n %{lib} +Summary: %{summary} +# Apache-2.0 +# GPL-3.0-or-later +# MIT +# MIT OR Apache-2.0 +# Zlib OR Apache-2.0 OR MIT +License: Apache-2.0 AND GPL-3.0-or-later AND MIT +# LICENSE.dependencies contains a full license breakdown +Obsoletes: libimagequant < 4.0.0 +Provides: libimagequant%{_isa} = %{version}-%{release} + +%description -n %{lib} %{_description} + +%files -n %{lib} +%license COPYRIGHT +%license LICENSE.dependencies +%doc README.md +%{_libdir}/%{lib}.so.0{,.*} + +%package -n %{lib}-devel +Summary: Development files for %{lib} +Requires: %{lib}%{?_isa} = %{version}-%{release} +Obsoletes: libimagequant-devel < 4.0.0 +Provides: libimagequant-devel%{_isa} = %{version}-%{release} + +%description -n %{lib}-devel %{_description} + +The %{lib}-devel package contains libraries and header files for +developing applications that use %{lib}. + +%files -n %{lib}-devel +%{_includedir}/%{lib}.h +%{_libdir}/%{lib}.so +%{_libdir}/pkgconfig/imagequant.pc + +%prep +%autosetup -n %{crate}-%{version} -p1 +%cargo_prep + +%generate_buildrequires +%cargo_generate_buildrequires +# Dependency for building C shared library +echo "cargo-c" + +%build +%cargo_build +%cargo_cbuild +%{cargo_license_summary} +%{cargo_license} > LICENSE.dependencies + +%install +%cargo_install +%cargo_cinstall +# Don't ship static library +rm -f %{buildroot}%{_libdir}/%{lib}.a + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +* Fri Dec 20 2024 MSVSphere Packaging Team - 4.0.3-5 +- Rebuilt for MSVSphere 10 + +## START: Generated by rpmautospec +* Sat Aug 10 2024 blinxen - 4.0.3-5 +- Rebuild for libimagequant + +* Fri Jul 19 2024 Fedora Release Engineering - 4.0.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Fri Jan 26 2024 Fedora Release Engineering - 4.0.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Tue Dec 05 2023 Fabio Valentini - 4.0.3-2 +- Compatibility fixes for cargo-c v0.9.26 and newer + +* Sun Oct 22 2023 blinxen - 4.0.3-1 +- Update to version 4.0.3 (rhbz#2238259) + +* Fri Jul 21 2023 Fedora Release Engineering - 4.0.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Fri Mar 10 2023 blinxen - 4.0.1-4 +- Rebuild (rust-imagequant 4.1.1) + +* Sat Mar 04 2023 Sandro Mani - 4.0.1-3 +- Add Obsoletes/Provides for libimagequant + +* Fri Mar 03 2023 blinxen - 4.0.1-2 +- [skip changelog] Bump release + +* Fri Mar 03 2023 blinxen - 4.0.1-1 +- Initial package +## END: Generated by rpmautospec