Blob Blame History Raw
%global version_tag 0.51

Name:           equalx
Version:        0.5.1
Release:        2%{?dist}
Summary:        A graphical editor for writing LaTeX equations

License:        GPLv3+
URL:            http://equalx.sourceforge.net
Source0:        http://downloads.sourceforge.net/%{name}/%{name}_%{version_tag}.orig.zip
Source1:        %{name}.desktop

# https://bugs.launchpad.net/equalx/+bug/918337
Patch0:         %{name}-return.patch
Patch1:         %{name}-init-order.patch

BuildRequires:  desktop-file-utils
BuildRequires:  qt4-devel 
Requires:       tex(dvips)
Requires:       tex(latex)
Requires:       dvipdfm
Requires:       dvipng


%description
EqualX is an application that helps you write equations in LaTeX
and preview them in real-time.

%prep
%setup -q -n %{name}-%{version_tag}
%patch0 -p1
%patch1 -p1

# fix line endings
sed 's|\r||g' LICENSE >LICENSE.new
touch -r LICENSE LICENSE.new
mv LICENSE.new LICENSE


%build
qmake-qt4
make %{?_smp_mflags}


%install
install -D -p bin/%{name} %{buildroot}%{_bindir}/%{name}
install -D -p resources/icons/%{name}-icon.png %{buildroot}%{_datadir}/pixmaps/%{name}.png

desktop-file-install \
  --dir %{buildroot}%{_datadir}/applications \
  %{SOURCE1}


%files
%doc COPYING LICENSE THANKS changelog 
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png


%changelog
* Wed Jan 18 2012 Martin Gieseking <martin.gieseking@uos.de> 0.5.1-2
- added patches to fix serious warnings
- preserve timestamps in %%install
- more descriptive summary

* Tue Jan 17 2012 Martin Gieseking <martin.gieseking@uos.de> 0.5.1-1
- initial package