%define name clens %define version 0.2 %define release %mkrel 5 Name: %{name} Version: %{version} Release: %{release} Summary: Corrects lens barrel distortion Source0: %{name}-%{version}.tar.bz2 # grabbed from http://www.epaperpress.com/ptlens/download/PTLensProfiles.zip Source1: PTLensProfiles.tar.bz2 Patch0: clens-mdk-profile.patch.bz2 License: GPL Group: Graphics Url: http://panotools.sourceforge.net/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot BuildRequires: pano12-devel %description A command-line version of PTLens. Compares your JPEG images with a lens database and automatically corrects lens barrel distortion. %prep %setup -q %patch0 -p0 %build mkdir profiles cd profiles tar xvfj %{SOURCE1} mv PTLensProfiles.pdf ../ cd .. echo "Lens Profiles are aviable at %{_datadir}/%{name}" >> README perl -pi -e "s|\@\@PROFILE\@\@|%{_datadir}/%{name}/profile.txt|" src/main.c %configure %make %install rm -rf $RPM_BUILD_ROOT %makeinstall rm -rf $RPM_BUILD_ROOT/usr/doc rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name} mv profiles $RPM_BUILD_ROOT%{_datadir}/%{name} # why provide .h since there are no library ?! rm -rf $RPM_BUILD_ROOT%{_includedir} %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,755) %doc PTLensProfiles.pdf README %{_bindir}/%{name} %{_mandir}/man1/%{name}.* %{_datadir}/%{name} %changelog * Tue Jul 22 2008 Thierry Vignaud <tvignaud@mandriva.com> 0.2-5mdv2009.0 + Revision: 240504 - rebuild - kill re-definition of %%buildroot on Pixel's request + Olivier Blin <oblin@mandriva.com> - restore BuildRoot * Mon Jul 23 2007 Couriousous <couriousous@mandriva.org> 0.2-3mdv2008.0 + Revision: 54823 - Rebuild - Import clens * Fri Mar 17 2006 Couriousous <couriousous@mandriva.org> 0.2-2mdk - Rebuild * Wed Jan 26 2005 Couriousous <couriousous@mandrake.org> 0.2-1mdk - First Mandrakelinux release - Include Lens Profiles - Patch clens to set default profile path %%{_datadir}/%%{name}/profile.txt