File libopenraw.spec of Package libopenraw

#
# spec file for package libopenraw
#
# Copyright (c) 2012 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/
#


Url:            http://libopenraw.freedesktop.org/
Summary:        A library to decode digital camera RAW files
License:        LGPL-2.1+
Group:          Development/Libraries/C and C++

Name:           libopenraw
Version:        0.0.9
Release:        0
Source0:        http://libopenraw.freedesktop.org/download/%{name}-%{version}.tar.bz2
Source99:       baselibs.conf
# PATCH-FIX-UPSTREAM libopenraw-orf-thumbnail.patch bnc699678 glin@suse.com - Decompress otf files
Patch2:         libopenraw-orf-thumbnail.patch
Patch3:         openraw-noansiflag.patch
BuildRequires:  boost-devel >= 1.33.1
BuildRequires:  gcc-c++
BuildRequires:  libjpeg-devel
BuildRequires:  libtool
BuildRequires:  pkgconfig(gdk-pixbuf-2.0) >= 2.21
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(libxml-2.0)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
libopenraw is a library that aim at decoding digital camera RAW files.

%package -n libopenraw1
Summary:        A library to decode digital camera RAW files
Group:          Development/Libraries/C and C++

%description -n libopenraw1
libopenraw is a library that aim at decoding digital camera RAW files.

%package -n gdk-pixbuf-loader-libopenraw
Summary:        A library to decode digital camera RAW files -- gdk-pixbuf loader
Group:          Development/Libraries/C and C++
Supplements:    packageand(libopenraw1:gdk-pixbuf)
%gdk_pixbuf_loader_requires

%description -n gdk-pixbuf-loader-libopenraw
libopenraw is a library that aim at decoding digital camera RAW files.

This package provides a libopenraw-based gdk-pixbuf loader.

%package -n libopenraw-devel
Summary:        A library to decode digital camera RAW files
Group:          Development/Libraries/C and C++
Requires:       libopenraw1 = %{version}
#include gdk-pixbuf/gdk-pixbuf.h
Requires:       gdk-pixbuf-devel

%description  -n libopenraw-devel
libopenraw is a library that aim at decoding digital camera RAW files.

%prep
%setup -q
%patch2 -p1
%patch3
%build
autoreconf -fiv
export CXXFLAGS="%optflags -fvisibility-inlines-hidden"
%configure --disable-static --with-pic
%{__make} V=1 %{?jobs:-j%jobs}

%install
%makeinstall
find %{buildroot} -type f -name "*.la" -delete -print

%check
make check

%post -n libopenraw1 -p /sbin/ldconfig

%postun -n libopenraw1 -p /sbin/ldconfig

%post -n gdk-pixbuf-loader-libopenraw
%gdk_pixbuf_loader_post

%postun -n gdk-pixbuf-loader-libopenraw
%gdk_pixbuf_loader_postun

%clean
rm -rf $RPM_BUILD_ROOT

%files -n libopenraw1
%defattr(-,root,root)
%doc README TODO COPYING ChangeLog
%{_libdir}/*.so.*

%files -n gdk-pixbuf-loader-libopenraw
%defattr(-,root,root)
%{_libdir}/gdk-pixbuf-2.0/*/loaders/libopenraw_pixbuf.so

%files -n libopenraw-devel
%defattr(-,root,root)
%{_libdir}/*.so
%dir %{_includedir}/libopenraw-1.0
%{_includedir}/libopenraw-1.0/*
%{_libdir}/pkgconfig/*.pc

%changelog