Name: wxMaxima
Version: 18.10.1
Release: 1%{?_dist_release}

License: GPL
Group:   Applications/Engineering
URL:     http://wxmaxima.sourceforge.net/

Source0: wxmaxima-Version-%{version}.tar.gz

BuildRoot: %{_tmppath}/%{name}-%{version}-root

BuildRequires: cmake
BuildRequires: libxml2-devel, desktop-file-utils
BuildRequires: wxGTK3-devel

Requires: maxima


Summary: Graphical user interface for Maxima
Summary(ja): Maxima のグラフィカルユーザインタフェース

%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
%{__rm} -rf ${RPM_BUILD_ROOT}
%setup -q -n wxmaxima-Version-%{version}

%build
%{__cmake} -DCMAKE_INSTALL_PREFIX=%{_prefix} .
%{__make} %{?_smp_mflags}

%install
%{make_install}

# move HTML document
%{__mkdir_p} ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}/html
%{__mv} ${RPM_BUILD_ROOT}%{_docdir}/wxmaxima/* \
 ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}/html
%{__rm} -rf ${RPM_BUILD_ROOT}%{_docdir}/wxmaxima

%clean
%{__rm} -rf ${RPM_BUILD_ROOT}

%post
update-desktop-database -q &> /dev/null

%postun
update-desktop-database -q &> /dev/null


%files
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING README.md
%{_bindir}/*
%{_datadir}/applications/wxMaxima.desktop
%{_datadir}/bash-completion/
%{_datadir}/locale/
%{_datadir}/metainfo/
%{_datadir}/mime/
%{_datadir}/pixmaps/
%{_datadir}/wxMaxima/
%{_mandir}/man1/wxmaxima.1.gz


%changelog
* Mon Oct 08 2018 Toshiaki Ara <ara_t@384.jp> - 18.10.1-1
- update to 18.10.1

* Sat Jun 09 2018 Toshiaki Ara <ara_t@384.jp> - 18.02.0-1
- update to 18.02.0 for VineSeed
- drop Patch0 (fix_desktop.patch)
- add BuildRequires: cmake
- change BuildRequires: wxGTK3-devel

* Sat Nov 05 2016 Toshiaki Ara <ara_t@384.jp> - 14.12.1-1
- update to 14.12.1
- delete configure option "--enable-dnd"
- merge VineSeed and Vine6

* Thu Sep 01 2016 Toshiaki Ara <ara_t@384.jp> - 5.0.1-2
- rebuild with gcc-5.4.0

* Sun Jul 08 2012 Toshiharu Kudoh <toshi.kd2@gmail.com> - 12.04.0-1
- new usptream release
- added Summary(ja)
- added BuildRequires: desktop-file-utils
- changed BuildRequires: wx-gtk2-devel to wxGTK-devel
- run desktop-file-utils
- run update-desktop-database

* Tue Oct 14 2008 Shu KONNO <owa@bg.wakwak.com> 1.2-1vl5
- applied new versioning policy, spec in utf-8

* Sun Dec 30 2007 Shu KONNO <owa@bg.wakwak.com> 1.2-0vl4
- rebuilt with wx-gtk2-2.8.7

* Thu May  3 2007 USAMI Kosuke <usami-k@yc5.so-net.ne.jp> - 0.7.2-0vl1
- Initial build.

