File octave.spec of Package octave

# spec file for package octave
# 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

# gnuplot 0 -> use native graphics (didn't worked to me, TODO)
%define gnuplot 0

Name:           octave
Version:        3.6.2
Release:        0
License:        GPL-3.0+
Summary:        A High Level Programming Language
%define apiver  v48+
Group:          Productivity/Scientific/Math
Source:         %{name}-%{version}.tar.bz2
BuildRequires:  bison
BuildRequires:  dejagnu
BuildRequires:  flex
BuildRequires:  freetype2-devel
BuildRequires:  gcc-c++
BuildRequires:  gcc-fortran
BuildRequires:  glpk-devel
BuildRequires:  gmp-devel
BuildRequires:  gperf
BuildRequires:  hdf5-devel
BuildRequires:  liblcms-devel
BuildRequires:  pcre-devel
BuildRequires:  pkg-config
BuildRequires:  qhull-devel
BuildRequires:  qrupdate-devel
BuildRequires:  readline-devel
BuildRequires:  termcap
BuildRequires:  texlive-devel
BuildRequires:  texlive-latex
BuildRequires:  zlib-devel
BuildRequires:  fftw3-devel
BuildRequires:  libMagick++-devel
BuildRequires:  libcurl-devel
BuildRequires:  xorg-x11-libSM-devel
BuildRequires:  xorg-x11-libX11-devel
BuildRequires:  xorg-x11-libXext-devel
BuildRequires:  suitesparse-devel
BuildRequires:  blas-devel
BuildRequires:  lapack-devel
%if %{gnuplot} == 0
# for native graphics
BuildRequires:  Mesa-devel
BuildRequires:  fltk-devel
BuildRequires:  fontconfig-devel
BuildRequires:  xorg-x11-devel
BuildRequires:  gnuplot
Requires:       gnuplot
Requires:       gcc-fortran
Requires:       texinfo
Recommends:     blas-devel
Recommends:     fftw3
Recommends:     fftw3-devel
Recommends:     fftw3-threads
Recommends:     fftw3-threads-devel
Recommends:     gcc
Recommends:     hdf5
Recommends:     libhdf5-devel
Recommends:     make
Recommends:     octave-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Octave is a high level programming language. It is designed for the
solution of numeric problems. There is a command line interface

%package devel
Summary:        Development files for octave
Group:          Productivity/Scientific/Math
Requires:       %{name} = %{version}

%description devel
This package contains all necessary include files and libraries needed
to develop applications that require these.

%setup -q

export CPPFLAGS="-DH5_USE_16_API"
%configure --libexecdir=%{_libdir} --with-magick=ImageMagick --with-umfpack="-lumfpack -lcholmod -lcolamd -llapack"

# see bnc#557340
mkdir -p %{buildroot}/%{_sysconfdir}/
echo %{_libdir}/%{name}-%{version} > %{buildroot}/%{_sysconfdir}/{name}.conf
rm %{buildroot}/%{_libdir}/%{name}/%{version}/*.la

rm -rf %{buildroot}

%install_info --info-dir=%{_infodir} %{_infodir}/

%install_info_delete --info-dir=%{_infodir} %{_infodir}/

%doc README ChangeLog etc
%doc doc/interpreter/octave.pdf doc/liboctave/liboctave.pdf
%doc doc/refcard/refcard-a4.pdf doc/refcard/refcard-legal.pdf
%doc doc/refcard/refcard-legal.pdf
%doc %{_infodir}/*.gz
%doc %{_mandir}/man1/*.gz
%config %{_sysconfdir}/{name}.conf
%dir %{_libdir}/%{name}
%dir %{_libdir}/%{name}/%{version}

%files devel