From 87191faec11e390ab6a15dbd8e5a0e06d4c8f1cf Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Tue, 18 May 2021 22:50:33 +0200 Subject: [PATCH] Add Appstream metainfo and install .desktop file with FQN. Added metainfo xml file[1] and install it (together with the .desktop file). Rename both to FQN as requested by the metainfo spec. [1] https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html --- Rebase desktop and CMakeLists by daviddavid on 20230104 --- CMakeLists.txt | 19 ++++++++++++------- desktop/metainfo.xml | 24 ++++++++++++++++++++++++ desktop/tea.desktop | 7 +++++-- 3 files changed, 41 insertions(+), 9 deletions(-) create mode 100644 desktop/metainfo.xml diff --git a/CMakeLists.txt b/CMakeLists.txt index 5c4d078..615bc57 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.0.2) set (QT_MIN_VERSION "5.4.0") set(CMAKE_INCLUDE_CURRENT_DIR ON) @@ -114,6 +114,11 @@ set(tea_DESKTOP ./desktop/tea.desktop ) +set(tea_METAINFO + ./desktop/metainfo.xml +) + +set(TEA_FQN "org.semiletov.tea") #add_custom_target(dist #COMMAND git archive --prefix=${PROJECT}-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}/ master | bzip2 >${PROJECT}-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}.tar.bz2 @@ -239,10 +244,11 @@ endif() install (TARGETS tea DESTINATION bin) -install (FILES ${tea_ICONSVG} DESTINATION share/icons/hicolor/scalable/apps) -install (FILES ${tea_ICONPNG32} DESTINATION share/icons/hicolor/32x32/apps) -install (FILES ${tea_ICONPNG48} DESTINATION share/icons/hicolor/48x48/apps) -install (FILES ${tea_ICONPNG64} DESTINATION share/icons/hicolor/64x64/apps) +install (FILES ${tea_ICONSVG} DESTINATION share/icons/hicolor/scalable/apps) +install (FILES ${tea_ICONPNG32} DESTINATION share/icons/hicolor/32x32/apps) +install (FILES ${tea_ICONPNG48} DESTINATION share/icons/hicolor/48x48/apps) +install (FILES ${tea_ICONPNG64} DESTINATION share/icons/hicolor/64x64/apps) install (FILES ${tea_ICONPNG128} DESTINATION share/icons/hicolor/128x128/apps) -install (FILES ${tea_DESKTOP} DESTINATION share/applications) +install (FILES ${tea_DESKTOP} RENAME ${TEA_FQN}.desktop DESTINATION share/applications) +install (FILES ${tea_METAINFO} RENAME ${TEA_FQN}.metainfo.xml DESTINATION share/metainfo) diff --git a/desktop/metainfo.xml b/desktop/metainfo.xml new file mode 100644 index 0000000..0bc821c --- /dev/null +++ b/desktop/metainfo.xml @@ -0,0 +1,24 @@ + + + + org.semiletov.tea + CC0-1.0 + GPL-3.0-or-later + TEA + Powerful text editor in Qt + +

+ TEA is a Qt-based text editor for UNIX-like systems. With an + ultimate small size TEA provides you hundreds of functions. +

+
+ + org.semiletov.tea.desktop + + http://semiletov.org/tea + Peter Semiletov + + + tea + +
diff --git a/desktop/tea.desktop b/desktop/tea.desktop index 1dafaed..b806505 100644 --- a/desktop/tea.desktop +++ b/desktop/tea.desktop @@ -4,12 +4,15 @@ Terminal=false Type=Application Icon=tea Exec=tea %F -Categories=Utility;TextEditor; +Categories=Qt;Utility;TextEditor; StartupNotify=false -MimeType=text/plain;application/epub+zip;application/fb2;application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/vnd.oasis.opendocument.text;application/rtf;application/x-tex; +MimeType=text/plain;application/epub+zip;application/fb2;application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/vnd.oasis.opendocument.text;application/rtf;application/x-tex; NoDisplay=false -Version=1.1 Keywords=text editor;text;editor; Keywords[de]=Texteditor;Text;Editor; Comment=Text editor with hundreds of functions Comment[de]=Texteditor mit hunderten Funktionen +Comment[eo]=Funkcia tekstoredaktilo per Qt +Comment[fr]=Éditeur de texte avec des centaines de fonctions +Comment[ru]=Функциональный текстовый редактор на Qt +Comment[uk]=Функціональний текстовий редактор на Qt