1 |
From 87191faec11e390ab6a15dbd8e5a0e06d4c8f1cf Mon Sep 17 00:00:00 2001 |
2 |
From: Ferdinand Thiessen <rpm@fthiessen.de> |
3 |
Date: Tue, 18 May 2021 22:50:33 +0200 |
4 |
Subject: [PATCH] Add Appstream metainfo and install .desktop file with FQN. |
5 |
|
6 |
Added metainfo xml file[1] and install it (together with the .desktop |
7 |
file). |
8 |
Rename both to FQN as requested by the metainfo spec. |
9 |
|
10 |
[1] https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html |
11 |
--- |
12 |
Rebase desktop and CMakeLists by daviddavid on 20230104 |
13 |
--- |
14 |
CMakeLists.txt | 19 ++++++++++++------- |
15 |
desktop/metainfo.xml | 24 ++++++++++++++++++++++++ |
16 |
desktop/tea.desktop | 7 +++++-- |
17 |
3 files changed, 41 insertions(+), 9 deletions(-) |
18 |
create mode 100644 desktop/metainfo.xml |
19 |
|
20 |
diff --git a/CMakeLists.txt b/CMakeLists.txt |
21 |
index 5c4d078..615bc57 100644 |
22 |
--- a/CMakeLists.txt |
23 |
+++ b/CMakeLists.txt |
24 |
@@ -1,4 +1,4 @@ |
25 |
-cmake_minimum_required(VERSION 3.0) |
26 |
+cmake_minimum_required(VERSION 3.0.2) |
27 |
set (QT_MIN_VERSION "5.4.0") |
28 |
|
29 |
set(CMAKE_INCLUDE_CURRENT_DIR ON) |
30 |
@@ -114,6 +114,11 @@ set(tea_DESKTOP |
31 |
./desktop/tea.desktop |
32 |
) |
33 |
|
34 |
+set(tea_METAINFO |
35 |
+ ./desktop/metainfo.xml |
36 |
+) |
37 |
+ |
38 |
+set(TEA_FQN "org.semiletov.tea") |
39 |
|
40 |
#add_custom_target(dist |
41 |
#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 |
42 |
@@ -239,10 +244,11 @@ endif() |
43 |
|
44 |
|
45 |
install (TARGETS tea DESTINATION bin) |
46 |
-install (FILES ${tea_ICONSVG} DESTINATION share/icons/hicolor/scalable/apps) |
47 |
-install (FILES ${tea_ICONPNG32} DESTINATION share/icons/hicolor/32x32/apps) |
48 |
-install (FILES ${tea_ICONPNG48} DESTINATION share/icons/hicolor/48x48/apps) |
49 |
-install (FILES ${tea_ICONPNG64} DESTINATION share/icons/hicolor/64x64/apps) |
50 |
+install (FILES ${tea_ICONSVG} DESTINATION share/icons/hicolor/scalable/apps) |
51 |
+install (FILES ${tea_ICONPNG32} DESTINATION share/icons/hicolor/32x32/apps) |
52 |
+install (FILES ${tea_ICONPNG48} DESTINATION share/icons/hicolor/48x48/apps) |
53 |
+install (FILES ${tea_ICONPNG64} DESTINATION share/icons/hicolor/64x64/apps) |
54 |
install (FILES ${tea_ICONPNG128} DESTINATION share/icons/hicolor/128x128/apps) |
55 |
|
56 |
-install (FILES ${tea_DESKTOP} DESTINATION share/applications) |
57 |
+install (FILES ${tea_DESKTOP} RENAME ${TEA_FQN}.desktop DESTINATION share/applications) |
58 |
+install (FILES ${tea_METAINFO} RENAME ${TEA_FQN}.metainfo.xml DESTINATION share/metainfo) |
59 |
diff --git a/desktop/metainfo.xml b/desktop/metainfo.xml |
60 |
new file mode 100644 |
61 |
index 0000000..0bc821c |
62 |
--- /dev/null |
63 |
+++ b/desktop/metainfo.xml |
64 |
@@ -0,0 +1,24 @@ |
65 |
+<?xml version="1.0" encoding="UTF-8"?> |
66 |
+<!-- Copyright 2016 Sorokin Alexei <sor.alexei@meowr.ru> --> |
67 |
+<component type="desktop"> |
68 |
+ <id>org.semiletov.tea</id> |
69 |
+ <metadata_license>CC0-1.0</metadata_license> |
70 |
+ <project_license>GPL-3.0-or-later</project_license> |
71 |
+ <name>TEA</name> |
72 |
+ <summary>Powerful text editor in Qt</summary> |
73 |
+ <description> |
74 |
+ <p> |
75 |
+ TEA is a Qt-based text editor for UNIX-like systems. With an |
76 |
+ ultimate small size TEA provides you hundreds of functions. |
77 |
+ </p> |
78 |
+ </description> |
79 |
+ |
80 |
+ <launchable type="desktop-id">org.semiletov.tea.desktop</launchable> |
81 |
+ |
82 |
+ <url type="homepage">http://semiletov.org/tea</url> |
83 |
+ <developer_name>Peter Semiletov</developer_name> |
84 |
+ |
85 |
+ <provides> |
86 |
+ <binary>tea</binary> |
87 |
+ </provides> |
88 |
+</component> |
89 |
diff --git a/desktop/tea.desktop b/desktop/tea.desktop |
90 |
index 1dafaed..b806505 100644 |
91 |
--- a/desktop/tea.desktop |
92 |
+++ b/desktop/tea.desktop |
93 |
@@ -4,12 +4,15 @@ Terminal=false |
94 |
Type=Application |
95 |
Icon=tea |
96 |
Exec=tea %F |
97 |
-Categories=Utility;TextEditor; |
98 |
+Categories=Qt;Utility;TextEditor; |
99 |
StartupNotify=false |
100 |
-MimeType=text/plain;application/epub+zip;application/fb2;application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/vnd.oasis.opendocument.text;application/rtf;application/x-tex; |
101 |
+MimeType=text/plain;application/epub+zip;application/fb2;application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/vnd.oasis.opendocument.text;application/rtf;application/x-tex; |
102 |
NoDisplay=false |
103 |
-Version=1.1 |
104 |
Keywords=text editor;text;editor; |
105 |
Keywords[de]=Texteditor;Text;Editor; |
106 |
Comment=Text editor with hundreds of functions |
107 |
Comment[de]=Texteditor mit hunderten Funktionen |
108 |
+Comment[eo]=Funkcia tekstoredaktilo per Qt |
109 |
+Comment[fr]=Éditeur de texte avec des centaines de fonctions |
110 |
+Comment[ru]=Функциональный текстовый редактор на Qt |
111 |
+Comment[uk]=Функціональний текстовий редактор на Qt |