File pngcrush.spec of Package pngcrush

#
# spec file for package pngcrush
#
# Copyright (c) 2015 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:           pngcrush
Version:        1.7.85
Release:        0
Summary:        Optimizer for PNG Files that can also insert or delete specified Chunks
License:        Zlib
Group:          Productivity/Graphics/Other
Url:            http://pmt.sourceforge.net/pngcrush/
Source:         http://prdownloads.sourceforge.net/pmt/pngcrush-%{version}.tar.gz
Patch1:         pngcrush-makefile-add-optflags.diff
BuildRequires:  glibc-devel
BuildRequires:  libpng-devel
BuildRequires:  zlib-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
pngcrush is an excellent batch-mode compression utility for PNG
images. Depending on the application that created the original PNGs, it can
improve the file size anywhere from a few percent to 40% or more (completely
losslessly). The utility also allows specified PNG chunks (e.g. text comments)
to be inserted or deleted, and it can fix incorrect gamma info written by
Photoshop 5.0 as well as the erroneous iCCP chunk written by Photoshop 5.5.

%prep
%setup -q
%patch1 -p1

%build
make %{?_smp_mflags} \
	PNGINC="%{_includedir}" \
	PNGLIB="%{_libdir}" \
	ZINC="%{_includedir}" \
	ZLIB="%{_lib}" \
	CC="gcc" \
	LD="gcc" \
	OPTFLAGS="%{optflags}"

%install
install -D -m 0755 pngcrush "%{buildroot}%{_bindir}/pngcrush"

%files
%defattr(-,root,root)
%doc ChangeLog.html
%{_bindir}/pngcrush

%changelog