Rename telegramdesktop.appdata.xml -> telegramdesktop.metainfo.xml

.appinfo.xml is legacy according to https://freedesktop.org/software/appstream/docs/chap-Metadata.html#spec-component-location
This commit is contained in:
Ilya Fedin 2021-12-05 23:06:36 +04:00 committed by John Preston
parent e708b2d39c
commit 6db537d1ec
4 changed files with 5 additions and 5 deletions

View File

@ -1526,8 +1526,8 @@ endif()
if (LINUX AND DESKTOP_APP_USE_PACKAGED)
include(GNUInstallDirs)
configure_file("../lib/xdg/telegramdesktop.appdata.xml.in" "${CMAKE_CURRENT_BINARY_DIR}/telegramdesktop.appdata.xml" @ONLY)
generate_appdata_changelog(Telegram "${CMAKE_SOURCE_DIR}/changelog.txt" "${CMAKE_CURRENT_BINARY_DIR}/telegramdesktop.appdata.xml")
configure_file("../lib/xdg/telegramdesktop.metainfo.xml.in" "${CMAKE_CURRENT_BINARY_DIR}/telegramdesktop.metainfo.xml" @ONLY)
generate_appdata_changelog(Telegram "${CMAKE_SOURCE_DIR}/changelog.txt" "${CMAKE_CURRENT_BINARY_DIR}/telegramdesktop.metainfo.xml")
install(TARGETS Telegram RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" BUNDLE DESTINATION "${CMAKE_INSTALL_BINDIR}")
install(FILES "Resources/art/icon16.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/16x16/apps" RENAME "telegram.png")
install(FILES "Resources/art/icon32.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/32x32/apps" RENAME "telegram.png")
@ -1537,5 +1537,5 @@ if (LINUX AND DESKTOP_APP_USE_PACKAGED)
install(FILES "Resources/art/icon256.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/256x256/apps" RENAME "telegram.png")
install(FILES "Resources/art/icon512.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/512x512/apps" RENAME "telegram.png")
install(FILES "../lib/xdg/telegramdesktop.desktop" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications" RENAME "${TDESKTOP_LAUNCHER_BASENAME}.desktop")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/telegramdesktop.appdata.xml" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/metainfo" RENAME "${TDESKTOP_LAUNCHER_BASENAME}.appdata.xml")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/telegramdesktop.metainfo.xml" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/metainfo" RENAME "${TDESKTOP_LAUNCHER_BASENAME}.metainfo.xml")
endif()

View File

@ -62,7 +62,7 @@ def update_appdata(appdata_path, changelog, max_items=None):
def main():
ap = argparse.ArgumentParser("Parse Telegram changelog")
ap.add_argument("-c", "--changelog-path", default="changelog.txt")
ap.add_argument("-a", "--appdata-path", default="lib/xdg/telegramdesktop.appdata.xml")
ap.add_argument("-a", "--appdata-path", default="lib/xdg/telegramdesktop.metainfo.xml")
ap.add_argument("-n", "--num-releases", type=int, default=None)
args = ap.parse_args()
update_appdata(args.appdata_path,

View File

@ -85,7 +85,7 @@ parts:
plugin: cmake
source: .
source-type: git
parse-info: [usr/share/metainfo/telegram-desktop_telegram-desktop.appdata.xml]
parse-info: [usr/share/metainfo/telegram-desktop_telegram-desktop.metainfo.xml]
build-environment:
- CC: gcc-10
- CXX: g++-10