File kalzium.spec of Package kalzium

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


%bcond_without lang

Name:           kalzium
Version:        18.04.3
Release:        0
%define kf5_version 5.26.0
# Latest stable Applications (e.g. 17.08 in KA, but 17.11.80 in KUA)
%{!?_kapp_version: %global _kapp_version %(echo %{version}| awk -F. '{print $1"."$2}')}
Summary:        Periodic Table of Elements
License:        GPL-2.0-or-later
Group:          Productivity/Scientific/Chemistry
Url:            http://edu.kde.org
Source0:        %{name}-%{version}.tar.xz
BuildRequires:  avogadrolibs-devel
BuildRequires:  eigen3-devel
BuildRequires:  extra-cmake-modules
BuildRequires:  fdupes
BuildRequires:  freeglut-devel
BuildRequires:  gettext-devel
BuildRequires:  glew-devel
BuildRequires:  karchive-devel
BuildRequires:  kconfig-devel
BuildRequires:  kcoreaddons-devel
BuildRequires:  kdelibs4support-devel
BuildRequires:  khtml-devel
BuildRequires:  ki18n-devel
BuildRequires:  knewstuff-devel
BuildRequires:  kparts-devel
BuildRequires:  kplotting-devel
BuildRequires:  kunitconversion-devel
BuildRequires:  kwidgetsaddons-devel
BuildRequires:  libopenbabel-devel
BuildRequires:  oxygen5-icon-theme-large
BuildRequires:  pkgconfig
BuildRequires:  python-devel
BuildRequires:  solid-devel
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5Gui)
BuildRequires:  pkgconfig(Qt5OpenGL)
BuildRequires:  pkgconfig(Qt5Script)
BuildRequires:  pkgconfig(Qt5Svg)
BuildRequires:  pkgconfig(Qt5Widgets)
# currently in DOESNOTBUILD (2008-07-03)
%ifnarch ppc ppc64 s390 s390x
BuildRequires:  ocaml
BuildRequires:  ocaml(Facile)
%endif
%if %{with lang}
Recommends:     %{name}-lang
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%py_requires

%description
Kalzium shows a periodic table of the elements.

%package devel
Summary:        Periodic Table of Elements
Group:          Development/Libraries/KDE
Requires:       kalzium = %{version}

%description devel
Kalzium shows a periodic table of the elements.

%if %{with lang}
%lang_package
%endif

%prep
%setup -q

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

%install
  %kf5_makeinstall -C build
  %if %{with lang}
    %find_lang %{name} --with-man --all-name
    %kf5_find_htmldocs
  %endif
  %fdupes -s %{buildroot}

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc %lang(en) %{_kf5_htmldir}/en/kalzium/
%doc COPYING*
%dir %{_kf5_appstreamdir}
%{_kf5_applicationsdir}/org.kde.kalzium.desktop
%{_kf5_applicationsdir}/org.kde.kalzium_cml.desktop
%{_kf5_appstreamdir}/org.kde.kalzium.appdata.xml
%{_kf5_bindir}/kalzium
%config %{_kf5_configdir}/kalzium.knsrc
%{_kf5_configkcfgdir}/
%{_kf5_iconsdir}/hicolor/*/apps/kalzium.*
%{_kf5_kxmlguidir}/kalzium/
%{_kf5_libdir}/libcompoundviewer.so.*
%{_kf5_libdir}/libscience.so.*
%{_kf5_sharedir}/kalzium/
%{_kf5_sharedir}/libkdeedu/
%{_kf5_mandir}/man1/kalzium.1%{ext_man}

%files devel
%defattr(-,root,root)
%doc COPYING*
%{_includedir}/libkdeedu/
%{_kf5_libdir}/libscience.so
%{_kf5_libdir}/libcompoundviewer.so

%if %{with lang}
%files lang -f %{name}.lang
%doc COPYING*
%endif

%changelog
openSUSE Build Service is sponsored by