3 %bcond_with system_libpng # use system libpng (forces system zlib; not ready for libpng 1.5)
4 %bcond_with system_zlib # use system zlib (included one is slightly more aggressive)
6 %if %{with system_libpng}
9 Summary: Optimizer for png files
10 Summary(pl.UTF-8): Optymalizator plików png
11 Summary(pt_BR.UTF-8): Utilitário para compressão de pngs
15 License: BSD, Zlib/libpng
16 Group: Applications/Graphics
17 Source0: http://downloads.sourceforge.net/optipng/%{name}-%{version}.tar.gz
18 # Source0-md5: d6c10dd8d8f1d5b579221bc9cfbfbcb6
19 URL: http://optipng.sourceforge.net/
20 %{?with_system_libpng:BuildRequires: libpng-devel >= 1.4.1}
21 %{?with_system_zlib:BuildRequires: zlib-devel >= 1.2.4}
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 The main purpose of OptiPNG is to *optimize* PNG files, i.e. to reduce
26 their size to a minimum, without losing any information. In order to
27 achieve this goal, OptiPNG performs the following tasks:
29 - It losslessly reduces the bit depth, the color type and the color
30 palette of the image. This step reduces the size of the uncompressed
31 image, which, indirectly, reduces the size of the compressed image
32 (i.e. the size of the PNG file).
34 - It runs a suite of compression methods and strategies, and selects
35 the compression parameters that yield the smallest output file.
37 %description -l pl.UTF-8
38 Głównym zadaniem OptiPNG jest optymalizacja plików PNG, tzn.
39 zmniejszenie ich rozmiaru do minimum bez straty jakichkolwiek
40 informacji. Aby osiągnąć ten cel stosuje się:
42 - Bezstratną redukcję głębi kolorów, typu koloru i palety kolorów. Ten
43 krok zmniejsza rozmiar nieskompresowanego obrazu, przez co zmniejsza
44 się również rozmiar skompresowanego obrazu (czyli wielkość pliku
47 - Porównuje się wyniki działania różnych metod i strategii kompresji w
48 celu wyboru takich parametrów, które dają najmniejszy rozmiar pliku
57 %{?with_system_libpng:-with-system-libpng} \
58 %{?with_system_zlib:-with-system-zlib}
60 %{__make} -C src -f scripts/gcc.mak -j1 \
62 CFLAGS="%{rpmcflags}" \
63 LDFLAGS="%{rpmldflags}"
66 rm -rf $RPM_BUILD_ROOT
67 install -d $RPM_BUILD_ROOT%{_bindir}
69 install src/optipng $RPM_BUILD_ROOT%{_bindir}
72 rm -rf $RPM_BUILD_ROOT
75 %defattr(644,root,root,755)
76 %doc doc/{caveat.txt,history.txt,manual.html,png_optimization_guide.html,thanks.html,todo.txt}
77 %attr(755,root,root) %{_bindir}/optipng