File jMemorize.spec of Package jMemorize
#
# spec file for package jMemorize
#
# 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: jMemorize
Summary: Vocabulary learning program based on Leitner flashcard system
Group: Amusements/Teaching/Language
Version: 1.3.1
Release: 1
License: GPL-2.0+
Url: http://jmemorize.org
Vendor: openSUSE-Education
BuildArch: noarch
Requires: java >= 1.6.0
BuildRequires: unzip
BuildRequires: update-alternatives
BuildRequires: java-devel
BuildRequires: ant
%if 0%{?suse_version} > 1020
BuildRequires: ant-nodeps
%endif
BuildRequires: update-desktop-files
Source0: %{name}-%{version}-source.zip
Source1: %{name}.desktop
Source2: %{name}.png
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
jMemorize is written in Java and uses Leitner-flashcards to make
memorizing facts not only more efficient but also more fun.
jMemorize manages your learn progress and features categories,
statistics and a visually appealing and intuitive interface.
%prep
%setup -q -n %{name}-%{version}
%build
%ant dist-bin
%install
%__install -d -m 755 %{buildroot}%{_javadir}/%{name}
%__install -m 755 dist/%{version}/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}/
# startscript
cat > %{name} << EOF
#!/bin/sh
java -jar %{_javadir}/%{name}/%{name}-%{version}.jar
EOF
%__install -d -m 755 %{buildroot}%{_bindir}
%__install -m 755 %{name} %{buildroot}%{_bindir}/
# Icon
%__install -D -p -m 644 %{SOURCE2} %{buildroot}%{_datadir}/pixmaps/%{name}.png
# Desktop menu entry
%__install -d -m 755 %{buildroot}%{_datadir}/applications
%__install -m 644 %{SOURCE1} %{buildroot}%{_datadir}/applications/%{name}.desktop
%suse_update_desktop_file %{name}
%clean
%__rm -rf %{buildroot}
%files
%defattr(-,root,root)
%doc README LICENSE CHANGELOG
%{_bindir}/*
%dir %{_javadir}/%{name}
%{_javadir}/%{name}/*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%changelog