#just in case this will be a must in future. %global _hardened_build 1 Name: pngquant Version: 1.8.3 Release: 4%{?dist} Summary: PNG quantization tool for reducing image file size Group: Applications/Multimedia License: BSD with advertising URL: http://%{name}.org Source0: http://%{name}.org/%{name}-%{version}-src.tar.bz2 # this will be in the next version Patch0: pngquant_respect_system_flags.patch BuildRequires: libpng-devel %description %{name} converts 24/32-bit RGBA PNG images to 8-bit palette with alpha channel preserved. Such images are compatible with all modern web browsers and a compatibility setting is available to help transparency degrade well in Internet Explorer 6. Quantized files are often 40-70 percent smaller than their 24/32-bit version. %{name} uses the median cut algorithm. %prep %setup -q %patch0 %build # since there is no autotools/configure-script in sources echo '#!/bin/sh' > configure chmod +x configure #have the compiler-flags exported properly %configure make %{?_smp_mflags} %install # have the compiler-flags exported properly, again # otherwise make_install will trigger rebuild without # proper compiler-flags %configure %make_install PREFIX=%{_prefix} install -Dpm0644 %{name}.1 \ %{buildroot}/%{_mandir}/man1/%{name}.1 %files %doc README.md CHANGELOG COPYRIGHT %{_bindir}/%{name} %{_mandir}/man1/%{name}.1* %changelog * Wed May 22 2013 Björn Esser - 1.8.3-4 - add Group-Tag to make el5-build happy * Sun May 19 2013 Björn Esser - 1.8.3-3 - add Patch0: respect system compiler-flags - touch a fake configure-script during prep - export system cflags invoking configure-macro * Fri May 17 2013 Björn Esser - 1.8.3-2 - changed License: BSD --> BSD with advertising - removed -n{name}-{version} from prep - removed >= 1.2.46-1 from BuildRequires: libpng-devel * Tue May 14 2013 Björn Esser - 1.8.3-1 - Initial RPM release.