%define syslib 0 Summary: Optimizer for png files Name: pngcrush Version: 1.6.4 Release: 2.n0i.5%{?dist} License: Freeware Group: Applications/Multimedia %if %{syslib} Source0: http://dl.sourceforge.net/pmt/%{name}-%{version}-nolib.tar.bz2 %else Source0: http://dl.sourceforge.net/pmt/%{name}-%{version}.tar.bz2 %endif URL: http://pmt.sf.net/pngcrush/ #BuildRequires: libpng-devel zlib-devel BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %description This program reads in a PNG image, and writes it out again, with the optimum filter_method and zlib_level. It uses brute force (trying filter_method none, and libpng adaptive filtering, with compression levels 3 and 9). It does the most time-consuming method last in case it turns out to be the best. %prep %if %{syslib} %setup -n %{name}-%{version}-nolib %else %setup %endif # extract documentation # REMEMBER TO UPDATE LINE NUMBERS ON UPGRADE! %{__sed} -n -e '1,25 {s/^.\{2,3\}//;p}' pngcrush.c > README.txt %{__sed} -n -e '36,68 {s/^.\{2,3\}//;p}' pngcrush.c > COPYING.txt %{__sed} -n -e '73,119 {s/^.\{2,3\}//;p}' pngcrush.c > TODO.txt %build %if %{syslib} %{__cc} $RPM_OPT_FLAGS -lpng -lz -lm -DPNG_USE_PNGGCCRD -o %{name} pngcrush.c %else GAS_VERSION=$(as --version |sed -n 's/^GNU assembler // p') export CFLAGS="-I. $RPM_OPT_FLAGS \ -DPNG_USE_PNGGCCRD \ -DGAS_VERSION=\"\\\"${GAS_VERSION}\\\"\"" make -e %endif %install %{__rm} -rf $RPM_BUILD_ROOT %{__install} -m0755 -s -D %{name} $RPM_BUILD_ROOT%{_bindir}/%{name} %clean %{__rm} -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) %doc *.txt %attr(755,root,root) %{_bindir}/%{name} %changelog * Mon Aug 21 2006 Marius FERARU - 1.6.4-2.n0i.5 - Dist macro * Fri Jun 09 2006 Marius FERARU - 1.6.4-1.n0i.4 - version 1.6.4 - switched to using internal libpng and zlib until Fedora updates system libraries to newer versions * Fri Apr 07 2006 Marius FERARU - 1.6.3-1.n0i.3 - version 1.6.3 * Fri Jun 17 2005 Marius FERARU 1.5.10-1.n0i.2 - automatic rebuild * Fri Apr 22 2005 Marius FERARU 1.5.10-1.n0i.1 - twisted PLD's spec revision 1.11 2003/03/14 08:38:39