equalx/equalx.spec
OBS User mrdocs 7010c10a7a Accepting request 228149 from home:badshah400:branches:Publishing
Update to version 0.7.1; drop external .desktop file and use the one bundled in upstream tarball (since this version)

OBS-URL: https://build.opensuse.org/request/show/228149
OBS-URL: https://build.opensuse.org/package/show/Publishing/equalx?expand=0&rev=7
2014-03-30 05:22:16 +00:00

118 lines
3.7 KiB
RPMSpec

#
# spec file for package equalx
#
# Copyright (c) 2014 SUSE LINUX Products 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/
#
Name: equalx
Version: 0.7.1
Release: 0
Summary: Editor for writing and exporting TeX/LaTeX equations
License: GPL-3.0+
Group: Productivity/Publishing/TeX/Frontends
Url: http://equalx.sourceforge.net/
Source0: http://downloads.sourceforge.net/equalx/%{name}-%{version}.tar.gz
# PATCH-FIX-OPENSUSE equalx-fix-desktop-file.patch badshah400@gmail.com -- Fix icon tag in desktop file and categories for compatibility with openSUSE defined ones
Patch0: equalx-fix-desktop-file.patch
BuildRequires: ImageMagick
BuildRequires: desktop-file-utils
BuildRequires: fdupes
BuildRequires: ghostscript
BuildRequires: hicolor-icon-theme
BuildRequires: inkscape
BuildRequires: libqt4-devel >= 4.8.0
BuildRequires: pkg-config
BuildRequires: pkgconfig(exempi-2.0)
Requires: ghostscript
Requires: libqt4-sql-sqlite
Requires: poppler-tools
Requires: texlive-latex
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
EqualX is a helpful graphical interface to LaTeX programs.
It gives you the power and beauty for writing TeX/LaTeX equations
in a simple to use editor.
Features included:
* Highlight find results in the Equation Preview;
* 3 modes for Refreshing the Preview
* Customise the export commands
* Professional & customisable window layout
* Equation font is computed according to desktop DPI
* Reshaping the Symbols toolbar and Templates toolbar
%prep
%setup -q
%patch0 -p1
sed -i 's/\r$//' LICENSE README
%build
qmake DESTDIR="./bin/" QMAKE_CFLAGS="%optflags" QMAKE_CXXFLAGS="%optflags"
make %{?_smp_mflags}
%install
install -D -p bin/%{name} %{buildroot}%{_bindir}/%{name}
# GENERATE HI-RES APPLICATION ICONS
pushd resources/icons/equalx
for i in 256 512;
do
convert -density ${i}x -geometry ${i}x equalx.svg equalx-${i}x${i}.png
done
popd
# INSTALL RESOURCES DIR
mkdir -p %{buildroot}%{_datadir}/%{name}
cp -pr resources %{buildroot}%{_datadir}/%{name}/
# LINK ICON FILES TO HICOLOR ICON DIR
for i in 22 24 32 48 64 128 256 512;
do
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps
ln -s %{_datadir}/%{name}/resources/icons/equalx/equalx-${i}x${i}.png \
%{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/equalx.png
done
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/scalable/apps
ln -s %{_datadir}/%{name}/resources/icons/equalx/equalx.svg \
%{buildroot}%{_datadir}/icons/hicolor/scalable/apps/equalx.svg
desktop-file-install resources/%{name}.desktop
# REMOVE UNUSED DESKTOP FILE
rm %{buildroot}%{_datadir}/%{name}/resources/%{name}.desktop
%fdupes %{buildroot}%{_datadir}/%{name}
%post
%icon_theme_cache_post
%desktop_database_post
%postun
%icon_theme_cache_postun
%desktop_database_postun
%files
%defattr(-,root,root)
%doc changelog README LICENSE THANKS
%{_bindir}/%{name}
# OWN THE 512x512 ICON DIR AS HICOLOR THEME DOES NOT PROVIDE IT YET
%dir %{_datadir}/icons/hicolor/512x512
%dir %{_datadir}/icons/hicolor/512x512/apps
%{_datadir}/icons/hicolor/*/apps/%{name}.*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/%{name}/
%changelog