From 27582b7a4e521f1266c26054a23f38c7a71796c0 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Fri, 2 Nov 2018 20:30:12 +0100 Subject: [PATCH] Add strawberry.appdata.xml to spec files --- dist/fedora/strawberry.spec.in | 7 +++++-- dist/opensuse/strawberry.spec.in | 20 ++++++++++++++++++-- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/dist/fedora/strawberry.spec.in b/dist/fedora/strawberry.spec.in index ffe80aca0..ec86da2ba 100644 --- a/dist/fedora/strawberry.spec.in +++ b/dist/fedora/strawberry.spec.in @@ -10,6 +10,7 @@ Source0: %{name}-@STRAWBERRY_VERSION_PACKAGE@.tar.xz BuildRequires: boost-devel BuildRequires: cmake BuildRequires: desktop-file-utils +BuildRequires: libappstream-glib BuildRequires: gcc-c++ BuildRequires: hicolor-icon-theme BuildRequires: liblastfm-qt5-devel @@ -67,7 +68,7 @@ Features: * Audio analyzer * Equalizer * Transfer music to iPod, iPhone, MTP or mass-storage USB player - * Integrated Tidal support + * Integrated Tidal and Deezer support %prep %setup -qn %{name}-@STRAWBERRY_VERSION_PACKAGE@ @@ -91,10 +92,11 @@ popd %install make install DESTDIR=%{buildroot} -C %{_target_platform} -rm -rf %{buildroot}%{_datadir}/metainfo +mv %{buildroot}%{_datadir}/metainfo %{buildroot}%{_datadir}/appdata %check desktop-file-validate %{buildroot}%{_datadir}/applications/strawberry.desktop +appstream-util validate-relax --nonet %{buildroot}%{_datadir}/appdata/strawberry.appdata.xml %files %defattr(-,root,root,-) @@ -107,6 +109,7 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/strawberry.desktop %{_datadir}/icons/hicolor/64x64/apps/strawberry.png %{_datadir}/icons/hicolor/128x128/apps/strawberry.png %{_datadir}/icons/hicolor/scalable/apps/strawberry.svg +%{_datadir}/appdata/strawberry.appdata.xml %{_mandir}/man1/strawberry.1.* %{_mandir}/man1/strawberry-tagreader.1.* diff --git a/dist/opensuse/strawberry.spec.in b/dist/opensuse/strawberry.spec.in index 637bd9b6a..432c0cdb9 100644 --- a/dist/opensuse/strawberry.spec.in +++ b/dist/opensuse/strawberry.spec.in @@ -15,6 +15,7 @@ BuildRequires: boost-devel %endif BuildRequires: cmake BuildRequires: desktop-file-utils +BuildRequires: appstream-glib BuildRequires: gcc-c++ BuildRequires: hicolor-icon-theme BuildRequires: libQt5Gui-private-headers-devel @@ -76,7 +77,7 @@ Features: * Audio analyzer * Equalizer * Transfer music to iPod, iPhone, MTP or mass-storage USB player - * Integrated Tidal support + * Integrated Tidal and Deezer support %prep %setup -q -n %{name}-@STRAWBERRY_VERSION_PACKAGE@ @@ -88,12 +89,22 @@ make %{?_smp_mflags} %install cd build make install DESTDIR=$RPM_BUILD_ROOT -rm -rf %{buildroot}%{_datadir}/metainfo +%if 0%{?suse_version} < 1500 +mv %{buildroot}%{_datadir}/metainfo %{buildroot}%{_datadir}/appdata +%endif %clean cd build make clean +%check +desktop-file-validate %{buildroot}%{_datadir}/applications/strawberry.desktop +%if 0%{?suse_version} >= 1500 +appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/strawberry.appdata.xml +%else +appstream-util validate-relax --nonet %{buildroot}%{_datadir}/appdata/strawberry.appdata.xml +%endif + %files %defattr(-,root,root,-) %doc README.md Changelog @@ -105,6 +116,11 @@ make clean %{_datadir}/icons/hicolor/64x64/apps/strawberry.png %{_datadir}/icons/hicolor/128x128/apps/strawberry.png %{_datadir}/icons/hicolor/scalable/apps/strawberry.svg +%if 0%{?suse_version} >= 1500 +%{_datadir}/metainfo/strawberry.appdata.xml +%else +%{_datadir}/appdata/strawberry.appdata.xml +%endif %{_mandir}/man1/%{name}.1%{?ext_man} %{_mandir}/man1/%{name}-tagreader.1%{?ext_man}