%define gituser barsnick %define gitname guitar-tools %global gitdate 20260518 %global commit 7d157d768c8448daaf7ceafda17dbd07ddf27603 %global shortcommit %(c=%{commit}; echo ${c:0:7}) # Build source is tarball release = 1 or git commit = 0 %global build_release 0 # Force use of Qt5 = 1 (testing only) %global force_qt5 0 %global vers 0.1.0 %global rel 0.2 %global distsuffix .2sunshine # determine Qt version to use # dist Qt5? Qt6? # Epel 7 yes 5.9.7 no # Epel 8 yes 5.15.3 no # Epel 9 yes 5.15.9 yes 6.6.2 # Rhel 8 yes 5.15.3 no # Rhel 9 yes 5.15.9 no # Centos-stream 8 yes 5.15.3 no # Centos-stream 9 yes 5.15.9 no # Centos-stream 10 no yes 6.10.1 # Fedora 42 yes 5.15.18 yes 6.10.2 # Fedora 43 yes 5.15.18 yes 6.10.3 # Fedora 44 yes 5.15.18 yes 6.11.1 # Fedora RawHide yes 5.15.18 yes 6.11.1 (2026-08) # # i.e. # - Centos behaves like RHEL (perhaps also for RHEL 10, as yet unknown) # - EPEL is different to RHEL %if (0%{?force_qt5} == 0) && ((0%{?epel} && 0%{?epel} >= 9) || (0%{?centos} && 0%{?centos} >= 10) || (0%{?rhel} && 0%{?rhel} >= 10) || (0%{?fedora} && 0%{?fedora} >= 40)) %global qt_ver 6 %else %global qt_ver 5 %endif Name: %{gitname} Version: %{vers} Summary: Tool collection for guitar players and musicians. %if 0%{?build_release} > 0 # build from the tarball release Release: %{rel}%{?dist}%{?distsuffix} Source0: %{url}/archive/refs/tags/%{vers}.tar.gz#/%{gitname}-%{shortcommit}.tar.gz %else # build from the git commit snapshot Release: %{rel}.%{gitdate}git%{shortcommit}%{?dist}%{?distsuffix} Source0: https://github.com/%{gituser}/%{gitname}/archive/%{commit}/%{gitname}-%{shortcommit}.tar.gz %endif #build_release License: GPL-3.0-only URL: https://github.com/t-mon/guitar-tools VCS: https://github.com/barsnick/guitar-tools.git Source1: %{name}.desktop BuildRequires: make BuildRequires: desktop-file-utils BuildRequires: qt%{qt_ver}-qtbase-devel BuildRequires: qt%{qt_ver}-qtdeclarative-devel BuildRequires: qt%{qt_ver}-qtmultimedia-devel BuildRequires: soundtouch-devel %description Guitar Tools is collection of useful tools for guitar players. Features: * Guitar tuner * Guitar * Metronome * Chords * Scales * Recorder * Drum loops * Compose tool %prep %if 0%{?build_release} > 0 %setup -q %else %setup -q -n %{gitname}-%{commit} %endif # do not default to in-tree relative path sed -i -e 's|\.\./\.\./\.\./guitar-tools/data/|/usr/share/guitar-tools/data/|' apps/generic/main.cpp %build %{expand:%{qmake_qt%{qt_ver}}} PREFIX=%{_prefix} make %{?_smp_mflags} %install rm -rf %{buildroot} make INSTALL_ROOT=%{buildroot} install desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1} sed -i -e 's/env python$/env python3/' %{buildroot}%{_datadir}/%{name}/data/scales/generate-scale.py install -d %{buildroot}%{_datadir}/pixmaps/ install -p -m 644 icons/%{gitname}-48x48.png %{buildroot}%{_datadir}/pixmaps/%{name}.png %files %license LICENSE %doc README.md %{_bindir}/* %{_datadir}/%{name} %{_datadir}/pixmaps/* %{_datadir}/applications/* %changelog * Wed Aug 05 2026 Moritz Barsnick 0.1.0-0.2.20260518git7d157d7.2sunshine - update Qt version matrix * Mon May 18 2026 Moritz Barsnick 0.1.0-0.2.20260518git7d157d7.1sunshine - update to latest rebased commit * Sun Apr 26 2026 Moritz Barsnick 0.1.0-0.1.20260422git3874bb8.1sunshine - update to latest commit with support for EPEL7 * Sun Apr 26 2026 Moritz Barsnick 0.1.0-0.20260422git9788902.1sunshine - initial RPM