File pfstools.spec of Package pfstools

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


Name:           pfstools
Version:        1.8.4
Release:        0
Source:         %{name}-%{version}.tar.bz2
Patch:          %{name}-octave.patch
Patch1:         %{name}-gcc.patch
Patch2:         pfstools-stringcompare.patch
Patch4:         pfstools-stdlib.patch
Patch5:         pfstools-1.8.1-fix-return-in-nonvoid.patch
Patch6:         pfstools-no-debug-mangling.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Url:            http://www.mpi-sb.mpg.de/resources/pfstools/
BuildRequires:  Mesa
BuildRequires:  OpenEXR-devel
BuildRequires:  blas
BuildRequires:  fftw3-devel
BuildRequires:  freeglut-devel
BuildRequires:  lapack
BuildRequires:  libMagick++-devel
BuildRequires:  libnetpbm-devel
BuildRequires:  libqt4-devel
BuildRequires:  libtiff-devel
BuildRequires:  libtool
BuildRequires:  pkgconfig
BuildRequires:  readline-devel
BuildRequires:  pkgconfig(glu)
#BuildRequires:  octave-devel
Requires:       dcraw
Summary:        High Dynamic Range Images and Video manipulation tools
License:        GPL-2.0+ and LGPL-2.1+
Group:          Productivity/Multimedia/Other

%description
pfstools package is a set of command line (and one GUI) programs for
reading, writing, manipulating and viewing high-dynamic range (HDR)
images and video frames. All programs in the package exchange data
using a simple generic file format (pfs) for HDR data. The concept of
the pfstools is similar to netpbm package for low-dynamic range images.

%package devel
Requires:       %{name} = %{version}
Summary:        High Dynamic Range Images and Video manipulation tools
License:        GPL-2.0+
Group:          Development/Libraries/C and C++

%description devel
pfstools package is a set of command line (and one GUI) programs for
reading, writing, manipulating and viewing high-dynamic range (HDR)
images and video frames. All programs in the package exchange data
using a simple generic file format (pfs) for HDR data. The concept of
the pfstools is similar to netpbm package for low-dynamic range images.

%prep
%setup -q
%patch
%patch1
%patch2
%patch4
%patch5 -p1
%patch6 -p1

%build
autoreconf -f -i
%configure --disable-static --with-pic --disable-octave --with-qtdir=/usr
make %{?jobs:-j%jobs}

%install
make DESTDIR=$RPM_BUILD_ROOT install
%{__rm} -f %{buildroot}%{_libdir}/*.la
grep -r include %{buildroot}%{_includedir} | awk -F: '{print $2}'

%clean
rm -rf "$RPM_BUILD_ROOT"

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING INSTALL NEWS README TODO
%{_bindir}/*
%{_mandir}/man?/*
%{_libdir}/*.so.*
/usr/share/%{name}
# temporary removed 
#%{_libdir}/octave/*/site/oct/*/pfstools
#%_datadir/octave/*/site/m/pfstools

%files devel
%defattr(-,root,root)
%doc doc/{pfs_format_spec.pdf,faq.txt}
%{_includedir}/*
%{_libdir}/pkgconfig/*.pc
%{_libdir}/*.so

%changelog