libimagequant/libimagequant.spec
Dr. Werner Fink bf409232b6 Accepting request 702787 from home:marxin:branches:graphics
- Add gcc9-Update-const-var-openmp-const-var-handling.patch in order
  to handle boo#1134979.

OBS-URL: https://build.opensuse.org/request/show/702787
OBS-URL: https://build.opensuse.org/package/show/graphics/libimagequant?expand=0&rev=7
2019-05-20 06:16:11 +00:00

83 lines
2.4 KiB
RPMSpec

#
# spec file for package libimagequant
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define sover 0
%define libname %{name}%{sover}
Name: libimagequant
Version: 2.12.2
Release: 0
Summary: Palette quantization library
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
Url: https://pngquant.org/lib/
Source: https://github.com/ImageOptim/libimagequant/archive/%{version}/%{name}-%{version}.tar.gz
Patch0: gcc9-Update-const-var-openmp-const-var-handling.patch
BuildRequires: pkgconfig
BuildRequires: pkgconfig(lcms2)
%description
C library for conversion of RGBA images to 8-bit indexed-color
(palette) images.
%package -n %{libname}
Summary: Palette quantization library
Group: System/Libraries
%description -n %{libname}
C library for conversion of RGBA images to 8-bit indexed-color
(palette) images.
%package devel
Summary: Development files for libimagequant
Group: Development/Languages/C and C++
Requires: %{libname} = %{version}
%description devel
C library for conversion of RGBA images to 8-bit indexed-color
(palette) images.
%prep
%setup -q
%patch0 -p1
%build
# This is not an autoconf configure, but the script simply ignores parameters it does not know
%configure --with-openmp
make %{?_smp_mflags}
%install
%make_install
# work around --disable-static not working
find %{buildroot} \( -name '*.a' -o -name '*.la' \) -print -delete
%post -n libimagequant0 -p /sbin/ldconfig
%postun -n libimagequant0 -p /sbin/ldconfig
%files -n libimagequant0
%doc README.md CHANGELOG
%license COPYRIGHT
%{_libdir}/%{name}.so.*
%files devel
%{_libdir}/%{name}.so
%{_includedir}/%{name}.h
%{_libdir}/pkgconfig/imagequant.pc
%changelog