%global devbuild 1810 Name: GoldenCheetah Version: 3.5 Release: 1.%{devbuild}%{?dist} Summary: Performance Software for Cyclists, Runners and Triathletes Group: Applications/Sports License: GPLv3+ & BSD # qxt: BSD URL: https://www.goldencheetah.org # https://github.com/GoldenCheetah/GoldenCheetah/archive/v3.5-DEV1806.tar.gz Source0: https://github.com/GoldenCheetah/%{name}/archive/v%{version}-DEV%{devbuild}.tar.gz#/%{name}-%{version}-DEV%{devbuild}.tar.gz Source1: %{name}.desktop # https://github.com/GoldenCheetah/GoldenCheetah/issues/2690 Source2: %{name}.appdata.xml Patch0: 1810-v2.patch BuildRequires: bison BuildRequires: flex BuildRequires: libical BuildRequires: ImageMagick BuildRequires: pkgconfig(libusb) BuildRequires: pkgconfig(glu) BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5Charts) BuildRequires: pkgconfig(Qt5QuickWidgets) BuildRequires: pkgconfig(Qt5Multimedia) BuildRequires: pkgconfig(Qt5Script) BuildRequires: pkgconfig(Qt5SerialPort) BuildRequires: pkgconfig(Qt5Svg) BuildRequires: pkgconfig(Qt5Help) BuildRequires: pkgconfig(Qt5WebKit) BuildRequires: pkgconfig(Qt5Bluetooth) BuildRequires: pkgconfig(Qt5Charts) BuildRequires: pkgconfig(libical) BuildRequires: pkgconfig(samplerate) BuildRequires: pkgconfig(zlib) BuildRequires: desktop-file-utils BuildRequires: libappstream-glib BuildRequires: qt5-linguist BuildRequires: qt5-qttranslations BuildRequires: qwtplot3d-qt5-devel BuildRequires: libqxt-qt5-devel BuildRequires: libkml-devel BuildRequires: boost BuildRequires: kqoauth-qt5-devel Requires: hicolor-icon-theme #Provides: bundled(libqxt) = 0.7.0 %description Golden Cheetah is a program for cyclists: - download and import activities from most popular bike computers from CycleOps, SRM, Polar, Garmin and others; - analyze, track and review performance data and metrics; - train indoors with real-time monitoring supporting trainers from Racermate, Tacx and any ANT+ device; - Golden Cheetah is free software and distributed under the GPL. %package data Summary: Icons and translation files for %{name} BuildArch: noarch Requires: %{name} = %{version}-%{release} %description data This package contains icons and translation files. %package doc Summary: Documentation files for %{name} Group: Documentation BuildArch: noarch %description doc The %{name}-doc package contains html documentation that use %{name}. %prep %setup -qn %{name}-%{version}-DEV%{devbuild} %patch0 -p1 # fixes W: spurious-executable-perm find . -type f \( -name "*.cpp" -o -name "*.h" \) -exec chmod a-x {} \; sed -i -e 's|DEFINES += QXT_STATIC||' src/src.pro %build # Create translation files. lrelease-qt5 src/Resources/translations/*.ts %{_qt5_qmake} %{_qt5_qmake_flags} %make_build %install mkdir -p %{buildroot}%{_bindir}/ cp -p %{_builddir}/%{buildsubdir}/src/GoldenCheetah %{buildroot}%{_bindir}/ desktop-file-install \ --dir=%{buildroot}%{_datadir}/applications \ %{SOURCE1} install -Dm644 %{SOURCE2} %{buildroot}/%{_datadir}/metainfo/%{name}.appdata.xml install -d -m 0755 %{buildroot}%{_datadir}/%{name}/translations install -m 0644 src/Resources/translations/gc_{es,nl,zh-tw,pt-br,pt,ru,it,cs,ja,de,sv,fr,zh-cn}.qm \ %{buildroot}%{_datadir}/%{name}/translations find %{buildroot}%{_datadir}/%{name}/translations -name "*.qm" | sed 's:'%{buildroot}':: s:.*/\([a-zA-Z]\{2\}\).qm:%lang(\1) \0:' > %{name}.lang #icons for size in 256 48 32 16; do install -d %{buildroot}%{_datadir}/icons/hicolor/${size}x${size}/apps convert doc/web/logo.png -resize ${size} %{buildroot}%{_datadir}/icons/hicolor/${size}x${size}/apps/%{name}.png done %check desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/%{name}.appdata.xml %pre %post /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : %postun if [ $1 -eq 0 ] ; then /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : fi %posttrans /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %files -f %{name}.lang %doc README.md %license COPYING %{_bindir}/%{name} %{_datadir}/applications/%{name}.desktop %{_datadir}/metainfo/%{name}.appdata.xml %{_datadir}/icons/hicolor/*/apps/%{name}.png %files data %{_datadir}/%{name} %dir %{_datadir}/%{name}/ %dir %{_datadir}/%{name}/translations %files doc %doc doc/user/*.pdf %changelog * Sun Feb 04 2018 Philip Brown - 3.5-1 - built from https://github.com/GoldenCheetah/GoldenCheetah/archive/v3.5-DEV1710.tar.gz - patch files to build now contained in GoldenCheetah-3.5-DEV1710-f27.patch * Mon Nov 20 2017 Martin Gansser - 3.5-0.1.20171119git6237096 - initial build