gpxsee/gpxsee.spec

121 lines
3.6 KiB
RPMSpec

#
# 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 http://bugs.opensuse.org/
#
# See also http://en.opensuse.org/openSUSE:Specfile_guidelines
Name: gpxsee
Version: 5.18
Release: 1
Summary: GPS log file visualization and analysis tool
License: GPL-3.0-only
Group: Productivity/Graphics/Viewers
Url: http://www.gpxsee.org
Source0: GPXSee-%{version}.tar.gz
BuildRequires: gcc-c++
BuildRequires: make
%if 0%{?fedora_version}
%if 0%{?fedora_version} >= 24
BuildRequires: qt5-qtbase
BuildRequires: qt5-qtbase-gui
BuildRequires: qt5-qtbase-devel
BuildRequires: qt5-linguist
%else
BuildRequires: libqt4-devel
%endif
%endif
%if 0%{?suse_version}
BuildRequires: libQt5Core-devel
BuildRequires: libQt5Gui-devel
BuildRequires: libQt5Widgets-devel
BuildRequires: libQt5Network-devel
BuildRequires: libQt5PrintSupport-devel
BuildRequires: libQt5OpenGL-devel
BuildRequires: libqt5-linguist
%endif
%if 0%{?rhel_version} || 0%{?centos_version}
BuildRequires: libqt4-devel
%endif
%description
GPXSee is a Qt-based tool for visualizing and analyzing GPX, TCX, FIT, KML,
IGC, NMEA, OziExplorer files and Garmin CSV files.
%prep
%setup -q -n GPXSee-%{version}
%build
%if 0%{?fedora_version} >= 24
lrelease-qt5 gpxsee.pro
%{qmake_qt5} gpxsee.pro
%else
%if 0%{?suse_version}
lrelease-qt5 gpxsee.pro
qmake-qt5 gpxsee.pro
%else
lrelease-qt4 gpxsee.pro
qmake-qt4 gpxsee.pro
%endif
%endif
make %{?_smp_mflags}
%install
install -d 755 %{buildroot}/%{_bindir}
install -d 755 %{buildroot}/%{_datadir}/applications
install -d 755 %{buildroot}/%{_datadir}/pixmaps
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
install -m 644 icons/gpxsee.png %{buildroot}/%{_datadir}/pixmaps/%{name}.png
install -m 644 pkg/gpxsee.desktop %{buildroot}/%{_datadir}/applications/%{name}.desktop
install -m 644 pkg/gpxsee.xml %{buildroot}/%{_datadir}/mime/packages/%{name}.xml
%post
if [ -x /usr/bin/update-mime-database ]; then
/usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || :
fi
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database > /dev/null || :
fi
%postun
if [ -x /usr/bin/update-mime-database ]; then
/usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || :
fi
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database > /dev/null || :
fi
%files
%defattr(-,root,root)
%dir %{_datadir}/gpxsee
%{_bindir}/*
%{_datadir}/%{name}/*
%{_datadir}/applications/*
%{_datadir}/pixmaps/*
%{_datadir}/mime/packages/*
%changelog