1
0
mirror of https://github.com/strawberrymusicplayer/strawberry synced 2025-02-05 03:47:51 +01:00

Simplify RPM spec file

This commit is contained in:
Jonas Kvinge 2023-10-08 00:11:47 +02:00
parent eee0c40132
commit 952252ebcd
2 changed files with 17 additions and 40 deletions

View File

@ -320,7 +320,7 @@ jobs:
lib64Qt6Test-devel lib64Qt6Test-devel
qt6-cmake qt6-cmake
qt6-qtbase-tools qt6-qtbase-tools
qt6-qttools qt6-qttools-linguist
desktop-file-utils desktop-file-utils
appstream appstream
appstream-util appstream-util

View File

@ -1,9 +1,9 @@
Name: strawberry Name: strawberry
Version: @STRAWBERRY_VERSION_RPM_V@ Version: @STRAWBERRY_VERSION_RPM_V@
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos} || "%{?_vendor}" == "openmandriva" %if 0%{?suse_version} || 0%{?mageia}
Release: @STRAWBERRY_VERSION_RPM_R@%{?dist}
%else
Release: @STRAWBERRY_VERSION_RPM_R@.@RPM_DISTRO@ Release: @STRAWBERRY_VERSION_RPM_R@.@RPM_DISTRO@
%else
Release: @STRAWBERRY_VERSION_RPM_R@%{?dist}
%endif %endif
Summary: A music player and music collection organizer Summary: A music player and music collection organizer
Group: Productivity/Multimedia/Sound/Players Group: Productivity/Multimedia/Sound/Players
@ -11,7 +11,7 @@ License: GPL-3.0+
URL: https://www.strawberrymusicplayer.org/ URL: https://www.strawberrymusicplayer.org/
Source0: %{name}-@STRAWBERRY_VERSION_PACKAGE@.tar.xz Source0: %{name}-@STRAWBERRY_VERSION_PACKAGE@.tar.xz
%if 0%{?suse_version} && 0%{?suse_version} > 1325 %if 0%{?suse_version}
BuildRequires: libboost_headers-devel BuildRequires: libboost_headers-devel
%else %else
BuildRequires: boost-devel BuildRequires: boost-devel
@ -25,15 +25,13 @@ BuildRequires: gettext
BuildRequires: desktop-file-utils BuildRequires: desktop-file-utils
%if 0%{?suse_version} %if 0%{?suse_version}
BuildRequires: update-desktop-files BuildRequires: update-desktop-files
%endif
%if 0%{?suse_version}
BuildRequires: appstream-glib BuildRequires: appstream-glib
%else %endif
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos} %if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos}
BuildRequires: libappstream-glib BuildRequires: libappstream-glib
%else %endif
%if 0%{?mageia} || "%{?_vendor}" == "openmandriva"
BuildRequires: appstream-util BuildRequires: appstream-util
%endif
%endif %endif
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(glib-2.0)
@ -44,46 +42,28 @@ BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(alsa) BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(protobuf) BuildRequires: pkgconfig(protobuf)
BuildRequires: pkgconfig(sqlite3) >= 3.9 BuildRequires: pkgconfig(sqlite3) >= 3.9
%if ! 0%{?centos} && ! 0%{?mageia}
BuildRequires: pkgconfig(taglib) BuildRequires: pkgconfig(taglib)
%endif
BuildRequires: pkgconfig(fftw3) BuildRequires: pkgconfig(fftw3)
BuildRequires: pkgconfig(icu-uc) BuildRequires: pkgconfig(icu-uc)
BuildRequires: pkgconfig(icu-i18n) BuildRequires: pkgconfig(icu-i18n)
%if "@QT_VERSION_MAJOR@" == "5" && ( 0%{?fedora} || 0%{?rhel_version} || 0%{?centos} )
BuildRequires: pkgconfig(Qt@QT_VERSION_MAJOR@Core)
BuildRequires: pkgconfig(Qt@QT_VERSION_MAJOR@Gui)
BuildRequires: pkgconfig(Qt@QT_VERSION_MAJOR@Widgets)
BuildRequires: pkgconfig(Qt@QT_VERSION_MAJOR@Concurrent)
BuildRequires: pkgconfig(Qt@QT_VERSION_MAJOR@Network)
BuildRequires: pkgconfig(Qt@QT_VERSION_MAJOR@Sql)
BuildRequires: pkgconfig(Qt@QT_VERSION_MAJOR@DBus)
BuildRequires: pkgconfig(Qt@QT_VERSION_MAJOR@Test)
BuildRequires: pkgconfig(Qt@QT_VERSION_MAJOR@X11Extras)
%else
BuildRequires: cmake(Qt@QT_VERSION_MAJOR@Core) BuildRequires: cmake(Qt@QT_VERSION_MAJOR@Core)
BuildRequires: cmake(Qt@QT_VERSION_MAJOR@Gui)
BuildRequires: cmake(Qt@QT_VERSION_MAJOR@Widgets)
BuildRequires: cmake(Qt@QT_VERSION_MAJOR@Concurrent) BuildRequires: cmake(Qt@QT_VERSION_MAJOR@Concurrent)
BuildRequires: cmake(Qt@QT_VERSION_MAJOR@Network) BuildRequires: cmake(Qt@QT_VERSION_MAJOR@Network)
BuildRequires: cmake(Qt@QT_VERSION_MAJOR@Sql) BuildRequires: cmake(Qt@QT_VERSION_MAJOR@Sql)
BuildRequires: cmake(Qt@QT_VERSION_MAJOR@DBus) BuildRequires: cmake(Qt@QT_VERSION_MAJOR@DBus)
BuildRequires: cmake(Qt@QT_VERSION_MAJOR@Gui)
BuildRequires: cmake(Qt@QT_VERSION_MAJOR@Widgets)
BuildRequires: cmake(Qt@QT_VERSION_MAJOR@Test) BuildRequires: cmake(Qt@QT_VERSION_MAJOR@Test)
BuildRequires: cmake(Qt@QT_VERSION_MAJOR@LinguistTools)
%if "@QT_VERSION_MAJOR@" == "5" %if "@QT_VERSION_MAJOR@" == "5"
BuildRequires: cmake(Qt@QT_VERSION_MAJOR@X11Extras) BuildRequires: cmake(Qt@QT_VERSION_MAJOR@X11Extras)
%endif %endif
%endif
%if 0%{?suse_version} || 0%{?fedora_version} || 0%{?mageia}
BuildRequires: cmake(Qt@QT_VERSION_MAJOR@LinguistTools)
%endif
BuildRequires: pkgconfig(gstreamer-1.0) BuildRequires: pkgconfig(gstreamer-1.0)
BuildRequires: pkgconfig(gstreamer-app-1.0) BuildRequires: pkgconfig(gstreamer-app-1.0)
BuildRequires: pkgconfig(gstreamer-audio-1.0) BuildRequires: pkgconfig(gstreamer-audio-1.0)
BuildRequires: pkgconfig(gstreamer-base-1.0) BuildRequires: pkgconfig(gstreamer-base-1.0)
BuildRequires: pkgconfig(gstreamer-tag-1.0) BuildRequires: pkgconfig(gstreamer-tag-1.0)
%if ! 0%{?centos}
BuildRequires: pkgconfig(libchromaprint) BuildRequires: pkgconfig(libchromaprint)
%endif
BuildRequires: pkgconfig(libpulse) BuildRequires: pkgconfig(libpulse)
BuildRequires: pkgconfig(libcdio) BuildRequires: pkgconfig(libcdio)
BuildRequires: pkgconfig(libebur128) BuildRequires: pkgconfig(libebur128)
@ -139,23 +119,20 @@ Features:
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos} %if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos}
export CXXFLAGS="-fPIC $RPM_OPT_FLAGS" export CXXFLAGS="-fPIC $RPM_OPT_FLAGS"
%endif %endif
%{cmake} -DQT_VERSION_MAJOR=@QT_VERSION_MAJOR@ %if "%{?_vendor}" == "openmandriva"
%if 0%{?centos} || (0%{?mageia} && 0%{?mageia} <= 7) || "%{?_vendor}" == "openmandriva" %{cmake} -DQT_VERSION_MAJOR=@QT_VERSION_MAJOR@ -DENABLE_TRANSLATIONS=OFF
%make_build %make_build
%else %else
%cmake_build %{cmake} -DQT_VERSION_MAJOR=@QT_VERSION_MAJOR@
%cmake_build
%endif %endif
%install %install
%if 0%{?centos}
%make_install
%else
%if 0%{?mageia} || "%{?_vendor}" == "openmandriva" %if 0%{?mageia} || "%{?_vendor}" == "openmandriva"
%make_install -C build %make_install -C build
%else %else
%cmake_install %cmake_install
%endif %endif
%endif
%if 0%{?suse_version} %if 0%{?suse_version}
%suse_update_desktop_file org.strawberrymusicplayer.strawberry Qt AudioVideo Audio Player %suse_update_desktop_file org.strawberrymusicplayer.strawberry Qt AudioVideo Audio Player