Change AppStream metainfo file extension and path

The legacy /usr/share/appdata/*.appdata.xml path has been superseded by
/usr/share/metainfo/*.metainfo.xml

https://freedesktop.org/software/appstream/docs/chap-Metadata.html#spec-component-location

Signed-off-by: Alexander Wilms <f.alexander.wilms@gmail.com>
This commit is contained in:
Alexander Wilms 2024-01-14 04:05:51 +00:00 committed by Dirk Hohndel
parent 798e426926
commit c92ebd1f3b
8 changed files with 12 additions and 12 deletions

View file

@ -721,8 +721,8 @@ elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux")
endif()
install(FILES subsurface.debug DESTINATION bin)
install(FILES subsurface.desktop DESTINATION share/applications)
install(CODE "execute_process(COMMAND sh ${CMAKE_SOURCE_DIR}/scripts/add-version-to-appdata.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})")
install(FILES appdata/subsurface.appdata.xml DESTINATION share/metainfo)
install(CODE "execute_process(COMMAND sh ${CMAKE_SOURCE_DIR}/scripts/add-version-to-metainfo.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})")
install(FILES metainfo/subsurface.metainfo.xml DESTINATION share/metainfo)
install(FILES icons/subsurface-icon.svg DESTINATION share/icons/hicolor/scalable/apps)
install(DIRECTORY Documentation/images DESTINATION share/subsurface/Documentation)
install(FILES ${DOCFILES} DESTINATION share/subsurface/Documentation)

View file

Before

Width:  |  Height:  |  Size: 179 KiB

After

Width:  |  Height:  |  Size: 179 KiB

View file

Before

Width:  |  Height:  |  Size: 394 KiB

After

Width:  |  Height:  |  Size: 394 KiB

View file

@ -21,10 +21,10 @@
</description>
<screenshots>
<screenshot type="default">
<image>https://raw.githubusercontent.com/Subsurface/subsurface/master/appdata/main.png</image>
<image>https://raw.githubusercontent.com/Subsurface/subsurface/master/metainfo/main.png</image>
</screenshot>
<screenshot>
<image>https://raw.githubusercontent.com/Subsurface/subsurface/master/appdata/diveplanner.png</image>
<image>https://raw.githubusercontent.com/Subsurface/subsurface/master/metainfo/diveplanner.png</image>
</screenshot>
</screenshots>
<url type="homepage">https://subsurface-divelog.org</url>

View file

@ -127,11 +127,11 @@ mkdir -p %{buildroot}/%{_libdir}
(cd googlemaps/build ; make install_target INSTALL_ROOT=$RPM_BUILD_ROOT )
(cd subsurface-build ; make VERBOSE=1 install )
install subsurface.debug %{buildroot}%{_bindir}
install appdata/subsurface.appdata.xml %{buildroot}%{_datadir}/metainfo
install metainfo/subsurface.metainfo.xml %{buildroot}%{_datadir}/metainfo
%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
desktop-file-install --dir=%{buildroot}/%{_datadir}/applications subsurface.desktop
cat %{buildroot}%{_datadir}/metainfo/subsurface.appdata.xml
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/subsurface.appdata.xml
cat %{buildroot}%{_datadir}/metainfo/subsurface.metainfo.xml
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/subsurface.metainfo.xml
%else
%suse_update_desktop_file -r subsurface Utility DesktopUtility
%endif
@ -152,7 +152,7 @@ appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/subsurfac
%{_libdir}/qt5/plugins/geoservices/libqtgeoservices_googlemaps.so
%{_datadir}/applications/subsurface.desktop
%dir %{_datadir}/metainfo
%{_datadir}/metainfo/subsurface.appdata.xml
%{_datadir}/metainfo/subsurface.metainfo.xml
%{_datadir}/icons/hicolor/*/apps/subsurface-icon.*
%{_datadir}/subsurface/

View file

@ -96,7 +96,7 @@ mkdir -p %{buildroot}/%{_libdir}
( cd googlemaps/build ; make install_target INSTALL_ROOT=%{buildroot} )
%cmake_install
install subsurface.debug %{buildroot}%{_bindir}
install appdata/subsurface.appdata.xml %{buildroot}%{_datadir}/metainfo
install metainfo/subsurface.metainfo.xml %{buildroot}%{_datadir}/metainfo
desktop-file-install --dir=%{buildroot}/%{_datadir}/applications subsurface.desktop
%fdupes %{buildroot}
@ -116,7 +116,7 @@ desktop-file-install --dir=%{buildroot}/%{_datadir}/applications subsurface.desk
%{_libdir}/qt5/plugins/geoservices/libqtgeoservices_googlemaps.so
%{_datadir}/applications/subsurface.desktop
%dir %{_datadir}/metainfo
%{_datadir}/metainfo/subsurface.appdata.xml
%{_datadir}/metainfo/subsurface.metainfo.xml
%{_datadir}/icons/hicolor/*/apps/subsurface-icon.*
%{_datadir}/subsurface/

View file

@ -10,4 +10,4 @@ DATE=$(git log -1 --format="%ct" | xargs -I{} date -d @{} +%Y-%m-%d)
if [ "$DATE" = "" ] ; then
DATE=$(cat "$SCRIPT_DIR"/../.gitdate)
fi
sed -e "s|<release version=\"\" date=\"\" />|<release version=\"$VERSION\" date=\"$DATE\" />|" appdata/subsurface.appdata.xml.in > appdata/subsurface.appdata.xml
sed -e "s|<release version=\"\" date=\"\" />|<release version=\"$VERSION\" date=\"$DATE\" />|" metainfo/subsurface.metainfo.xml.in > metainfo/subsurface.metainfo.xml

View file

@ -661,7 +661,7 @@ for (( i=0 ; i < ${#BUILDS[@]} ; i++ )) ; do
mkdir -p appdir/usr/share/metainfo
mkdir -p appdir/usr/share/icons/hicolor/256x256/apps
cp -r ./install-root/* ./appdir/usr
cp ${SRC_DIR}/appdata/subsurface.appdata.xml appdir/usr/share/metainfo/
cp ${SRC_DIR}/metainfo/subsurface.metainfo.xml appdir/usr/share/metainfo/
cp ${SRC_DIR}/icons/subsurface-icon.png appdir/usr/share/icons/hicolor/256x256/apps/
fi
fi