File laeqed.spec of Package laeqed
#
# spec file for package laeqed
#
# Copyright (c) 2013 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/
#
%define jarname Laeqed
Name: laeqed
Version: 1.2
Release: 0
Summary: Latex equation editor that stores equations as png images
License: MIT
Group: Productivity/Publishing/TeX/Frontends
Url: http://www.thrysoee.dk/laeqed/
Source: %{name}.tar.gz
%if 0%{?suse_version} < 1210
BuildRequires: ant-apache-regexp
BuildRequires: ant-nodeps
%endif
BuildRequires: ant
BuildRequires: java-devel-openjdk >= 1.5.0
BuildRequires: swing-layout
Requires: java >= 1.5.0
%if 0%{?suse_version} < 1210
Requires: texlive-bin
Requires: texlive-latex
%else
Requires: texlive-collection-binextra
Requires: texlive-collection-latex
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
Laeqed is a LaTeX equation editor specifically targeted at
producing PNG images of math equations for use on web pages.
It runs wherever Java and LaTeX runs, i.e. Linux, Windows, Mac...
Laeqed stores the LaTeX equation into the PNG image, so it can be
reopened later for further editing.
%prep
%setup -q -n %{jarname}-%{version}
%build
%ant -Dlibs.swing-layout.classpath="%{_datadir}/java/swing-layout.jar" jar
%install
# jars
install -d -m 0755 "%{buildroot}%{_datadir}/%{name}"
install -m 0644 dist/%{jarname}.jar "%{buildroot}%{_datadir}/%{name}/"
# startscript
install -d -m 0755 "%{buildroot}%{_bindir}"
cat > "%{buildroot}%{_bindir}/%{name}" << EOF
#!/bin/sh
exec java -jar %{_datadir}/%{name}/%{jarname}.jar
EOF
chmod 0755 "%{buildroot}%{_bindir}/%{name}"
%files
%defattr(-,root,root)
%doc ChangeLog COPYING
%{_datadir}/%{name}
%{_bindir}/%{name}
%changelog