libimagequant/libimagequant.spec

77 lines
2.0 KiB
RPMSpec
Raw Permalink Normal View History

Name: libimagequant
Version: 4.2.0
Release: 1mamba
Summary: Palette quantization library that powers pngquant and other PNG optimizers
Group: System/Libraries
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://pngquant.org/lib/
Source: https://github.com/ImageOptim/libimagequant.git/%{version}/libimagequant-%{version}.tar.bz2
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libgcc
## AUTOBUILDREQ-END
BuildRequires: rustc
BuildRequires: cargo-c
%description
Palette quantization library that powers pngquant and other PNG optimizers.
%package devel
Group: Development/Libraries
Summary: Development files for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires: pkg-config
%description devel
This package contains libraries and header files for developing applications that use %{name}.
%package tools
Group: Applications/Graphics
Summary: Utility applications for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description tools
This package contains utility applications for %{name}.
%debug_package
%prep
%setup -q
%build
cd imagequant-sys
cargo fetch
cargo cbuild --release --prefix=%{_prefix}
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
cd imagequant-sys
cargo cinstall --destdir=%{buildroot} --prefix=%{_prefix} --libdir=%{_libdir} --release
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%{_libdir}/libimagequant.so.*
%doc COPYRIGHT
%files devel
%defattr(-,root,root)
%{_includedir}/libimagequant.h
%{_libdir}/libimagequant.a
%{_libdir}/libimagequant.so
%{_libdir}/pkgconfig/imagequant.pc
%doc README.md
%changelog
* Sat Nov 26 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 4.0.4-1mamba
- package created using the webbuild interface