Blob Blame Raw
%global appname GPXSee

Name:           gpxsee
Version:        4.15
Release:        2%{?dist}
Summary:        GPS log file viewer and analyzer

License:        GPLv3+
URL:            http://www.gpxsee.org/

Source0:        https://github.com/tumic0/%{appname}/archive/%{version}/%{appname}-%{version}.tar.gz
Source1:        %{name}.appdata.xml
Source2:        %{name}.desktop
Source3:        %{name}.xml

BuildRequires:  qt5-linguist
BuildRequires:  qt5-qtbase-devel
BuildRequires:  libappstream-glib
BuildRequires:  desktop-file-utils


%description
GPS log file viewer and analyzer with support for
GPX, TCX, KML, FIT, IGC and NMEA files.


%prep
%setup -qn %{appname}-%{version}


%build
lrelease-qt5 %{name}.pro
%{qmake_qt5} %{name}.pro
make %{?_smp_mflags}


%install
# executable
install -p -m 755 -D %{appname} %{buildroot}%{_bindir}/%{name}

# data files
install -p -m 644 -D pkg/maps.txt %{buildroot}%{_datadir}/%{name}/maps.txt
install -p -m 644 -D pkg/ellipsoids.csv %{buildroot}%{_datadir}/%{name}/ellipsoids.csv
install -p -m 644 -D pkg/datums.csv %{buildroot}%{_datadir}/%{name}/datums.csv

# application icon
install -p -m 644 -D icons/%{name}.png %{buildroot}%{_datadir}/pixmaps/%{name}.png

# appdata
install -p -m 644 -D %{SOURCE1} %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml

# desktop file
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE2}

# mime support
install -p -m 644 -D %{SOURCE3} %{buildroot}%{_datadir}/mime/packages/%{name}.xml


%files
%license licence.txt
%doc README.md
%{_bindir}/%{name}
%{_datadir}/%{name}/
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/appdata/%{name}.appdata.xml
%{_datadir}/applications/%{name}.desktop
%{_datadir}/mime/packages/%{name}.xml


%changelog
* Wed Oct 11 2017 Nikola Forrรณ <nforro@redhat.com> - 4.15-2
- Do not buildrequire qt5-devel, qt5-qtbase-devel is sufficient
- Buildrequire qt5-linguist needed for lrelease-qt5

* Tue Oct 10 2017 Nikola Forrรณ <nforro@redhat.com> - 4.15-1
- Initial package
  resolves: #1500524