Blame GoldenCheetah.spec

56c31be
%global __cmake_in_source_build 1
56c31be
46774d4
#For git snapshots, set to 0 to use release instead:
6331718
%global usesnapshot 1
46774d4
%if 0%{?usesnapshot}
10fbc31
%global commit0 7c90abf67522515a2f6431260633ef2878de80af
560684a
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
46774d4
%global snapshottag .git%{shortcommit0}
10fbc31
%global commitdate 20200808
46774d4
%endif
560684a
560684a
Name:           GoldenCheetah
46774d4
%if 0%{?usesnapshot}
10fbc31
Version:        3.6
248ed09
Release:        0.2.%{commitdate}git%{shortcommit0}%{?dist}
46774d4
%else
6331718
Version:        3.5
10fbc31
Release:        3%{?dist}
46774d4
%endif
560684a
Summary:        Cycling Performance Software
10fbc31
Epoch:          1
560684a
License:        GPLv3
560684a
URL:            http://www.goldencheetah.org/
46774d4
%if 0%{?usesnapshot}
10fbc31
Source0:        https://github.com/GoldenCheetah/GoldenCheetah/archive/%{commit0}/%{name}-%{commit0}.tar.gz#/%{name}-%{shortcommit0}.tar.gz
46774d4
%else
46774d4
Source0:        https://github.com/GoldenCheetah/GoldenCheetah/archive/V%{version}.tar.gz#/%{name}-%{version}.tar.gz
46774d4
%endif
560684a
Source1:        %{name}.desktop
560684a
# https://github.com/GoldenCheetah/GoldenCheetah/issues/2690
560684a
Source2:        %{name}.appdata.xml
6331718
# Use Qwt Widget Library
6331718
Patch0:         %{name}_20200614git5c84f7f.patch
10fbc31
#Patch0:         %%{name}_20180927git-fc33.patch 
560684a
560684a
BuildRequires:  gcc-c++
560684a
BuildRequires:  flex
560684a
BuildRequires:  bison
560684a
BuildRequires:  ImageMagick
560684a
BuildRequires:  pkgconfig(libusb)
560684a
BuildRequires:  pkgconfig(glu)
560684a
BuildRequires:  pkgconfig(openssl)
560684a
BuildRequires:  pkgconfig(Qt5Core)
560684a
BuildRequires:  pkgconfig(Qt5Charts)
560684a
BuildRequires:  pkgconfig(Qt5QuickWidgets)
560684a
BuildRequires:  pkgconfig(Qt5Multimedia)
560684a
BuildRequires:  pkgconfig(Qt5Script)
560684a
BuildRequires:  pkgconfig(Qt5SerialPort)
560684a
BuildRequires:  pkgconfig(Qt5Svg)
560684a
BuildRequires:  pkgconfig(Qt5Help)
560684a
BuildRequires:  pkgconfig(Qt5WebKit)
560684a
BuildRequires:  pkgconfig(Qt5Bluetooth)
560684a
BuildRequires:  pkgconfig(Qt5WebEngine)
560684a
BuildRequires:  pkgconfig(Qt5WebChannel)
560684a
BuildRequires:  pkgconfig(Qt5Location)
10fbc31
#BuildRequires:  pkgconfig(QxtCore-qt5)
560684a
BuildRequires:  pkgconfig(libical)
560684a
BuildRequires:  pkgconfig(samplerate)
560684a
BuildRequires:  pkgconfig(zlib)
21e30f0
BuildRequires:  lmfit-devel
10fbc31
BuildRequires:  libkml-devel
560684a
BuildRequires:  desktop-file-utils
560684a
BuildRequires:  libappstream-glib
560684a
BuildRequires:  qt5-linguist
560684a
BuildRequires:  qt5-qttranslations
560684a
BuildRequires:  R-core-devel
560684a
BuildRequires:  R-Rcpp-devel
560684a
BuildRequires:  R-RInside-devel
560684a
BuildRequires:  python3-devel
560684a
BuildRequires:  python3-sip-devel
6331718
BuildRequires:  gsl-devel
560684a
Requires:       hicolor-icon-theme
560684a
560684a
# qt5-qtwebengine-devel is missing on ppc64, ppc64le, s390x CPU architectures.
560684a
ExclusiveArch:  %{qt5_qtwebengine_arches}
560684a
560684a
%description
560684a
#Golden Cheetah is a program for cyclists: 
560684a
- download and import activities from most popular bike computers from CycleOps,
560684a
  SRM, Polar, Garmin and others;
560684a
- analyze, track and review performance data and metrics;
560684a
- train indoors with real-time monitoring supporting trainers from Racermate,
560684a
  Tacx and any ANT+ device; 
560684a
- Golden Cheetah is free software and distributed under the GPL.
560684a
560684a
%package data
560684a
Summary:       Icons and translation files for %{name}
560684a
BuildArch:     noarch
10fbc31
Requires:      %{name} = %{epoch}:%{version}-%{release}
560684a
560684a
%description data
560684a
This package contains icons and translation files.
560684a
560684a
%package        doc
560684a
Summary:        Documentation files for %{name}
560684a
BuildArch:      noarch
560684a
560684a
%description    doc
560684a
The %{name}-doc package contains html documentation
560684a
that use %{name}.
560684a
560684a
%prep
46774d4
%if 0%{?usesnapshot}
10fbc31
%setup -qn %{name}-%{commit0}
46774d4
%else
46774d4
%setup -qn %{name}-%{version}
46774d4
%endif
560684a
%patch0 -p1
560684a
560684a
# fixes W: spurious-executable-perm
560684a
find . -type f  \( -name "*.cpp" -o -name "*.h" \) -exec chmod a-x {} \;
560684a
560684a
%build
560684a
# Create translation files.
560684a
lrelease-qt5 src/Resources/translations/*.ts
560684a
%{_qt5_qmake} %{_qt5_qmake_flags}
56c31be
%make_build
560684a
560684a
%install
560684a
mkdir -p %{buildroot}%{_bindir}/
560684a
cp -p %{_builddir}/%{buildsubdir}/src/GoldenCheetah %{buildroot}%{_bindir}/
560684a
560684a
desktop-file-install                        \
560684a
--dir=%{buildroot}%{_datadir}/applications  \
560684a
%{SOURCE1}
560684a
560684a
install -Dm644 %{SOURCE2} %{buildroot}/%{_metainfodir}/%{name}.appdata.xml
560684a
560684a
install -d -m 0755 %{buildroot}%{_datadir}/%{name}/translations
560684a
install -m 0644 src/Resources/translations/gc_{es,nl,zh-tw,pt-br,pt,ru,it,cs,ja,de,sv,fr,zh-cn}.qm \
560684a
        %{buildroot}%{_datadir}/%{name}/translations
560684a
560684a
#icons
560684a
for size in 256 48 32 16; do
560684a
  install -d %{buildroot}%{_datadir}/icons/hicolor/${size}x${size}/apps
560684a
  convert doc/web/logo.jpg -resize ${size} %{buildroot}%{_datadir}/icons/hicolor/${size}x${size}/apps/%{name}.png
560684a
done
560684a
560684a
%find_lang %{name} --all-name --with-qt
560684a
560684a
%check
560684a
desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
560684a
appstream-util validate-relax --nonet %{buildroot}/%{_metainfodir}/%{name}.appdata.xml
560684a
560684a
%files -f %{name}.lang
560684a
%doc README.md
560684a
%license COPYING
560684a
%{_bindir}/%{name}
560684a
%{_datadir}/applications/%{name}.desktop
560684a
%{_metainfodir}/%{name}.appdata.xml
560684a
%{_datadir}/icons/hicolor/*/apps/%{name}.png
560684a
560684a
%files data
560684a
%{_datadir}/%{name}
560684a
560684a
%files doc
560684a
%doc doc/user/*.pdf
560684a
560684a
%changelog
248ed09
* Sun Sep 13 2020 Martin Gansser <martinkg@fedoraproject.org> - 3.6-0.2.20200908git7c90abf
248ed09
- Rebuilt for new qt5-qtcharts
248ed09
10fbc31
* Sun Aug 09 2020 Martin Gansser <martinkg@fedoraproject.org> - 3.6-0.1.20200908git7c90abf
10fbc31
- Revert version 4.0 and use master git
10fbc31
- Add epoch to allow install older version
2d40729
6331718
* Sun Jul 26 2020 Martin Gansser <martinkg@fedoraproject.org> - 4.0-0.1.20200614git5c84f7f
6331718
- Update to 4.0-0.1.20200614git5c84f7f
6331718
- fixes (BZ#1842192) and (BZ#1859481)
6331718
- Add BR gsl-devel
6331718
- Cleanup spec file
6331718
4cd97b4
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.5-2
4cd97b4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
4cd97b4
46774d4
* Sat Jan 11 2020 Martin Gansser <martinkg@fedoraproject.org> - 3.5-1
46774d4
- Update to 3.5-1
46774d4
2b1e9d2
* Mon Dec 09 2019 Martin Gansser <martinkg@fedoraproject.org> - 3.5-0.14.rc2git5df46ee
2b1e9d2
- Update to 3.5-0.14.rc2git5df46ee
2b1e9d2
- Add BR srmio-devel
2b1e9d2
9da1280
* Mon Oct 14 2019 Martin Gansser <martinkg@fedoraproject.org> - 3.5-0.13.rc1gitd01fdf5
9da1280
- Update to 3.5-0.13.rc1gitd01fdf5
9da1280
c684b34
* Wed Aug 21 2019 Martin Gansser <martinkg@fedoraproject.org> - 3.5-0.12.20190821git1d6d66f
c684b34
- Update to 3.5-0.12.20190821git1d6d66f
2f340b4
- Remove BR qwtplot3d-qt5-devel
c684b34
fdacc1f
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.5-0.11.20190225gitd93404f
fdacc1f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
fdacc1f
455face
* Tue Feb 26 2019 Martin Gansser <martinkg@fedoraproject.org> - 3.5-0.10.20190225gitd93404f
455face
- Update to 3.5-0.10.20190225gitd93404f
455face
63f6abd
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.5-0.9.20190127git9138a28
63f6abd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
63f6abd
7a1b61c
* Tue Jan 29 2019 Martin Gansser <martinkg@fedoraproject.org> - 3.5-0.8.20190128git9138a28
7a1b61c
- Rebuilt for lmfit-8.2
7a1b61c
a698979
* Mon Jan 28 2019 Martin Gansser <martinkg@fedoraproject.org> - 3.5-0.7.20190128git9138a28
a698979
- Update to 3.5-0.7.20190128git9138a28
a698979
85a9db1
* Thu Dec 13 2018 Martin Gansser <martinkg@fedoraproject.org> - 3.5-0.6.20181211gitf7d2431
85a9db1
- Update to 3.5-0.6.20181211gitf7d2431
85a9db1
- qwtplot3d is deprecated removed from sys-path.patch
85a9db1
5a2bffa
* Wed Nov 28 2018 Martin Gansser <martinkg@fedoraproject.org> - 3.5-0.5.20181125gitea5c07d
5a2bffa
- Merge qxt-sys.patch qwt3d-sys.patch and lmfit-levmar.patch to sys-path.patch
5a2bffa
- Update to 3.5-0.5.20181125gitea5c07d
5a2bffa
5eed513
* Mon Nov 26 2018 Martin Gansser <martinkg@fedoraproject.org> - 3.5-0.4.20181125git0c668c0
560684a
- Add %%{name}-lmfit-levmar.patch
5eed513
- Update to git0c668c0 
560684a
560684a
* Fri Nov 23 2018 Martin Gansser <martinkg@fedoraproject.org> - 3.5-0.3.20181120gitaae6243
560684a
- Add BR gcc-c++
560684a
- Add comments explaining what the patches do
560684a
- Correct version to 3.5 dev branch
560684a
- Remove obsolete scriptlets
560684a
- use %%find_lang macro for translation files
560684a
- Remove owned directories in the data subpackage
560684a
560684a
* Thu Nov 22 2018 Martin Gansser <martinkg@fedoraproject.org> - 3.5-0.2.20181120gitaae6243
560684a
- Add %%{name}-qxt-sys.patch
560684a
- Add %%{name}-qwt3d-sys.patch
560684a
560684a
* Tue Nov 20 2018 Martin Gansser <martinkg@fedoraproject.org> - 3.5-0.1.20181120gitaae6243
560684a
- initial build