File cantor.spec of Package cantor

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


%global libMAJOR 6

Name:           cantor
Version:        15.12.3
Release:        0
Summary:        Worksheet GUI for mathematical software
License:        GPL-2.0+
Group:          Amusements/Teaching/Mathematics
Url:            http://edu.kde.org
Source0:        %{name}-%{version}.tar.xz
BuildRequires:  R-base
BuildRequires:  R-base-devel
BuildRequires:  analitza-devel
BuildRequires:  fdupes
BuildRequires:  gcc-fortran
BuildRequires:  help2man
BuildRequires:  extra-cmake-modules
BuildRequires:  karchive-devel
BuildRequires:  kconfig-devel
BuildRequires:  kcoreaddons-devel
BuildRequires:  kdelibs4support-devel
BuildRequires:  kpty-devel
BuildRequires:  kf5-filesystem
BuildRequires:  knewstuff-devel
BuildRequires:  kparts-devel
BuildRequires:  ktexteditor-devel
BuildRequires:  libspectre-devel
BuildRequires:  perl
BuildRequires:  python-devel
BuildRequires:  python3-devel
BuildRequires:  xz
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5Svg)
BuildRequires:  pkgconfig(Qt5Test)
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  pkgconfig(Qt5Xml)
BuildRequires:  pkgconfig(Qt5XmlPatterns)
Recommends:     maxima
Recommends:     octave
Obsoletes:      %{name}5 < %{version}
Provides:       %{name}5 = %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
A frontend to several existing mathematical software such as R, Sage
and Maxima: Cantor. Cantor offers a worksheet as a nice GUI for all
those backends and is not targeted to kids but to scientists.

%package devel
Summary:        Worksheet GUI for mathematical software
Group:          Development/Libraries/KDE
Requires:       libcantorlibs%{libMAJOR} = %{version}

%description devel
A frontend to several existing mathematical software such as R, Sage
and Maxima: Cantor. Cantor offers a worksheet as a nice GUI for all
those backends and is not targeted to kids but to scientists.

%package -n libcantorlibs%{libMAJOR}
Summary:        Shared libraries for Cantor
Group:          System/Libraries

%description -n libcantorlibs%{libMAJOR}
Shared libraries for package cantor.

%prep
%setup -q

mkdir .doc
cd src/backends
for d in *
do ! ln -T "${d}/DESIGN" "../../.doc/${d}"
done

%build
%ifarch ppc ppc64
export RPM_OPT_FLAGS="%{optflags} -mminimal-toc"
%endif
  %cmake_kf5 -d build
  %make_jobs

%install
  %kf5_makeinstall -C build
  

%post -n libcantorlibs%{libMAJOR} -p /sbin/ldconfig

%postun -n libcantorlibs%{libMAJOR} -p /sbin/ldconfig

%files devel
%defattr(-,root,root)
%doc COPYING
%{_kf5_libdir}/libcantorlibs.so
%{_kf5_prefix}/include/cantor/

%files
%defattr(-,root,root)
%doc COPYING COPYING.DOC README TODO DESIGN .doc/*
%{_kf5_sharedir}/cantor/
%{_kf5_applicationsdir}/org.kde.cantor.desktop
%{_kf5_bindir}/cantor
%{_kf5_bindir}/cantor_python3server
%{_kf5_bindir}/cantor_rserver
%{_kf5_configkcfgdir}/
%doc %lang(en) %{_kf5_htmldir}/en/*/
%{_kf5_iconsdir}/hicolor/*/apps/*
%{_kf5_libdir}/libcantor_config.so
%{_kf5_libdir}/libcantor_pythonbackend.so
%{_kf5_sharedir}/appdata/
%{_kf5_plugindir}/
%{_kf5_kxmlguidir}/cantor/
%(config) %{_kf5_configdir}/*.knsrc

%files -n libcantorlibs%{libMAJOR}
%defattr(-,root,root)
%doc COPYING
%{_kf5_libdir}/libcantorlibs.so.*

%changelog
openSUSE Build Service is sponsored by