Name: wxMaxima
Version: 12.04.0
Release: 1%{?_dist_release}
License: GPL
Group: Applications/Engineering
URL: http://wxmaxima.sourceforge.net/
Source0: %{name}-%{version}.tar.gz
Patch0: fix_desktop.patch

BuildRoot: %{_tmppath}/%{name}-%{version}-root
Requires: maxima >= 5.11
BuildRequires: libxml2-devel, wxGTK-devel, desktop-file-utils

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
%setup -q
%patch0 -p1

%build
%configure --enable-dnd --enable-printing
make

%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}

desktop-file-install --vendor="" \
	--dir %{buildroot}%{_datadir}/applications \
	--add-category="Development" \
	--add-category="Math" \
	--remove-category="Utility" \
	wxmaxima.desktop

%find_lang %{name}

%clean
rm -rf %{buildroot}

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

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

%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS COPYING ChangeLog README
%{_bindir}/*
%{_datadir}/%{name}/*
%{_datadir}/applications/wxmaxima.desktop

%changelog
* 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.

