File plplot.spec of Package plplot

#
# spec file for package plplot
#
# Copyright (c) 2016 SUSE LINUX 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/
#


%if 0%{?suse_version} <= 1320
%define lua_version 5.2
%else
%define lua_version 5.3
%endif

%if 0%{?suse_version} > 1320 || (0%{?is_opensuse} && 0%{?sle_version}==120200)
%define tk_enabled 0
%else
%define tk_enabled 1
%endif

%if 0%{?suse_version} != 1315 || (0%{?is_opensuse} && 0%{?sle_version}==120200)
%define octave_enabled 1
%else
%define octave_enabled 0
%endif

%define X_display ":98"

Name:           plplot
Version:        5.11.1
Release:        0
Summary:        Cross-platform software package for creating scientific plots
License:        LGPL-2.1+
Group:          Productivity/Scientific/Other
Url:            http://plplot.sourceforge.net/
Source0:        http://download.sf.net/plplot/%{name}-%{version}.tar.gz
Source1:        %{name}-rpmlintrc
# PATCH-FIX-UPSTREAM plplot-5.9.9-ada-pic.patch idoenmez@suse.de -- Compile Ada code with -fPIC
Patch1:         plplot-5.9.9-ada-pic.patch
# PATCH-FIX-UPSTREAM plplot-cmake36-pkg_check_pkgconfig_macro.patch badshah400@gmail.com -- Fix plplot's defined pkg_check_pkgconfig macro to work with cmake >= 3.6; patch sent upstream
Patch2:         plplot-cmake36-pkg_check_pkgconfig_macro.patch
BuildRequires:  cmake >= 3.0.2
BuildRequires:  fdupes
BuildRequires:  freefont
BuildRequires:  gcc-ada
BuildRequires:  gcc-fortran
BuildRequires:  itcl-devel
BuildRequires:  itk
BuildRequires:  java-devel
BuildRequires:  lapack-devel
BuildRequires:  libgcj-devel
BuildRequires:  libqt4-devel
BuildRequires:  libtool
BuildRequires:  ncurses-devel
BuildRequires:  ocaml
BuildRequires:  pkgconfig
BuildRequires:  python-devel
BuildRequires:  python-numpy-devel
BuildRequires:  python-qt4-devel
BuildRequires:  swig
BuildRequires:  tcl-devel
BuildRequires:  tk-devel
BuildRequires:  pkgconfig(pango)
BuildRequires:  pkgconfig(pangoft2)
# Required for enabling tk driverand in the %%check section, currently disabled
BuildRequires:  xorg-x11-server
BuildRequires:  perl(XML::DOM)
BuildRequires:  pkgconfig(freetype2)
BuildRequires:  pkgconfig(gnome-python-2.0)
BuildRequires:  pkgconfig(libgnomeprintui-2.2)
BuildRequires:  pkgconfig(libgnomeui-2.0)
BuildRequires:  pkgconfig(lua)
BuildRequires:  pkgconfig(pygtk-2.0)
%if 0%{?suse_version} >= 1310
BuildRequires:  pkgconfig(lasi)
%endif
BuildRequires:  hdf5-devel
BuildRequires:  octave-devel
%if 0%{?suse_version} >= 1320
BuildRequires:  wxWidgets-devel >= 3
%else
BuildRequires:  wxWidgets-devel
%define _use_internal_dependency_generator 0
%define __find_requires %wx_requires
%endif

Requires:       libtool
Requires:       python-base = %{py_ver}
Requires:       python-numpy
Recommends:     %{name}-doc = %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires(post): /sbin/ldconfig

%description
PLplot is a library of functions that are useful for making scientific
plots.

PLplot can be used from within compiled languages such as C, C++,
FORTRAN and Java, and interactively from interpreted languages such as
Octave, Python, Perl and Tcl.

The PLplot library can be used to create standard x-y plots, semilog
plots, log-log plots, contour plots, 3D surface plots, mesh plots, bar
charts and pie charts. Multiple graphs (of the same or different sizes)
may be placed on a single page with multiple lines in each graph.

A variety of output file devices such as Postscript, png, jpeg, LaTeX
and others, as well as interactive devices such as xwin, tk, xterm and
Tektronics devices are supported. New devices can be easily added by
writing a small number of device dependent routines.

There are almost 2000 characters in the extended character set. This
includes four different fonts, the Greek alphabet and a host of
mathematical, musical, and other symbols. Some devices supports its own
way of dealing with text, such as the Postscript and LaTeX drivers, or
the png and jpeg drivers that uses the Freetype library.

This package provides the shared libraries for PLplot.

%package devel

Summary:        Files for development with PLplot
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}
Requires:       gcc-c++
Requires:       pkgconfig
Requires:       pkgconfig(freetype2)

%description devel
PLplot is a library of functions that are useful for making scientific
plots.

PLplot can be used from within compiled languages such as C, C++,
FORTRAN and Java, and interactively from interpreted languages such as
Octave, Python, Perl and Tcl.

The PLplot library can be used to create standard x-y plots, semilog
plots, log-log plots, contour plots, 3D surface plots, mesh plots, bar
charts and pie charts. Multiple graphs (of the same or different sizes)
may be placed on a single page with multiple lines in each graph.

This package provides the files necessary for development with PLplot
in C/C++.

%package doc

Summary:        Documentation for PLplot and its bindings
Group:          Documentation/Other
Requires:       %{name} = %{version}

%description doc
PLplot is a library of functions that are useful for making scientific
plots.

PLplot can be used from within compiled languages such as C, C++,
FORTRAN and Java, and interactively from interpreted languages such as
Octave, Python, Perl and Tcl.

The PLplot library can be used to create standard x-y plots, semilog
plots, log-log plots, contour plots, 3D surface plots, mesh plots, bar
charts and pie charts. Multiple graphs (of the same or different sizes)
may be placed on a single page with multiple lines in each graph.

This package provides the documentation for PLplot and its associated
modules.

%package ada
Summary:        Shared libraries for PLplot's Ada bindings
Group:          System/Libraries
Requires:       %{name} = %{version}

%description ada
A variety of output file devices such as Postscript, png, jpeg, LaTeX
and others, as well as interactive devices such as xwin, tk, xterm and
Tektronics devices are supported. New devices can be easily added by
writing a small number of device dependent routines.

There are almost 2000 characters in the extended character set. This
includes four different fonts, the Greek alphabet and a host of
mathematical, musical, and other symbols. Some devices supports its own
way of dealing with text, such as the Postscript and LaTeX drivers, or
the png and jpeg drivers that uses the Freetype library.

This package provides the shared libraries necessary for using PLplot
with Ada.

%package ada-devel

Summary:        Ada bindings for development with PLplot
Group:          Development/Languages/Other
Requires:       %{name} = %{version}
Requires:       %{name}-ada = %{version}
Requires:       %{name}-devel = %{version}
Requires:       gcc-ada
Requires:       pkgconfig

%description ada-devel
A variety of output file devices such as Postscript, png, jpeg, LaTeX
and others, as well as interactive devices such as xwin, tk, xterm and
Tektronics devices are supported. New devices can be easily added by
writing a small number of device dependent routines.

There are almost 2000 characters in the extended character set. This
includes four different fonts, the Greek alphabet and a host of
mathematical, musical, and other symbols. Some devices supports its own
way of dealing with text, such as the Postscript and LaTeX drivers, or
the png and jpeg drivers that uses the Freetype library.

This package provides the files necessary for using PLplot in Ada.

%package fortran
Summary:        Shared libraries for PLplot's Fortran bindings
Group:          System/Libraries
Requires:       %{name} = %{version}

%description fortran
A variety of output file devices such as Postscript, png, jpeg, LaTeX
and others, as well as interactive devices such as xwin, tk, xterm and
Tektronics devices are supported. New devices can be easily added by
writing a small number of device dependent routines.

There are almost 2000 characters in the extended character set. This
includes four different fonts, the Greek alphabet and a host of
mathematical, musical, and other symbols. Some devices supports its own
way of dealing with text, such as the Postscript and LaTeX drivers, or
the png and jpeg drivers that uses the Freetype library.

This package provides the shared libraries necessary for using PLplot
with Fortran.

%package fortran-devel

Summary:        Fortran bindings for development with PLplot
Group:          Development/Languages/Fortran
Requires:       %{name} = %{version}
Requires:       %{name}-devel = %{version}
Requires:       %{name}-fortran = %{version}
Requires:       gcc-fortran
Requires:       pkgconfig

%description fortran-devel
A variety of output file devices such as Postscript, png, jpeg, LaTeX
and others, as well as interactive devices such as xwin, tk, xterm and
Tektronics devices are supported. New devices can be easily added by
writing a small number of device dependent routines.

There are almost 2000 characters in the extended character set. This
includes four different fonts, the Greek alphabet and a host of
mathematical, musical, and other symbols. Some devices supports its own
way of dealing with text, such as the Postscript and LaTeX drivers, or
the png and jpeg drivers that uses the Freetype library.

This package provides the files necessary for using PLplot in Fortran.

%package java

Summary:        PLplot functions for scientific plotting with Java
Group:          Productivity/Scientific/Other
Requires:       %{name} = %{version}
Requires:       java

%description java
A variety of output file devices such as Postscript, png, jpeg, LaTeX
and others, as well as interactive devices such as xwin, tk, xterm and
Tektronics devices are supported. New devices can be easily added by
writing a small number of device dependent routines.

There are almost 2000 characters in the extended character set. This
includes four different fonts, the Greek alphabet and a host of
mathematical, musical, and other symbols. Some devices supports its own
way of dealing with text, such as the Postscript and LaTeX drivers, or
the png and jpeg drivers that uses the Freetype library.

This package provides the PLplot functions required for scientific
plotting with Java.

%package lua

Summary:        PLplot functions for scientific plotting with Lua
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}
Requires:       lua

%description lua
PLplot is a library of functions that are useful for making scientific
plots.

PLplot can be used from within compiled languages such as C, C++,
FORTRAN and Java, and interactively from interpreted languages such as
Octave, Python, Perl and Tcl.

The PLplot library can be used to create standard x-y plots, semilog
plots, log-log plots, contour plots, 3D surface plots, mesh plots, bar
charts and pie charts. Multiple graphs (of the same or different sizes)
may be placed on a single page with multiple lines in each graph.

This package provides the PLplot functions required for scientific
plotting with Lua.

%package octave

Summary:        PLplot functions for scientific plotting with Octave
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}
Requires:       octave

%description octave
PLplot is a library of functions that are useful for making scientific
plots.

PLplot can be used from within compiled languages such as C, C++,
FORTRAN and Java, and interactively from interpreted languages such as
Octave, Python, Perl and Tcl.

The PLplot library can be used to create standard x-y plots, semilog
plots, log-log plots, contour plots, 3D surface plots, mesh plots, bar
charts and pie charts. Multiple graphs (of the same or different sizes)
may be placed on a single page with multiple lines in each graph.

This package provides the PLplot functions required for scientific
plotting with Octave.

%package python-qt

Summary:        PLplot functions for scientific plotting with python-qt4
Group:          Development/Libraries/Python
Requires:       %{name} = %{version}
Requires:       python-base = %{py_ver}
Requires:       python-qt4

%description python-qt
PLplot is a library of functions that are useful for making scientific
plots.

PLplot can be used from within compiled languages such as C, C++,
FORTRAN and Java, and interactively from interpreted languages such as
Octave, Python, Perl and Tcl.

The PLplot library can be used to create standard x-y plots, semilog
plots, log-log plots, contour plots, 3D surface plots, mesh plots, bar
charts and pie charts. Multiple graphs (of the same or different sizes)
may be placed on a single page with multiple lines in each graph.

This package provides the PLplot functions required for scientific
plotting with python-qt.

%package qt
Summary:        PLplot functions for scientific plotting with qt
Group:          System/Libraries
Requires:       %{name} = %{version}

%description qt
PLplot is a library of functions that are useful for making scientific
plots.

PLplot can be used from within compiled languages such as C, C++,
FORTRAN and Java, and interactively from interpreted languages such as
Octave, Python, Perl and Tcl.

The PLplot library can be used to create standard x-y plots, semilog
plots, log-log plots, contour plots, 3D surface plots, mesh plots, bar
charts and pie charts. Multiple graphs (of the same or different sizes)
may be placed on a single page with multiple lines in each graph.

This package provides the PLplot functions required for scientific
plotting with Qt.

%package qt-devel

Summary:        PLplot functions for scientific plotting with qt
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}
Requires:       %{name}-devel = %{version}
Requires:       %{name}-qt = %{version}
Requires:       libqt4-devel
Requires:       pkgconfig

%description qt-devel
PLplot is a library of functions that are useful for making scientific
plots.

PLplot can be used from within compiled languages such as C, C++,
FORTRAN and Java, and interactively from interpreted languages such as
Octave, Python, Perl and Tcl.

The PLplot library can be used to create standard x-y plots, semilog
plots, log-log plots, contour plots, 3D surface plots, mesh plots, bar
charts and pie charts. Multiple graphs (of the same or different sizes)
may be placed on a single page with multiple lines in each graph.

This package provides the development files for using PLplot
with Qt.

%package tcltk
Summary:        PLplot functions for scientific plotting with Tk
Group:          System/Libraries
Requires:       %{name} = %{version}

%description tcltk
PLplot is a library of functions that are useful for making scientific
plots.

PLplot can be used from within compiled languages such as C, C++,
FORTRAN and Java, and interactively from interpreted languages such as
Octave, Python, Perl and Tcl.

The PLplot library can be used to create standard x-y plots, semilog
plots, log-log plots, contour plots, 3D surface plots, mesh plots, bar
charts and pie charts. Multiple graphs (of the same or different sizes)
may be placed on a single page with multiple lines in each graph.

This package provides the PLplot functions required for scientific
plotting with Tk.

%package tcltk-devel

Summary:        PLplot functions for scientific plotting with python-qt4
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}
Requires:       %{name}-devel = %{version}
Requires:       %{name}-tcltk = %{version}
Requires:       itcl-devel
Requires:       itk
Requires:       pkgconfig
Requires:       python-base = %{py_ver}
Requires:       tcl-devel
Requires:       tk-devel

%description tcltk-devel
PLplot is a library of functions that are useful for making scientific
plots.

PLplot can be used from within compiled languages such as C, C++,
FORTRAN and Java, and interactively from interpreted languages such as
Octave, Python, Perl and Tcl.

The PLplot library can be used to create standard x-y plots, semilog
plots, log-log plots, contour plots, 3D surface plots, mesh plots, bar
charts and pie charts. Multiple graphs (of the same or different sizes)
may be placed on a single page with multiple lines in each graph.

This package provides the development files for using PLplot with Tk.

%package wxwidgets

Summary:        PLplot functions for scientific plotting with wxGTK
Group:          System/Libraries
Requires:       %{name} = %{version}

%description wxwidgets
PLplot is a library of functions that are useful for making scientific
plots.

PLplot can be used from within compiled languages such as C, C++,
FORTRAN and Java, and interactively from interpreted languages such as
Octave, Python, Perl and Tcl.

The PLplot library can be used to create standard x-y plots, semilog
plots, log-log plots, contour plots, 3D surface plots, mesh plots, bar
charts and pie charts. Multiple graphs (of the same or different sizes)
may be placed on a single page with multiple lines in each graph.

This package provides the PLplot functions required for scientific
plotting with wxGTK.

%package wxwidgets-devel

Summary:        PLplot bindings for development with wxGTK
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}
Requires:       %{name}-devel = %{version}
Requires:       %{name}-wxwidgets = %{version}
Requires:       pkgconfig
Requires:       wxWidgets-devel

%description wxwidgets-devel
PLplot is a library of functions that are useful for making scientific
plots.

PLplot can be used from within compiled languages such as C, C++,
FORTRAN and Java, and interactively from interpreted languages such as
Octave, Python, Perl and Tcl.

The PLplot library can be used to create standard x-y plots, semilog
plots, log-log plots, contour plots, 3D surface plots, mesh plots, bar
charts and pie charts. Multiple graphs (of the same or different sizes)
may be placed on a single page with multiple lines in each graph.

This package provides the PLplot functions required for scientific
plotting with wxGTK.

%prep
%setup -q
%patch1 -p1
%patch2 -p1

for file in NEWS README.release
do
  iconv -f ISO-8859-1 -t UTF-8 $file > ${file}.tmp
  touch -r $file ${file}.tmp
  mv ${file}.tmp $file
done

%build
%if 0%{?suse_version} >= 1310
export CFLAGS="%{optflags} -DUSE_INTERP_RESULT -fno-strict-aliasing"
%else
export CFLAGS="%{optflags} -fno-strict-aliasing"
%endif
export CXXFLAGS="%{optflags} -fno-strict-aliasing"
export FFLAGS="%{optflags}"
mkdir builddir
pushd builddir

# X-server and $DISPLAY required to enable tk bindings
export DISPLAY=%{X_display}
Xvfb %{X_display} >& Xvfb.log &
sleep 5
cmake \
        -DCMAKE_INSTALL_LIBDIR=%{_libdir} \\\
        -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \\\
        -DCMAKE_BUILD_TYPE:STRING=Release \\\
        -DPL_FREETYPE_FONT_PATH:PATH="%{_datadir}/fonts/truetype" \\\
        -DUSE_RPATH:BOOL=OFF \\\
        -DENABLE_ada:BOOL=ON \\\
%if 0%{?octave_enabled}
        -DENABLE_octave:BOOL=ON \\\
        -DTRY_OCTAVE4=ON \\\
%else
        -DENABLE_octave:BOOL=OFF \\\
%endif
        -DENABLE_d:BOOL=ON \\\
        -DENABLE_itcl:BOOL=ON \\\
%if 0%{?tk_enabled} > 1320
        -DENABLE_itk:BOOL=OFF \\\
        -DENABLE_tk:BOOL=OFF \\\
%else
        -DENABLE_itk:BOOL=ON \\\
        -DENABLE_tk:BOOL=ON \\\
%endif
        -DENABLE_ocaml:BOOL=ON \\\
        -DPLD_aqt:BOOL=ON \\\
        -DPLD_conex:BOOL=ON \\\
        -DPLD_plmeta:BOOL=OFF \\\
        -DPLD_mskermit:BOOL=ON \\\
        -DPLD_svg:BOOL=ON \\\
        -DPLD_tek4010:BOOL=ON \\\
        -DPLD_tek4010f:BOOL=ON \\\
        -DPLD_tek4107:BOOL=ON \\\
        -DPLD_tek4107f:BOOL=ON \\\
        -DPLD_versaterm:BOOL=ON \\\
        -DPLD_vlt:BOOL=ON \\\
        -DPLD_xterm:BOOL=ON \\\
        -DPLD_wxwidgets:BOOL=ON \\\
        -DBUILD_DOC:BOOL=OFF \\\
        -DPREBUILT_DOC:BOOL=ON \\\
        -DJAVAWRAPPER_DIR:PATH="%{_libdir}/plplot%{version}" \\\
        -DBUILD_TEST:BOOL=OFF  \\\
        -DENABLE_lua:BOOL=ON \\\
        ..

make %{?_smp_mflags}
popd

%install
pushd builddir
%make_install DESTDIR=%{buildroot}
popd

# Fix up tclIndex files so they are the same on all builds
for file in %{buildroot}%{_datadir}/plplot%{version}/examples/*/tclIndex
do
   grep '^[# ]' ${file} > tclIndex.hd
   grep -v '^[# ]' ${file} | sort > tclIndex
   cat tclIndex.hd tclIndex > ${file}
done
rm -rf %{buildroot}%{_datadir}/plplot%{version}/examples/cmake/modules/Platform

#Remove unnecessary examples that trigger build errors or warnings
rm -f %{buildroot}%{_datadir}/%{name}%{version}/examples/cmake/modules/export_plplot-release.cmake
rm -f %{buildroot}%{_datadir}/%{name}%{version}/examples/test_octave_interactive.sh
rm -f %{buildroot}%{_datadir}/%{name}%{version}/examples/tk/*.in
rm -f %{buildroot}%{_datadir}/%{name}%{version}/examples/tcl/*.in
rm -f %{buildroot}%{_datadir}/%{name}%{version}/examples/tk/tk01

#Remove cmake files for the examples since they don't work anyway due to presence of rpath
rm -f %{buildroot}%{_datadir}/plplot%{version}/examples/CMakeLists.txt
rm -fr %{buildroot}%{_datadir}/plplot%{version}/examples/cmake

#Move doc files to appropriate location
mkdir -p %{buildroot}%{_docdir}
mv %{buildroot}%{_datadir}/doc/%{name} %{buildroot}%{_docdir}/%{name}-doc

%if %{tk_enabled}
#Grant executable permissions to example tk binaries with valid shebang
chmod +x %{buildroot}%{_datadir}/%{name}%{version}/examples/tk/tk03
%endif

#Remove a fortran static library
rm -fr %{buildroot}%{_libdir}/libplf95*.a

%fdupes %{buildroot}%{_datadir}/

## Disable check section for now (until octave tests are fixed)
#%%check
#pushd builddir
## octave tests require Xserver display
#export DISPLAY=%%{X_display}
#Xvfb %%{X_display} >& Xvfb.log &
#sleep 5
#export octaveopts=--no-window-system
#make %%{?_smp_mflags} test_diff_psc
#popd

%post
/sbin/ldconfig
/sbin/install-info %{_infodir}/plplotdoc.info %{_infodir}/dir

%preun
/sbin/install-info --delete %{_infodir}/plplotdoc.info %{_infodir}/dir

%postun -p /sbin/ldconfig

%post -n plplot-ada -p /sbin/ldconfig

%postun -n plplot-ada -p /sbin/ldconfig

%post -n plplot-fortran -p /sbin/ldconfig

%postun -n plplot-fortran -p /sbin/ldconfig

%post -n plplot-tcltk -p /sbin/ldconfig

%postun -n plplot-tcltk -p /sbin/ldconfig

%post -n plplot-qt -p /sbin/ldconfig

%postun -n plplot-qt -p /sbin/ldconfig

%post -n plplot-wxwidgets -p /sbin/ldconfig

%postun -n plplot-wxwidgets -p /sbin/ldconfig

%files doc
%defattr(-,root,root)
%dir %{_docdir}/%{name}-doc
%{_docdir}/%{name}-doc/*

%files
%defattr(-,root,root)
%doc AUTHORS COPYING.LIB Copyright FAQ README README.release
%{_bindir}/pltek
%{_infodir}/plplotdoc.info*
%{_mandir}/man1/pltek.1.gz
# PLMETA DRIVER DISABLED
#%%{_bindir}/plm2gif
#%%{_bindir}/plpr
#%%{_bindir}/plrender
#%%{_mandir}/man1/plm2gif.1.gz
#%%{_mandir}/man1/plpr.1.gz
#%%{_mandir}/man1/plrender.1.gz
%dir %{_datadir}/plplot%{version}
%{_datadir}/plplot%{version}/*.fnt
%{_datadir}/plplot%{version}/*.map
%{_datadir}/plplot%{version}/*.pal
%dir %{_datadir}/plplot%{version}/examples
%{_datadir}/plplot%{version}/examples/lena.pgm
%{_datadir}/plplot%{version}/examples/plplot-test.sh
%{_datadir}/plplot%{version}/examples/plplot-test-interactive.sh
%{_datadir}/plplot%{version}/examples/python/
%{_datadir}/plplot%{version}/examples/test_python.sh
%{python_sitearch}/_plplotcmodule.so
%{python_sitearch}/plplot.py*
%{python_sitearch}/plplotc.py*
%if %{tk_enabled}
%{python_sitearch}/Plframe.py*
%{python_sitearch}/TclSup.py*
%endif
%{_libdir}/libcsirocsa.so.*
%{_libdir}/libplplotcxx.so.*
%{_libdir}/libplplot.so.*
%{_libdir}/libqsastime.so.*

%files devel
%defattr(-,root,root)
%{_includedir}/plplot/
%{_libdir}/libcsirocsa.so
%{_libdir}/libplplotcxx.so
%{_libdir}/libplplot.so
%{_libdir}/libqsastime.so
%{_libdir}/pkgconfig/plplot.pc
%{_libdir}/pkgconfig/plplot-c++.pc
%dir %{_libdir}/cmake/plplot
%{_libdir}/cmake/plplot/export_plplot-release.cmake
%{_libdir}/cmake/plplot/export_plplot.cmake
%{_libdir}/cmake/plplot/plplotConfig.cmake
%dir %{_libdir}/plplot%{version}
%dir %{_libdir}/plplot%{version}/drivers
%{_libdir}/plplot%{version}/drivers/cairo.driver_info
%{_libdir}/plplot%{version}/drivers/cairo.so
%{_libdir}/plplot%{version}/drivers/mem.driver_info
%{_libdir}/plplot%{version}/drivers/mem.so
%if %{tk_enabled}
%{_libdir}/plplot%{version}/drivers/ntk.driver_info
%{_libdir}/plplot%{version}/drivers/ntk.so
%endif
%{_libdir}/plplot%{version}/drivers/null.driver_info
%{_libdir}/plplot%{version}/drivers/null.so
%{_libdir}/plplot%{version}/drivers/ps.so
%{_libdir}/plplot%{version}/drivers/ps.driver_info
%if 0%{?suse_version} >= 1310
%{_libdir}/plplot%{version}/drivers/psttf.driver_info
%{_libdir}/plplot%{version}/drivers/psttf.so
%endif
%{_libdir}/plplot%{version}/drivers/svg.driver_info
%{_libdir}/plplot%{version}/drivers/svg.so
%{_libdir}/plplot%{version}/drivers/xfig.driver_info
%{_libdir}/plplot%{version}/drivers/xfig.so
%{_libdir}/plplot%{version}/drivers/xwin.driver_info
%{_libdir}/plplot%{version}/drivers/xwin.so
%{_datadir}/plplot%{version}/examples/c/
%{_datadir}/plplot%{version}/examples/c++/
%{_datadir}/plplot%{version}/examples/Makefile
%{_datadir}/plplot%{version}/examples/test_c.sh
%{_datadir}/plplot%{version}/examples/test_c_interactive.sh
%{_datadir}/plplot%{version}/examples/test_cxx.sh
%{_datadir}/plplot%{version}/examples/test_diff.sh
%{_mandir}/man3/pl*.3*
# PLMETA DRIVER DISABLED
#%%{_datadir}/plplot%%{version}/examples/test_plrender.sh
#%%{_libdir}/plplot%%{version}/drivers/plmeta.driver_info
#%%{_libdir}/plplot%%{version}/drivers/plmeta.so

%files ada
%defattr(-,root,root)
%{_libdir}/libplplotada.so.*

%files ada-devel
%defattr(-,root,root)
%dir %{_libdir}/ada
%dir %{_libdir}/ada/adalib
%dir %{_datadir}/ada
%dir %{_datadir}/ada/adainclude
%{_libdir}/libplplotada.so
%{_libdir}/ada/adalib/plplotada/
%{_libdir}/pkgconfig/plplot-ada.pc
%{_datadir}/ada/adainclude/plplotada/
%{_datadir}/plplot%{version}/examples/ada/
%{_datadir}/plplot%{version}/examples/test_ada.sh

%files fortran
%defattr(-,root,root)
%{_libdir}/libplplotf95c.so.*
%{_libdir}/libplplotf95.so.*

%files fortran-devel
%defattr(-,root,root)
%dir %{_libdir}/fortran
%dir %{_libdir}/fortran/modules
%{_libdir}/fortran/modules/plplot/
%{_libdir}/libplplotf95c.so
%{_libdir}/libplplotf95.so
%{_libdir}/pkgconfig/plplot-f95.pc
%{_datadir}/plplot%{version}/examples/f95/
%{_datadir}/plplot%{version}/examples/test_f95.sh

%files lua
%defattr(-,root,root)
%{_libdir}/lua/%{lua_version}/plplot/
%{_datadir}/plplot%{version}/examples/lua/
%{_datadir}/plplot%{version}/examples/test_lua.sh

%files java
%defattr(-,root,root)
%{_libdir}/plplot%{version}/plplotjavac_wrap.so
%{_datadir}/java/plplot.jar
%{_datadir}/plplot%{version}/examples/java/
%{_datadir}/plplot%{version}/examples/test_java.sh

%files tcltk
%defattr(-,root,root)
%{_libdir}/libplplottcltk*.so.*
%{_libdir}/libtclmatrix.so.*

%files tcltk-devel
%defattr(-,root,root)
%{_bindir}/pltcl
%{_libdir}/libplplottcltk*.so
%{_libdir}/libtclmatrix.so
%{_libdir}/pkgconfig/plplot-tcl*.pc
%{_datadir}/plplot%{version}/examples/test_tcl.sh
%{_datadir}/plplot%{version}/examples/tcl/
%{_datadir}/plplot%{version}/pkgIndex.tcl
%{_datadir}/plplot%{version}/tcl/
%{_mandir}/man1/plserver.1.gz
%{_mandir}/man1/pltcl.1.gz
%{python_sitearch}/plplot_widgetmodule.so
%if %{tk_enabled}
%{_bindir}/plserver
%{_datadir}/plplot%{version}/examples/tk/
%{_libdir}/plplot%{version}/drivers/tk.driver_info
%{_libdir}/plplot%{version}/drivers/tk.so
%{_libdir}/plplot%{version}/drivers/tkwin.driver_info
%{_libdir}/plplot%{version}/drivers/tkwin.so
%endif

%files wxwidgets
%defattr(-,root,root)
%{_bindir}/wxPLViewer
%{_libdir}/libplplotwxwidgets.so.*

%files wxwidgets-devel
%defattr(-,root,root)
%{_libdir}/libplplotwxwidgets.so
%{_libdir}/pkgconfig/plplot-wxwidgets.pc
%{_libdir}/plplot%{version}/drivers/wxwidgets.driver_info
%{_libdir}/plplot%{version}/drivers/wxwidgets.so

%files python-qt
%defattr(-,root,root)
%{python_sitearch}/plplot_pyqt4.so

%files qt
%defattr(-,root,root)
%{_libdir}/libplplotqt.so.*

%files qt-devel
%defattr(-,root,root)
%{_libdir}/libplplotqt.so
%{_libdir}/pkgconfig/plplot-qt.pc
%{_libdir}/plplot%{version}/drivers/qt.driver_info
%{_libdir}/plplot%{version}/drivers/qt.so

%if 0%{?octave_enabled} 
%files octave
%defattr(-,root,root)
%{_datadir}/%{name}_octave/
%{_datadir}/octave/site/m/PLplot/
%{_libdir}/octave/site/oct/*/plplot_octave.oct
%{_datadir}/plplot%{version}/examples/octave/
%{_datadir}/plplot%{version}/examples/lena.img
%{_datadir}/plplot%{version}/examples/test_octave.sh
%endif

%changelog