File LabPlot.spec of Package labplot

#
# spec file for package LabPlot (Version 1.6.0.3)
#
# 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/

Name:           kde3-labplot
# skip-check-libtool-deps
%define _mandir /opt/kde3/share/man
BuildRequires:  fdupes
BuildRequires:  ImageMagick-devel
BuildRequires:  libMagick++-devel
BuildRequires:  audiofile-devel
BuildRequires:  libjasper-devel
BuildRequires:  fftw3-devel
BuildRequires:  fftw3-threads-devel
BuildRequires:  gsl1-devel
BuildRequires:  libbz2-devel
BuildRequires:  pstoedit
#BuildRequires:  ocaml
#BuildRequires:  texvc
%if 0%{?suse_version} > 1210
#BuildRequires:  netcdf-devel
#BuildRequires:  hdf5-devel
%else
BuildRequires:  libnetcdf-devel
%endif
BuildRequires:  kdelibs3-devel
BuildRequires:  qsa-devel
BuildRequires:  R-base-devel
Url:            http://labplot.sourceforge.net/
License:        GPL-2.0+
Group:          Productivity/Scientific/Other
Summary:        Data Analysis and Visualization
Version:        1.6.0.3
Release:        1
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source0:        LabPlot-%version.tar.bz2
Source1:        LabPlot-hi-icons.tar.bz2
Obsoletes:      LabPlot <= %{version}
Provides:       LabPlot = %{version} 

%description
LabPlot is for scientific 2D and 3D data and function plotting. The
various display and analysis functions are explained in the handbook
(KDE help center). LabPlot also provides a component for easily viewing
the project files in Konqueror.

%prep
%setup -q -a1 -n LabPlot-%{version}
sed -i 1i\ '#include <cstddef>' liborigin-20070926/tree.hh
. /etc/opt/kde3/common_options
update_admin --no-unsermake
%if %{suse_version} > 1320
#sed -i 's|gsl_sf_ellint_D(phi,k,n,MODE)|gsl_sf_ellint_D(phi,k,n)|g' src/functions.h
%endif

%build
. /etc/opt/kde3/common_options
export CFLAGS="$CFLAGS -fPIC"
export CXXFLAGS="$CXXFLAGS -fPIC"
export CPPFLAGS="$CPPFLAGS -fno-strict-aliasing -fPIC -Wno-error=return-type"
cat configure | grep -v 'CXXFLAGS="$CXXFLAGS -fno-exceptions"' | sed "s/-fno-rtti -fno-exceptions/-fno-rtti/" > configure.new
mv configure.new configure
chmod 755 configure
./configure $configkde --disable-final --libdir=/opt/kde3/%_lib --enable-static=no
make %{?jobs:-j %jobs}

%install
. /etc/opt/kde3/common_options
make DESTDIR=$RPM_BUILD_ROOT $INSTALL_TARGET
rm -rf $RPM_BUILD_ROOT/opt/kde3/share/icons/locolor
rm -rf $RPM_BUILD_ROOT/??color
%find_lang LabPlot
rm -f $RPM_BUILD_ROOT/opt/kde3/%_lib/*.a
rm -f $RPM_BUILD_ROOT/opt/kde3/%_lib/*.la
rm -f $RPM_BUILD_ROOT/opt/kde3/%_lib/*.so
%fdupes -s $RPM_BUILD_ROOT
kde_post_install

%post
/sbin/ldconfig

%postun
/sbin/ldconfig

%files -f LabPlot.lang
%defattr(-,root,root)
%doc %{_mandir}/man1/*.1
%doc /opt/kde3/share/doc/HTML/*/labplot
/opt/kde3/bin/*
/opt/kde3/%_lib/*
/opt/kde3/share/*/*/*.desktop
/opt/kde3/share/apps/*
/opt/kde3/share/icons/*
%dir /opt/kde3/share/doc/HTML/br
%dir /opt/kde3/share/locale/br
%dir /opt/kde3/share/locale/br/LC_MESSAGES
%dir /opt/kde3/share/locale/cy
%dir /opt/kde3/share/locale/cy/LC_MESSAGES
%dir /opt/kde3/share/locale/ga
%dir /opt/kde3/share/locale/ga/LC_MESSAGES

%changelog
openSUSE Build Service is sponsored by