%define build_plf 0 %{?_with_plf: %global build_plf 1} # enablelzw = 0 (don't build with LZW compression support) # enablelzw = 1 (build with LZW compression support) # Currently we use enablelzw = 0 due to Unisys LZW patents. %define enablelzw 0 %if %build_plf %define enablelzw 1 %endif %define sam2pver 0.44 %define tif22pnmver 0.12 Summary: Convert raster images to PostScript or PDF Name: sam2p Version: 0.44.14 Release: %mkrel 3 License: GPL Source0: http://www.inf.bme.hu/~pts/sam2p-latest.tar.bz2 Source1: http://www.inf.bme.hu/~pts/tif22pnm-latest.tar.bz2 # (gb) 64-bit fixes Patch0: sam2p-0.44-64bit-fixes.patch URL: http://www.inf.bme.hu/~pts/sam2p Group: Graphics Requires: ghostscript Requires: jpeg-progs BuildRequires: libjpeg-progs Requires: netpbm BuildRequires: libtiff-devel BuildRequires: libpng-devel BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %description sam2p is a UNIX command line utility written in ANSI C++ that converts many raster (bitmap) image formats into Adobe PostScript or PDF files and several other formats. The images are not vectorized. sam2p gives full control to the user to specify standards-compliance, compression, and bit depths. In some cases sam2p can compress an image 100 times smaller than the PostScript output of many other common image converters. sam2p provides ZIP, RLE and LZW (de)compression filters even on Level1 devices. %prep %setup -q -n %{name}-%{sam2pver} -a 1 %patch0 -p1 -b .64bit-fixes %build # don't use icecream PATH=/bin:/usr/bin:/usr/X11R6/bin export PATH autoconf pushd tif22pnm-%{tif22pnmver} %configure2_5x \ --with-libtiff-idir=%{_includedir} \ --with-libpng-idir=%{_includedir} \ --with-libtiff-ldir=%{_libdir} \ --with-libpng-ldir=%{_libdir} make cp tif22pnm png22pnm ../ cp -p README ../README.tif22pnm popd %configure \ %if %build_plf --enable-lzw \ --enable-gif %endif make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_bindir} install -m 755 sam2p tif22pnm png22pnm $RPM_BUILD_ROOT%{_bindir} %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc COPYING %doc README README.tif22pnm examples contrib %{_bindir}/* %changelog * Sat Mar 07 2009 Antoine Ginies <aginies@mandriva.com> 0.44.14-3mdv2009.1 + Revision: 351538 - rebuild * Wed Jun 18 2008 Thierry Vignaud <tvignaud@mandriva.com> 0.44.14-2mdv2009.0 + Revision: 225362 - rebuild + Olivier Blin <oblin@mandriva.com> - restore BuildRoot * Mon Dec 17 2007 Thierry Vignaud <tvignaud@mandriva.com> 0.44.14-1mdv2008.1 + Revision: 126941 - kill re-definition of %%buildroot on Pixel's request * Sun Feb 18 2007 Giuseppe Ghibò <ghibo@mandriva.com> 0.44.14-1mdv2007.0 + Revision: 122276 - Import sam2p * Fri May 05 2006 Giuseppe Ghibò <ghibo@mandriva.com> 0.44.14-1mdk - Release: 0.44-14. - Updated tif22pnm (0.12). - Rebuilt Patch0. - %%mkrel. * Sat Aug 06 2005 Giuseppe Ghibò <ghibo@mandriva.com> 0.44-1mdk - Release: 0.44. - Removed Patch0 (merged upstream). * Thu Feb 24 2005 Giuseppe Ghibò <ghibo@mandrakesoft.com> 0.42-4mdk - Disable icecream - Disable parallel building. * Mon Feb 21 2005 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.42-3mdk - 64-bit fixes - fix buildrequires * Fri Feb 18 2005 Rafael Garcia-Suarez <rgarciasuarez@mandrakesoft.com> 0.42-2mdk - Fix requires (libjpeg-progs instead of jpeg-progs) * Thu Feb 17 2005 Giuseppe Ghibò <ghibo@mandrakesoft.com> 0.42-1mdk - Initial release.