File lensfun.spec of Package lensfun

#
# spec file for package lensfun (Version 0.2.5)
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           lensfun
Summary:        A photographic lens database and a library for accessing it
Version:        0.2.5
Release:        2
Url:            http://lensfun.berlios.de/
Source0:        lensfun-%{version}.tar.bz2
# This patch got created via
# svn diff svn://svn.berlios.de/lensfun/tags/0.2.5/data svn://svn.berlios.de/lensfun/trunk/data > lens_database_update.diff
Patch1:         lens_database_update.diff
License:        LGPLv3
Group:          System/Libraries
Requires:       liblensfun0 = %{version}-%{release}
BuildRequires:  doxygen gcc-c++ glib2-devel libpng-devel python zlib
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
The goal of the lensfun library is to provide a open source database
of photographic lenses and their characteristics. In the past there
was a effort in this direction (see http://www.epaperpress.com/ptlens/),
but then author decided to take the commercial route and the database
froze at the last public stage. This database was used as the basement
on which lensfun database grew, thanks to PTLens author which gave his
permission for this, while the code was totally rewritten from scratch
(and the database was converted to a totally new, XML-based format).

The lensfun library not only provides a way to read the database and
search for specific things in it, but also provides a set of algorithms
for correcting images based on detailed knowledge of lens properties
and calibration data. Right now lensfun is designed to correct distortion,
transversal (also known as lateral) chromatic aberrations, vignetting
and colour contribution index of the lens.

%package -n liblensfun0
License:        LGPLv3
Summary:        A photographic lens database and a library for accessing it
Group:          System/Libraries
Requires:       lensfun

%description -n liblensfun0
Library files for package lensfun/lensfun-devel

%package doc
License:        LGPLv3
Summary:        A photographic lens database and a library for accessing it
Group:          System/Libraries
Requires:       lensfun

%description doc
Library files for package lensfun/lensfun-devel

%package devel
License:        LGPLv3
Summary:        A photographic lens database and a library for accessing it
Group:          Development/Libraries/C and C++
Requires:       liblensfun0 = %{version}
Requires:       lensfun = %{version}
Requires:       %{name}-doc = %{version}

%description devel
Header and library definition files for developing applications
that use the lensfun library/database.

%prep
%setup -q -n %{name}-%{version}
cd data
%patch1 -p0

%build
./configure -v \
	--cflags="${CFLAGS:-$RPM_OPT_FLAGS}" \
	--cxxflags="${CXXFLAGS:-$RPM_OPT_FLAGS}" \
	--prefix=%{_prefix} \
	--bindir=%{_bindir} \
	--sysconfdir=%{_sysconfdir} \
	--datadir=%{_datadir}/lensfun \
	--libdir=%{_libdir} \
	--includedir=%{_includedir} \
	--libexecdir=%{_libexecdir}
make AUTODEP=0 %{?_smp_mflags} lensfun manual

%install
make AUTODEP=0 INSTALL_PREFIX=%{?buildroot:%{buildroot}} install
mkdir -p $RPM_BUILD_ROOT/usr/share/doc/packages
mv $RPM_BUILD_ROOT/usr/share/doc/lensfun-%version $RPM_BUILD_ROOT/usr/share/doc/packages/lensfun

%post -n liblensfun0 -p /sbin/ldconfig

%postun -n liblensfun0 -p /sbin/ldconfig

%post devel -p /sbin/ldconfig

%postun devel -p /sbin/ldconfig

%clean
rm -rf $RPM_BUILD_ROOT

%files doc
%defattr(-,root,root)
%doc /usr/share/doc/packages/lensfun

%files
%defattr(-,root,root)
%dir %{_datadir}/lensfun
%{_datadir}/lensfun/*

%files -n liblensfun0
%defattr(-,root,root)
%{_libdir}/*.so.*

%files devel
%defattr(-,root,root)
%{_libdir}/*.so
%{_libdir}/pkgconfig/*
%{_includedir}/*.h

%changelog
openSUSE Build Service is sponsored by