File gpsprune.spec of Package prunegps

# spec file for package gpsprune
# Copyright (c) 2022 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

Name:           gpsprune
Summary:        Viewing, editing and converting coordinate data from GPS systems
License:        GPL-2.0-only
Group:          Productivity/Other
Version:        23.2
Release:        0
Requires:       java >= 9
BuildRequires:  ant
BuildRequires:  ant-nodeps
BuildRequires:  java-3d
BuildRequires:  java-devel >= 9
BuildRequires:  jpackage-utils
BuildRequires:  unzip
BuildRequires:  update-alternatives
BuildRequires:  update-desktop-files
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source1:        %{name}.desktop
Source2:        %{name}.png
Source101:      build.xml
BuildArch:      noarch

Prune is an application for viewing, editing and converting coordinate data from
GPS systems. Basically it's a tool to let you play with your GPS data after you
get home from your trip.

It can load data from arbitrary text-based formats (for example, any
tab-separated or comma-separated file) or Xml, or directly from a GPS receiver.
It can display the data (as map view using openstreetmap images and as altitude
profile), edit this data (for example delete points and ranges, sort waypoints,
compress tracks), and save the data (in various text-based formats). It can also
export data as a Gpx file, or as Kml/Kmz for import into Google Earth, or send
it to a GPS receiver.


%setup -q -n %{name}_%{version}

# Start building - set java3D lib path
export CLASSPATH="$(build-classpath-directory /usr/share/java/java-3d/):."
# run build script
sh -x

# install jar
%__install -d -m 755 %{buildroot}%{_datadir}/java
%__install -m 755 dist/*.jar %{buildroot}%{_datadir}/java/%{name}_%{version}.jar

# startscript
cat > %{name} <<'EOF'

CLASSPATH=`%{_bindir}/build-classpath %{name}_%{version} java-3d 2>/dev/null`

java --add-opens java.desktop/sun.awt=ALL-UNNAMED -cp "$CLASSPATH" tim.prune.GpsPrune $@

%__install -d -m 755 %{buildroot}%{_bindir}
%__install -m 755 %{name} %{buildroot}%{_bindir}/

# Icon
%__install -d -m 755 %{buildroot}%{_datadir}/pixmaps/
%__install -p -m 644 %{SOURCE2} %{buildroot}%{_datadir}/pixmaps/

# Desktop menu entry
%__install -d -m 755 %{buildroot}%{_datadir}/applications/
%__install -m 644 %{SOURCE1} %{buildroot}%{_datadir}/applications/
%suse_update_desktop_file %{name}

%license tim/prune/license.txt
%doc tim/prune/readme.txt

openSUSE Build Service is sponsored by