mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2024-12-18 19:42:53 +01:00
Improve RPM spec file
This commit is contained in:
parent
d1c2188e5c
commit
9dded5203e
59
dist/rpm/strawberry.spec.in
vendored
59
dist/rpm/strawberry.spec.in
vendored
@ -26,9 +26,13 @@ BuildRequires: update-desktop-files
|
|||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
BuildRequires: appstream-glib
|
BuildRequires: appstream-glib
|
||||||
%else
|
%else
|
||||||
|
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos}
|
||||||
BuildRequires: libappstream-glib
|
BuildRequires: libappstream-glib
|
||||||
|
%else
|
||||||
|
BuildRequires: appstream-util
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?suse_version} || 0%{?fedora_version}
|
%endif
|
||||||
|
%if 0%{?suse_version} || 0%{?fedora_version} || 0%{?mageia}
|
||||||
BuildRequires: cmake(Qt5LinguistTools)
|
BuildRequires: cmake(Qt5LinguistTools)
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
@ -54,7 +58,7 @@ 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%{?suse_version} || 0%{?fedora_version}
|
%if ! 0%{?centos}
|
||||||
BuildRequires: pkgconfig(libchromaprint)
|
BuildRequires: pkgconfig(libchromaprint)
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: pkgconfig(libpulse)
|
BuildRequires: pkgconfig(libpulse)
|
||||||
@ -105,9 +109,8 @@ Features:
|
|||||||
%setup -qn %{name}-@STRAWBERRY_VERSION_PACKAGE@
|
%setup -qn %{name}-@STRAWBERRY_VERSION_PACKAGE@
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version} || 0%{?mageia}
|
||||||
%{cmake} .. -DUSE_INSTALL_PREFIX=OFF
|
%{cmake} ..
|
||||||
make %{?_smp_mflags}
|
|
||||||
%else
|
%else
|
||||||
mkdir -p %{_target_platform}
|
mkdir -p %{_target_platform}
|
||||||
pushd %{_target_platform}
|
pushd %{_target_platform}
|
||||||
@ -115,7 +118,13 @@ Features:
|
|||||||
popd
|
popd
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if ! 0%{?suse_version}
|
%if 0%{?suse_version} || 0%{?mageia}
|
||||||
|
%if 0%{?suse_version} && 0%{?suse_version} < 1500
|
||||||
|
make %{?_smp_mflags}
|
||||||
|
%else
|
||||||
|
%make_build
|
||||||
|
%endif
|
||||||
|
%else
|
||||||
%make_build -C %{_target_platform}
|
%make_build -C %{_target_platform}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -123,7 +132,15 @@ Features:
|
|||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
%cmake_install
|
%cmake_install
|
||||||
%else
|
%else
|
||||||
%make_install DESTDIR=%{buildroot} -C %{_target_platform}
|
%if 0%{?mageia}
|
||||||
|
%make_install -C build
|
||||||
|
%else
|
||||||
|
%make_install -C %{_target_platform}
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?suse_version} && 0%{?suse_version} < 1500
|
||||||
|
rm -f %{buildroot}%{_datadir}/metainfo/org.strawbs.strawberry.appdata.xml
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
@ -131,13 +148,13 @@ Features:
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?suse_version} && 0%{?suse_version} < 1500
|
%if 0%{?suse_version} && 0%{?suse_version} < 1500
|
||||||
%post
|
%post
|
||||||
%desktop_database_post
|
%desktop_database_post
|
||||||
%icon_theme_cache_post
|
%icon_theme_cache_post
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%desktop_database_postun
|
%desktop_database_postun
|
||||||
%icon_theme_cache_postun
|
%icon_theme_cache_postun
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
@ -145,13 +162,7 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/org.strawbs.strawberr
|
|||||||
%if 0%{?fedora_version}
|
%if 0%{?fedora_version}
|
||||||
appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/org.strawbs.strawberry.appdata.xml
|
appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/org.strawbs.strawberry.appdata.xml
|
||||||
%else
|
%else
|
||||||
%if 0%{?suse_version}
|
%if ! 0%{?suse_version} || ( 0%{?suse_version} && 0%{?suse_version} >= 1500 )
|
||||||
%if 0%{?suse_version} >= 1500
|
|
||||||
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/org.strawbs.strawberry.appdata.xml
|
|
||||||
%else
|
|
||||||
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/appdata/org.strawbs.strawberry.appdata.xml
|
|
||||||
%endif
|
|
||||||
%else
|
|
||||||
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/org.strawbs.strawberry.appdata.xml
|
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/org.strawbs.strawberry.appdata.xml
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
@ -167,13 +178,7 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/org.strawbs.strawberr
|
|||||||
%if 0%{?fedora_version}
|
%if 0%{?fedora_version}
|
||||||
%{_metainfodir}/*.appdata.xml
|
%{_metainfodir}/*.appdata.xml
|
||||||
%else
|
%else
|
||||||
%if 0%{?suse_version}
|
%if ! 0%{?suse_version} || ( 0%{?suse_version} && 0%{?suse_version} >= 1500 )
|
||||||
%if 0%{?suse_version} >= 1500
|
|
||||||
%{_datadir}/metainfo/*.appdata.xml
|
|
||||||
%else
|
|
||||||
%{_datadir}/appdata/*.appdata.xml
|
|
||||||
%endif
|
|
||||||
%else
|
|
||||||
%{_datadir}/metainfo/*.appdata.xml
|
%{_datadir}/metainfo/*.appdata.xml
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
Loading…
Reference in New Issue
Block a user