pngquant/pngquant.spec

67 lines
1.9 KiB
RPMSpec

#
# spec file for package pngquant
#
# 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 http://bugs.opensuse.org/
#
Name: pngquant
Version: 2.12.2
Release: 0
Summary: Converts 24/32-bit RGBA PNGs to 8-bit palette with alpha channel preserved
License: GPL-3.0-or-later
Group: Development/Tools/Other
Url: https://pngquant.org/
Source: https://pngquant.org/%{name}-%{version}-src.tar.gz
BuildRequires: pkgconfig
BuildRequires: pkgconfig(imagequant) >= %{version}
BuildRequires: pkgconfig(lcms2)
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(zlib)
%description
pngquant is a command-line utility and a library for lossy compression of PNG images.
The conversion reduces file sizes significantly (often as much as 70%%) and
preserves full alpha transparency. Generated images are compatible with all
modern web browsers, and have better fallback in IE6 than 24-bit PNGs.
%prep
%setup -q
%build
# not autoconf
./configure \
--prefix=%{_prefix} \
%ifarch x86_64
--enable-sse \
%else
--disable-sse \
%endif
--extra-cflags='%{optflags}' \
--with-libimagequant=%{_libdir} \
--with-openmp
make %{?_smp_mflags}
%install
%make_install
%files
%license COPYRIGHT
%doc CHANGELOG README.md
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1%{?ext_man}
%changelog