@@ -11,47 +11,21 @@ License: GPL-3.0+
1111URL: https://www.strawberrymusicplayer.org/
1212Source0: %{name}-@STRAWBERRY_VERSION_PACKAGE@.tar.xz
1313
14- %if 0%{?suse_version}
15- BuildRequires: libboost_headers-devel
16- %else
17- BuildRequires: boost-devel
18- %endif
19- BuildRequires: cmake
2014BuildRequires: gcc-c++
21- BuildRequires: hicolor-icon-theme
2215BuildRequires: make
16+ BuildRequires: cmake
2317BuildRequires: git
24- BuildRequires: desktop-file-utils
25- %if 0%{?suse_version}
26- BuildRequires: update-desktop-files
27- BuildRequires: appstream-glib
28- %endif
29- %if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos}
30- BuildRequires: libappstream-glib
31- %endif
32- %if 0%{?mageia} || "%{?_vendor}" == "openmandriva"
33- BuildRequires: appstream-util
34- %endif
3518BuildRequires: pkgconfig
3619BuildRequires: pkgconfig(glib-2.0)
3720BuildRequires: pkgconfig(gio-2.0)
3821BuildRequires: pkgconfig(gio-unix-2.0)
3922BuildRequires: pkgconfig(gthread-2.0)
4023BuildRequires: pkgconfig(alsa)
24+ BuildRequires: pkgconfig(icu-uc)
25+ BuildRequires: pkgconfig(icu-i18n)
4126BuildRequires: pkgconfig(sqlite3) >= 3.9
4227BuildRequires: pkgconfig(taglib)
4328BuildRequires: pkgconfig(fftw3)
44- BuildRequires: pkgconfig(icu-uc)
45- BuildRequires: pkgconfig(icu-i18n)
46- BuildRequires: cmake(Qt@QT_VERSION_MAJOR@Core)
47- BuildRequires: cmake(Qt@QT_VERSION_MAJOR@Concurrent)
48- BuildRequires: cmake(Qt@QT_VERSION_MAJOR@Network)
49- BuildRequires: cmake(Qt@QT_VERSION_MAJOR@Sql)
50- BuildRequires: cmake(Qt@QT_VERSION_MAJOR@DBus)
51- BuildRequires: cmake(Qt@QT_VERSION_MAJOR@Gui)
52- BuildRequires: cmake(Qt@QT_VERSION_MAJOR@Widgets)
53- BuildRequires: cmake(Qt@QT_VERSION_MAJOR@Test)
54- BuildRequires: cmake(Qt@QT_VERSION_MAJOR@LinguistTools)
5529BuildRequires: pkgconfig(gstreamer-1.0)
5630BuildRequires: pkgconfig(gstreamer-app-1.0)
5731BuildRequires: pkgconfig(gstreamer-audio-1.0)
@@ -64,13 +38,45 @@ BuildRequires: pkgconfig(libebur128)
6438BuildRequires: pkgconfig(libgpod-1.0)
6539BuildRequires: pkgconfig(libmtp)
6640BuildRequires: pkgconfig(libsparsehash)
67- BuildRequires: cmake(GTest)
6841BuildRequires: pkgconfig(gmock)
42+ BuildRequires: cmake(Qt@QT_VERSION_MAJOR@Core)
43+ BuildRequires: cmake(Qt@QT_VERSION_MAJOR@Concurrent)
44+ BuildRequires: cmake(Qt@QT_VERSION_MAJOR@Network)
45+ BuildRequires: cmake(Qt@QT_VERSION_MAJOR@Sql)
46+ BuildRequires: cmake(Qt@QT_VERSION_MAJOR@DBus)
47+ BuildRequires: cmake(Qt@QT_VERSION_MAJOR@Gui)
48+ BuildRequires: cmake(Qt@QT_VERSION_MAJOR@Widgets)
49+ BuildRequires: cmake(Qt@QT_VERSION_MAJOR@Test)
50+ BuildRequires: cmake(Qt@QT_VERSION_MAJOR@LinguistTools)
51+ BuildRequires: cmake(GTest)
52+ BuildRequires: desktop-file-utils
53+ BuildRequires: hicolor-icon-theme
6954
70- %if 0%{?fedora} || (0%{?suse_version} && 0%{?suse_version} > 1600) || "%{?_vendor}" == "openmandriva"
55+ %if 0%{?suse_version}
56+ BuildRequires: libboost_headers-devel
57+ %else
58+ BuildRequires: boost-devel
59+ %endif
60+
61+ %if (!0%{?suse_version} && !0%{?mageia}) || (0%{?suse_version} && 0%{?suse_version} > 1600)
7162BuildRequires: cmake(KDSingleApplication-qt6)
7263%endif
7364
65+ %if 0%{?suse_version}
66+ BuildRequires: update-desktop-files
67+ BuildRequires: appstream-glib
68+ %endif
69+ %if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos}
70+ BuildRequires: libappstream-glib
71+ %endif
72+ %if 0%{?mageia} || "%{?_vendor}" == "openmandriva"
73+ BuildRequires: appstream-util
74+ %endif
75+
76+ %if "%{?_vendor}" == "openmandriva"
77+ BuildRequires: qt6-qtbase-theme-gtk3
78+ %endif
79+
7480%if 0%{?suse_version}
7581Requires: qt6-sql-sqlite
7682Requires: qt6-network-tls
@@ -104,18 +110,18 @@ Features:
104110%debug_package
105111%endif
106112
113+ %if "%{?_vendor}" == "openmandriva"
114+ %define debug_package %{nil}
115+ %endif
116+
107117%prep
108118%setup -qn %{name}-@STRAWBERRY_VERSION_PACKAGE@
109119
110120%build
111- %if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos}
112- export CXXFLAGS="-fPIC -Wno-maybe-uninitialized $RPM_OPT_FLAGS"
113- %endif
121+ %cmake --log-level=DEBUG -DBUILD_WERROR=ON
114122%if "%{?_vendor}" == "openmandriva"
115- %{cmake} -DBUILD_WERROR=ON
116123%make_build
117124%else
118- %{cmake} -DBUILD_WERROR=ON
119125%cmake_build
120126%endif
121127
@@ -129,9 +135,9 @@ Features:
129135%check
130136export QT_QPA_PLATFORM="offscreen"
131137%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos}
132- %{ cmake_build} -t strawberry_tests
138+ %cmake_build -t strawberry_tests
133139%else
134- %{ make_build} -j $(nproc) -C build strawberry_tests
140+ %make_build -j $(nproc) -C build strawberry_tests
135141%endif
136142desktop-file-validate %{buildroot}%{_datadir}/applications/org.strawberrymusicplayer.strawberry.desktop
137143%if 0%{?suse_version}
0 commit comments