[evolution/gnome-3-30] I#283 - Include release information in org.gnome.Evolution.appdata.xml



commit 4883c58ac76a62028cc96d89ed1d7d7fa8a9f591
Author: Milan Crha <mcrha redhat com>
Date:   Fri Jan 18 12:42:52 2019 +0100

    I#283 - Include release information in org.gnome.Evolution.appdata.xml
    
    Closes https://gitlab.gnome.org/GNOME/evolution/issues/283

 CMakeLists.txt                                            |  2 ++
 data/CMakeLists.txt                                       | 15 ++++++++++++++-
 ...pdata.xml.in => org.gnome.Evolution.appdata.xml.in.in} |  3 +++
 po/POTFILES.in                                            |  2 +-
 4 files changed, 20 insertions(+), 2 deletions(-)
---
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 877167babc..84e8ac97ef 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -28,8 +28,10 @@ if(_is_devel_version EQUAL 1)
        endif(_minor EQUAL -1)
 
        set(STABLE_VERSION "${_major}.${_minor}")
+       set(APPDATA_RELEASE_TYPE "development")
 else(_is_devel_version EQUAL 1)
        unset(STABLE_VERSION)
+       set(APPDATA_RELEASE_TYPE "stable")
 endif(_is_devel_version EQUAL 1)
 
 # Required for FindIntltool module
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index e09c14782f..5f5608a5d2 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -15,7 +15,20 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.gnome.Evolution.desktop
        DESTINATION ${desktopdir}
 )
 
-add_appdata_file(org.gnome.Evolution.appdata.xml.in org.gnome.Evolution.appdata.xml)
+if("${VERSION_SUBSTRING}" STREQUAL "")
+       set(APPDATA_RELEASE_VERSION "${PROJECT_VERSION}")
+else("${VERSION_SUBSTRING}" STREQUAL "")
+       set(APPDATA_RELEASE_VERSION "${PROJECT_VERSION} ${VERSION_SUBSTRING}")
+endif("${VERSION_SUBSTRING}" STREQUAL "")
+
+string(TIMESTAMP APPDATA_RELEASE_BUILD_DATE "%Y-%m-%d")
+
+configure_file(org.gnome.Evolution.appdata.xml.in.in
+       org.gnome.Evolution.appdata.xml.in
+       @ONLY
+)
+
+add_appdata_file(${CMAKE_CURRENT_BINARY_DIR}/org.gnome.Evolution.appdata.xml.in 
org.gnome.Evolution.appdata.xml)
 
 install(FILES webview.css
                webview-print.css
diff --git a/data/org.gnome.Evolution.appdata.xml.in b/data/org.gnome.Evolution.appdata.xml.in.in
similarity index 92%
rename from data/org.gnome.Evolution.appdata.xml.in
rename to data/org.gnome.Evolution.appdata.xml.in.in
index 4fd3d88d71..8be5018b28 100644
--- a/data/org.gnome.Evolution.appdata.xml.in
+++ b/data/org.gnome.Evolution.appdata.xml.in.in
@@ -42,4 +42,7 @@
   </kudos>
   <project_group>GNOME</project_group>
   <translation type="gettext">evolution</translation>
+  <releases>
+    <release version="@APPDATA_RELEASE_VERSION@" type="@APPDATA_RELEASE_TYPE@" 
date="@APPDATA_RELEASE_BUILD_DATE@"/>
+  </releases>
 </component>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index f61ba24779..ce24d12e0c 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -19,7 +19,7 @@ data/org.gnome.evolution.plugin.templates.gschema.xml.in
 data/org.gnome.evolution.shell.gschema.xml.in
 data/org.gnome.evolution.spamassassin.gschema.xml.in
 data/org.gnome.evolution.text-highlight.gschema.xml.in
-data/org.gnome.Evolution.appdata.xml.in
+data/org.gnome.Evolution.appdata.xml.in.in
 data/org.gnome.Evolution.desktop.in.in
 data/views/addressbook/galview.xml
 data/views/calendar/galview.xml


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]