File pngnq.spec of Package pngnq

#
# spec file for package pngnq
#
# Copyright (c) 2014 SUSE LINUX Products 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:           pngnq
Version:        1.1
Release:        0
Summary:        Tool for optimizing PNG (Portable Network Graphics) images
License:        OSI Approved
Group:          Productivity/Graphics/Other
Url:            http://pngnq.sourceforge.net/
Source:         %{name}-%{version}.tar.bz2
Patch0:         pngnq-1.1-libpng.patch
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  libpng-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Pngnq is a tool for quantizing 32-bit RGBA PNG images to 8-bit RGBA palette
PNG. It's is an adaptation by Stuart Coyle of Greg Roelf's pnqquant. While
pngquant uses a median cut algorithm, Pngnq uses Anthony Dekker's neuquant
algorithm (http://members.ozemail.com.au/~dekker/NEUQUANT.HTML), generally
resulting in better looking results than pngquant.

Optimizers (like pngcrush and optipng) optimize the compression, usually
losslessly. pngnq quantizes colors down to 256 (or fewer) distinct RGBA
combinations, which is quite lossy. Optimized PNGs are usually two to four
times smaller than the 32-bit versions.

%prep
%setup -q
%patch0 -p1

%build
autoreconf -fi
%configure
make %{?_smp_mflags}

%install
install -m 755 -d %{buildroot}%{_bindir}
install -m 755 src/pngnq %{buildroot}%{_bindir}/
install -m 755 -d %{buildroot}%{_mandir}/man1/
install -m 0644 pngnq.1 %{buildroot}%{_mandir}/man1/

%files
%defattr(-,root,root)
%doc COPYING README NEWS AUTHORS

%{_bindir}/pngnq
%{_mandir}/man1/pngnq.1.gz

%changelog
openSUSE Build Service is sponsored by