diff --git a/libreoffice.spec b/libreoffice.spec index ddde94f..b111fef 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -1316,6 +1316,19 @@ for file in $files; do echo "%{_libdir}/%{name}/share/autocorr/$file" >> file-lists/common_list.txt done +# Install appdata files, so we're shown in gnome-software (and other, future app stores) +# upstream ships the files called libreoffice-{base,writer,...}, but the destop files are called base.destop [...] +# fixup the appdata files internal reference to the .desktop file and rename them on the go to match the name +%if %{with appdatastore} +install -m 0755 -d %{buildroot}%{_datadir}/appdata +for appdata in base calc draw impress writer; do + sed "s/libreoffice-${appdata}.desktop/${appdata}.desktop/" \ + sysui/desktop/appstream-appdata/libreoffice-${appdata}.appdata.xml > %{buildroot}%{_datadir}/appdata/${appdata}.appdata.xml + echo "%{_datadir}/appdata/${appdata}.appdata.xml" >>file-lists/${appdata}_list.txt + rm -rf %{buildroot}%{_datadir}/appdata/libreoffice-${appdata}.appdata.xml +done +%endif + # Remove pointless readmes rm -rf %{buildroot}%{_libdir}/%{name}/readmes/