1
0
mirror of https://github.com/strawberrymusicplayer/strawberry synced 2024-12-18 19:42:53 +01:00

Simplify strawberry.spec

This commit is contained in:
Jonas Kvinge 2020-09-16 18:03:34 +02:00
parent e5b17092b4
commit d2a30bfb78

View File

@ -80,13 +80,6 @@ BuildRequires: pkgconfig(libvlc)
Requires: libQt5Sql5-sqlite Requires: libQt5Sql5-sqlite
%endif %endif
%if 0%{?suse_version} && 0%{?suse_version} < 1500
Requires(post): update-desktop-files
Requires(post): gtk3-tools
Requires(postun): update-desktop-files
Requires(postun): gtk3-tools
%endif
%description %description
Strawberry is a music player and music collection organizer. Strawberry is a music player and music collection organizer.
It is a fork of Clementine. The name is inspired by the band Strawbs. It is a fork of Clementine. The name is inspired by the band Strawbs.
@ -114,63 +107,27 @@ Features:
%setup -qn %{name}-@STRAWBERRY_VERSION_PACKAGE@ %setup -qn %{name}-@STRAWBERRY_VERSION_PACKAGE@
%build %build
%if 0%{?suse_version} || 0%{?mageia} %{cmake} -DCMAKE_BUILD_TYPE:STRING=Release
%{cmake} .. %if 0%{?centos}
%else
mkdir -p %{_target_platform}
pushd %{_target_platform}
%{cmake} ..
popd
%endif
%if 0%{?suse_version} || 0%{?mageia}
%if 0%{?suse_version} && 0%{?suse_version} < 1500
make %{?_smp_mflags}
%else
%make_build %make_build
%endif
%else %else
%make_build -C %{_target_platform} %cmake_build
%endif %endif
%install %install
%if 0%{?suse_version}
%cmake_install %cmake_install
%else
%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.strawberrymusicplayer.strawberry.appdata.xml
%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
%endif %endif
%if 0%{?suse_version} && 0%{?suse_version} < 1500
%post
%desktop_database_post
%icon_theme_cache_post
%postun
%desktop_database_postun
%icon_theme_cache_postun
%endif
%check %check
desktop-file-validate %{buildroot}%{_datadir}/applications/org.strawberrymusicplayer.strawberry.desktop desktop-file-validate %{buildroot}%{_datadir}/applications/org.strawberrymusicplayer.strawberry.desktop
%if 0%{?fedora_version} %if 0%{?fedora_version}
appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/org.strawberrymusicplayer.strawberry.appdata.xml appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/org.strawberrymusicplayer.strawberry.appdata.xml
%else %else
%if ! 0%{?suse_version} || ( 0%{?suse_version} && 0%{?suse_version} >= 1500 )
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/org.strawberrymusicplayer.strawberry.appdata.xml appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/org.strawberrymusicplayer.strawberry.appdata.xml
%endif %endif
%endif
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
@ -183,10 +140,8 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/org.strawberrymusicpl
%if 0%{?fedora_version} %if 0%{?fedora_version}
%{_metainfodir}/*.appdata.xml %{_metainfodir}/*.appdata.xml
%else %else
%if ! 0%{?suse_version} || ( 0%{?suse_version} && 0%{?suse_version} >= 1500 )
%{_datadir}/metainfo/*.appdata.xml %{_datadir}/metainfo/*.appdata.xml
%endif %endif
%endif
%{_mandir}/man1/%{name}.1.* %{_mandir}/man1/%{name}.1.*
%{_mandir}/man1/%{name}-tagreader.1.* %{_mandir}/man1/%{name}-tagreader.1.*