Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > media > contrib-release-src > by-pkgid > a58d8f977c317874e64f966fc6be7000 > files > 4

clens-0.2-6mdv2010.0.src.rpm

%define name    clens
%define version 0.2
%define release %mkrel 6

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
%configure2_5x
%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
* Wed Sep 02 2009 Thierry Vignaud <tvignaud@mandriva.com> 0.2-6mdv2010.0
+ Revision: 424986
- use %%configure2_5x
- rebuild

* 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