File optipng.spec of Package optipng

#
# spec file for package optipng (Version 0.6.4)
#
# Copyright (c) 2010 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/
#

# norootforbuild


Name:           optipng
BuildRequires:  libpng-devel
License:        Zlib
Group:          Productivity/Archiving/Compression
Summary:        A PNG File Compressor
Version:        0.6.4
Release:        1
Url:            http://optipng.sourceforge.net/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source0:        %name-%{version}.tar.bz2
Source1:        macros.optipng
Patch0:         %{name}-suse-paths.diff
Patch1:         %{name}-libpng14.patch

%description
OptiPNG is a PNG optimizer that recompresses image files to a smaller
size, without losing any information. This program also converts
external formats (BMP, GIF, PNM; TIFF support is coming up) to
optimized PNG, and performs PNG integrity checks and corrections.



Authors:
--------
    Cosmin Truta cosmin@cs.toronto.edu

%prep
%setup -q
%patch0
# upstream uses pngpriv.h from libpng, which is not allowed
%patch1 -p1

%build
./configure -with-system-zlib -with-system-libpng -prefix=/usr
make CFLAGS="$RPM_OPT_FLAGS"

%install
%makeinstall
install -D -m644 %{SOURCE1} $RPM_BUILD_ROOT/etc/rpm/macros.optipng

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
#%doc FEATURES HISTORY DESIGN TODO CAVEAT
/usr/bin/optipng
/usr/share/man/man1/optipng.1.gz
/etc/rpm/macros.optipng

%changelog
openSUSE Build Service is sponsored by