File gpxsee.spec of Package gpxsee

# spec file for package gpxsee
# Copyright (c) 2018 SUSE LINUX 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

# See also

Name:           gpxsee
Version:        9.7
Release:        1
Summary:        GPS log file visualization and analysis tool
License:        GPL-3.0-only
Group:          Productivity/Graphics/Viewers
Source0:        GPXSee-%{version}.tar.gz

BuildRequires:  gcc-c++
BuildRequires:  make
%if 0%{?centos_version} >= 800
BuildRequires:  gdb-headless
%if 0%{?fedora_version} || 0%{?centos_version} >= 800
BuildRequires:  qt5-qtbase
BuildRequires:  qt5-qtbase-gui
BuildRequires:  qt5-qtbase-devel
BuildRequires:  qt5-qtbase-private-devel
BuildRequires:  qt5-linguist
Recommends: qt5-qtimageformats
Recommends: qt5-qtsvg
Recommends: qt5-qtpbfimageformat
%if 0%{?suse_version}
BuildRequires:  libQt5Core-devel
BuildRequires:  libQt5Concurrent-devel
BuildRequires:  libQt5Gui-devel
BuildRequires:  libQt5Gui-private-headers-devel
BuildRequires:  libQt5Widgets-devel
BuildRequires:  libQt5Network-devel
BuildRequires:  libQt5PrintSupport-devel
BuildRequires:  libQt5OpenGL-devel
BuildRequires:  libQt5Sql-devel
BuildRequires:  libqt5-linguist
Recommends: libQt5Sql5-sqlite
Recommends: libqt5-qtimageformats
Recommends: libqt5-qtsvg
Recommends: libqt5-qtpbfimageformat
# Mageia
BuildRequires:  libqt5core-devel
BuildRequires:  libqt5gui-devel
BuildRequires:  libqt5concurrent-devel
BuildRequires:  libqt5widgets-devel
BuildRequires:  libqt5network-devel
BuildRequires:  libqt5printsupport-devel
BuildRequires:  libqt5opengl-devel
BuildRequires:  libqt5sql-devel
BuildRequires:  qttools5
Recommends: qtimageformats5
Recommends: libqt5-qtsvg
Recommends: libqt5-database-plugin-sqlite
Recommends: libqt5-qtpbfimageformat

GPXSee is a Qt-based tool for visualizing and analyzing GPX, TCX, FIT, KML,
IGC, CUP, NMEA, SLF, SML, LOC, OziExplorer (PLT, RTE, WPT), Garmin GPI&CSV,
TomTom OV2&ITN, ONmove OMD/GHP and geotagged JPEG files.

%setup -q -n GPXSee-%{version}

%if 0%{?suse_version}
%if 0%{?fedora_version} || 0%{?centos_version} >= 800
make %{?_smp_mflags}

install -d 755 %{buildroot}/%{_bindir}
install -d 755 %{buildroot}/%{_datadir}/applications
install -d 755 %{buildroot}/%{_datadir}/icons/hicolor
install -d 755 %{buildroot}/%{_datadir}/mime/packages
install -d 755 %{buildroot}/%{_datadir}/%{name}
install -d 755 %{buildroot}/%{_datadir}/%{name}/maps
install -d 755 %{buildroot}/%{_datadir}/%{name}/csv
install -d 755 %{buildroot}/%{_datadir}/%{name}/translations
install -m 755 gpxsee %{buildroot}/%{_bindir}/%{name}
install -m 644 pkg/maps/* %{buildroot}/%{_datadir}/%{name}/maps
install -m 644 pkg/csv/* %{buildroot}/%{_datadir}/%{name}/csv
install -m 644 lang/*.qm %{buildroot}/%{_datadir}/%{name}/translations
cp -r icons/app/hicolor/* %{buildroot}/%{_datadir}/icons/hicolor
install -m 644 pkg/gpxsee.desktop %{buildroot}/%{_datadir}/applications/%{name}.desktop
install -m 644 pkg/gpxsee.xml %{buildroot}/%{_datadir}/mime/packages/%{name}.xml

if [ -x /usr/bin/update-mime-database ]; then
	/usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || :
if [ -x /usr/bin/update-desktop-database ]; then
	/usr/bin/update-desktop-database > /dev/null || :

if [ -x /usr/bin/update-mime-database ]; then
	/usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || :
if [ -x /usr/bin/update-desktop-database ]; then
	/usr/bin/update-desktop-database > /dev/null || :

%dir %{_datadir}/gpxsee

openSUSE Build Service is sponsored by