File qcas.spec of Package qcas
#
# spec file for package qcas
#
# 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 https://bugs.opensuse.org/
#
Name: qcas
Version: 0.5.3
Release: 0
Summary: Giac/Xcas Qt user interface
License: GPL-3.0-or-later
Group: Productivity/Scientific/Math
URL: http://webusers.imj-prg.fr/~frederic.han/qcas/
Source0: https://git.tuxfamily.org/qcas/qcas.git/snapshot/qcas-%{version}.tar.gz
BuildRequires: ImageMagick
BuildRequires: gcc-c++
BuildRequires: giac-devel
BuildRequires: glibc-devel
BuildRequires: gmp-devel
BuildRequires: hicolor-icon-theme
BuildRequires: pkg-config
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Svg)
BuildRequires: pkgconfig(Qt5Xml)
Requires: hicolor-icon-theme
Recommends: giac-doc
%description
A Qt frontend to the C++ library giac, a computer algebra system. Qcas
implements most of the giac/xcas functionalities, except 3D graphics.
%prep
%setup -q
# Fix files is compiled without RPM_OPT_FLAG
find . -type f -name \*.pro | while read f; do
echo "QMAKE_CXXFLAGS += %{optflags}" >> "$f"; done
# Icon file not found
find -name \*.desktop -exec sed -i '/Icon/s/[^=]*$/%{name}/' {} +
%build
mkdir build
pushd build
%qmake5 ../qcas.pro
%make_jobs
popd
%install
install -Dm 0755 build/%{name} %{buildroot}%{_bindir}/%{name}
install -Dm 644 qt/images/icon.png %{buildroot}%{_datadir}/icons/hicolor/200x200/apps/qcas.png
%suse_update_desktop_file -i -r %{name} Qt Education Math
%post
%icon_theme_cache_post
%desktop_database_post
%postun
%icon_theme_cache_postun
%desktop_database_postun
%files
%license COPYING
%{_bindir}/%{name}
%{_datadir}/applications/qcas.desktop
%dir %{_datadir}/icons/hicolor/200x200/
%dir %{_datadir}/icons/hicolor/200x200/apps/
%{_datadir}/icons/hicolor/200x200/apps/qcas.png
%changelog