-# TODO:
-# - desktop
Summary: A Program for calculating many kind of things
Summary(pl): Program do ³atwego wykonywania obliczeñ matematycznych
Name: MathPlanner
-Version: 3.0.4
-Release: 0.5
+Version: 3.1.3
+Release: 0.1
License: GPL v2
Group: X11/Applications/Publishing
Source0: http://koti.mbnet.fi/jarmonik/%{name}-%{version}.tar.gz
-Patch0: %{name}-ac_fix.patch
-Patch1: %{name}-plugin.patch
-URL: http://koti.mbnet.fi/jarmonik
+# Source0-md5: 803a8de68056a4ec2e4c456b1ba9b320
+Source1: %{name}.desktop
+Patch0: MathPlanner-no_qstyles.patch
+URL: http://koti.mbnet.fi/jarmonik/
BuildRequires: autoconf
BuildRequires: automake
-BuildRequires: kdelibs-devel >= 3
BuildRequires: libtool
BuildRequires: qt-devel >= 3.0.5
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-%define _prefix /usr/X11R6
%define _mathdir %{_datadir}/MathPlanner
%description
%prep
%setup -q
-%patch0 -p0
-%patch1 -p1
+%patch0
%build
-QTDIR="/usr/X11R6"
+QTDIR="%{_prefix}"
export QTDIR
+rm -f missing
%{__libtoolize}
-aclocal
+%{__aclocal}
%{__autoconf}
%{__automake}
%configure
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_pixmapsdir}/mini
+install -d $RPM_BUILD_ROOT{%{_pixmapsdir}/{mini,hicolor/{32x32,64x64}/mimetypes/},%{_desktopdir}} \
+ $RPM_BUILD_ROOT%{_datadir}/mimelnk/application/
-%{__make} install DESTDIR=$RPM_BUILD_ROOT
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
-install icons/*.xpm $RPM_BUILD_ROOT%{_pixmapsdir}
-install icons/mini/*.xpm $RPM_BUILD_ROOT%{_pixmapsdir}/mini
+install icons/64x64/apps/*.png $RPM_BUILD_ROOT%{_pixmapsdir}
+install icons/64x64/mimetypes/*.png $RPM_BUILD_ROOT%{_pixmapsdir}/hicolor/64x64/mimetypes/
+install icons/32x32/mimetypes/*.png $RPM_BUILD_ROOT%{_pixmapsdir}/hicolor/32x32/mimetypes/
+install mpl2.desktop $RPM_BUILD_ROOT%{_datadir}/mimelnk/application/
+install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
%clean
rm -rf $RPM_BUILD_ROOT
%dir %{_mathdir}
%{_mathdir}/*.txt
%{_mathdir}/pixmaps/*
-%{_pixmapsdir}/*.xpm
-%{_pixmapsdir}/mini/*.xpm
+%{_mathdir}/ts/*
+%{_pixmapsdir}/*.png
+%{_pixmapsdir}/hicolor/*/mimetypes/*.png
+%{_datadir}/mimelnk/application/*.desktop
+%{_desktopdir}/*.desktop