File wxMaxima.spec of Package wxMaxima
#
# spec file for package wxMaxima
#
# 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/
#
%define tarname wxmaxima
Name: wxMaxima
Version: 16.04.2
Release: 0
Summary: Graphical User Interface for the maxima Computer Algebra System
License: GPL-2.0+
Group: Productivity/Scientific/Math
Url: http://wxmaxima.sourceforge.net/
Source0: http://download.sourceforge.net/wxmaxima/%{tarname}-%{version}.tar.gz
Source1: wxMaxima.desktop
Source2: %{name}-rpmlintrc
# PATCH-FIX-UPSTREAM wxMaxima-appstream-xml-filename.patch badshah400@gmail.com -- Fix the appstream xml file name (must be identical to .desktop file name w/o ext) and the reference to the .desktop file therein (refers to wxmaxima.desktop while installing wxMaxima.desktop); reported upstream
Patch0: wxMaxima-appstream-xml-filename.patch
# REQUIRED FOR PATCH0
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: hicolor-icon-theme
BuildRequires: inkscape
BuildRequires: maxima >= 5.30.0
BuildRequires: update-desktop-files
BuildRequires: wxWidgets-devel >= 3
# gnuplot is needed for plotting
Requires: gnuplot
# libgnomeprint is needed for printing
Requires: libgnomeprint
Requires: maxima >= 5.30.0
Requires(post): %{install_info_prereq}
Requires(preun): %{install_info_prereq}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExcludeArch: ppc64 ppc64le
%description
wxMaxima is a cross platform GUI for the computer algebra system maxima
based on wxWidgets.
wxMaxima features include:
* 2D formatted math display: wxMaxima implements its own math display
engine to nicely display maxima output.
* Menu system: most maxima commands are available through menus. Most
used functions are also available through a button panel at below
the input line.
* Dialogs: commands which require more that one argument can be entered
through dialogs so that there is no need to remember the exact syntax.
* Command line history: the input line has command history and command
completion based on previous input.
* Create documents: text can be mixed with math calculations to create
documents. See the howto for tips on how to use these features.
Documents can be saved and edited again later.
%prep
%setup -q -n %{tarname}-%{version}
%patch0 -p1
%build
autoreconf -fvi
%configure \
--enable-printing \
--enable-unicode-glyphs \
--docdir=%{_docdir}/%{name}
make %{?_smp_mflags}
%install
%make_install
# REMOVE UPSTREAM INSTALLED DESKTOP FILE BECAUSE IT IS INCOMPLETE...
rm %{buildroot}%{_datadir}/applications/wxMaxima.desktop
# ...THEN INSTALL OURS
install -D -m 644 %{SOURCE1} %{buildroot}%{_datadir}/applications/wxMaxima.desktop
# INSTALL HI-RES ICONS GENERATED OUT OF UPSTREAM SVG ICON
for i in 24 32 48 64 128 256 512
do
inkscape -w ${i} data/wxmaxima.svg -e wxmaxima-${i}.png
install -D -m 0644 wxmaxima-${i}.png %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/wxmaxima.png
done
install -D -m 0644 data/wxmaxima.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/wxmaxima.svg
# REMOVE UNNECESSARY ICONS OUT OF PIXMAPS
rm %{buildroot}%{_datadir}/pixmaps/wxmaxima*
%suse_update_desktop_file wxMaxima
%fdupes %{buildroot}%{_prefix}
%find_lang %{name}
%post
%desktop_database_post
%icon_theme_cache_post
%mime_database_post
%install_info --info-dir=%{_infodir} %{_infodir}/wxmaxima.info%{ext_info}
%postun
%desktop_database_postun
%icon_theme_cache_postun
%mime_database_postun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/wxmaxima.info%{ext_info}
%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS COPYING README.md ChangeLog
%{_bindir}/*
%{_datadir}/wxMaxima/
%dir %{_datadir}/icons/hicolor/512x512
%dir %{_datadir}/icons/hicolor/512x512/apps
%{_datadir}/icons/hicolor/*/apps/wxmaxima.*
%{_datadir}/applications/wxMaxima.desktop
%if 0%{?suse_version} == 1315
%dir %{_datadir}/appdata
%endif
%{_datadir}/bash-completion/completions/wxmaxima
%{_datadir}/appdata/wxMaxima.appdata.xml
%{_mandir}/man1/wxmaxima*%{ext_man}
%{_infodir}/wxmaxima.info%{ext_info}
%{_datadir}/mime/packages/*.xml
%{_datadir}/pixmaps/*.svg
%changelog