File OruxMapsDesktop.spec of Package OruxMapsDesktop
#
# spec file for package OruxMapsDesktop
#
# Copyright (c) 2024 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
Name: OruxMapsDesktop
Version: 2.1.0beta
Release: 0
Summary: Convert and calibrate maps for use with OruxMaps
License: LGPL-2.1-or-later AND Apache-2.0 AND BSD-3-Clause AND MIT
Group: Productivity/Scientific/Other
URL: https://www.oruxmaps.com
Source: https://www.oruxmaps.com/OruxMapsDesktop.zip
Source1: https://www.oruxmaps.com/oruxmapsdesktop_en.pdf
Source2: %{name}.desktop
Source3: oruxmapsdesktop.png
BuildRequires: unzip
Requires: java >= 1.7.0
BuildArch: noarch
%description
Java application to convert and calibrate maps for use with OruxMaps
%prep
%autosetup -n OruxMapsDesktop
%build
%install
# startscript
cat > %{name} << 'EOF'
#!/bin/sh
#
# OruxMapsDesktop startscript
#
cd "%{_datadir}/%{name}"
java -Xmx1024m -jar %{_datadir}/%{name}/OruxMapsDesktop.jar "$@"
EOF
install -d -m 755 %{buildroot}%{_bindir}
install -m 755 %{name} %{buildroot}%{_bindir}/
install -d -m 755 %{buildroot}%{_datadir}/%{name}
install -m 644 OruxMapsDesktop.jar %{buildroot}%{_datadir}/%{name}/
install -m 644 datums.txt %{buildroot}%{_datadir}/%{name}/
install -m 644 Ozi2Orux.txt %{buildroot}%{_datadir}/%{name}/
install -m 644 okmdatums.xml %{buildroot}%{_datadir}/%{name}/
install -d -m 755 %{buildroot}%{_datadir}/%{name}/lib
install -m 644 lib/* %{buildroot}%{_datadir}/%{name}/lib/
install -d -m 755 %{buildroot}%{_docdir}/%{name}
install -m 644 %{SOURCE1} %{buildroot}%{_docdir}/%{name}/
install -d -m 755 %{buildroot}%{_datadir}/applications/
install -m 644 %{SOURCE2} %{buildroot}%{_datadir}/applications/
install -d -m 755 %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/
install -m 644 %{SOURCE3} %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/
%files
%doc %{_docdir}/%{name}/
%{_bindir}/%{name}
%{_datadir}/%{name}/
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/
%changelog