From b42fde775f9fe9a2641dae3099cd6a7e7c03afcf Mon Sep 17 00:00:00 2001
From: Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
Date: Mon, 30 Mar 2015 12:29:09 -0400
Subject: [PATCH] gnome: add appdata and .desktop

Refs #69645

Change-Id: Ic5022c4c122c30d71f3bad48351da74e24853494
---
 CMakeLists.txt                              | 18 ++++++++++++++++++
 gnome-ring.appdata.xml                      | 16 ++++++++++++++++
 gnome-ring.desktop.in                       | 11 +++++++++++
 pixmaps/pixmaps.gresource.xml               |  2 +-
 pixmaps/{symbole-ring-coul.svg => ring.svg} |  2 +-
 5 files changed, 47 insertions(+), 2 deletions(-)
 create mode 100644 gnome-ring.appdata.xml
 create mode 100644 gnome-ring.desktop.in
 rename pixmaps/{symbole-ring-coul.svg => ring.svg} (99%)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9d2698cf..f9e57096 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -25,6 +25,12 @@ CONFIGURE_FILE (
    "${PROJECT_BINARY_DIR}/config.h"
 )
 
+# generate .desktop file
+CONFIGURE_FILE (
+   "${PROJECT_SOURCE_DIR}/gnome-ring.desktop.in"
+   "${PROJECT_BINARY_DIR}/gnome-ring.desktop"
+)
+
 # add the binary tree to the search path for include files
 # so that we will find config.h
 INCLUDE_DIRECTORIES("${PROJECT_BINARY_DIR}")
@@ -224,3 +230,15 @@ ENDIF()
 INSTALL(TARGETS gnome-ring
    RUNTIME DESTINATION bin
 )
+
+INSTALL(FILES ${PROJECT_BINARY_DIR}/gnome-ring.desktop
+    DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications
+)
+
+INSTALL(FILES pixmaps/ring.svg
+    DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps
+)
+
+INSTALL(FILES gnome-ring.appdata.xml
+    DESTINATION ${CMAKE_INSTALL_PREFIX}/share/appdata/
+)
diff --git a/gnome-ring.appdata.xml b/gnome-ring.appdata.xml
new file mode 100644
index 00000000..b939fbdd
--- /dev/null
+++ b/gnome-ring.appdata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright 2015 Savoir-faire Linux -->
+<component type="desktop">
+ <id>gnome-ring.desktop</id>
+ <metadata_license>CC-BY-SA-3.0</metadata_license>
+ <project_license>GPL-3.0+</project_license>
+ <name>Ring</name>
+ <summary>Gnome client for Ring</summary>
+ <description>
+  <p>
+   Ring allows for secure and distributed communication using DHT. It also
+   supports the SIP protocol.
+  </p>
+ </description>
+ <url type="homepage">http://www.ring.cx</url>
+</component>
\ No newline at end of file
diff --git a/gnome-ring.desktop.in b/gnome-ring.desktop.in
new file mode 100644
index 00000000..dbacafe3
--- /dev/null
+++ b/gnome-ring.desktop.in
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Name=Ring
+GenericName=Ring Client
+X-GNOME-FullName=Ring Gnome client
+Comment=Ring is a secured and distributed communication software.
+Exec=gnome-ring
+Icon=@CMAKE_INSTALL_PREFIX@/share/icons/hicolor/scalable/apps/ring.svg
+StartupNotify=true
+Terminal=false
+Type=Application
+Categories=GNOME;GTK;Network;Telephony;
diff --git a/pixmaps/pixmaps.gresource.xml b/pixmaps/pixmaps.gresource.xml
index 8bd974a8..c4067ae9 100644
--- a/pixmaps/pixmaps.gresource.xml
+++ b/pixmaps/pixmaps.gresource.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <gresources>
   <gresource prefix="/cx/ring/RingGnome">
-	<file alias="ring-symbol-blue">symbole-ring-coul.svg</file>
+	<file alias="ring-symbol-blue">ring.svg</file>
 	<file alias="ring-logo-blue">logo-ring-standard-coul.svg</file>
 	<file alias="addressbook_small">addressbook.svg</file>
 	<file alias="history_small">history.svg</file>
diff --git a/pixmaps/symbole-ring-coul.svg b/pixmaps/ring.svg
similarity index 99%
rename from pixmaps/symbole-ring-coul.svg
rename to pixmaps/ring.svg
index 4b5b2634..4574fa91 100644
--- a/pixmaps/symbole-ring-coul.svg
+++ b/pixmaps/ring.svg
@@ -15,7 +15,7 @@
    viewBox="0 0 196.667 191.458"
    id="Calque_1"
    xml:space="preserve"><title
-   id="title3463">symbole-ring-coul.svg</title><metadata
+   id="title3463">ring.svg</title><metadata
    id="metadata486"><rdf:RDF><cc:Work
        rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
          rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>symbole-ring-coul.svg</dc:title><dc:date>2014-12-22</dc:date><dc:creator><cc:Agent><dc:title>Marianne Forget &lt;marianne.forget@savoirfairelinux.com&gt;</dc:title></cc:Agent></dc:creator><dc:rights><cc:Agent><dc:title>Savoir-faire Linux Inc.</dc:title></cc:Agent></dc:rights><dc:publisher><cc:Agent><dc:title>Savoir-faire Linux Inc.</dc:title></cc:Agent></dc:publisher><dc:source>http://sflphone.org/download/source-code</dc:source><dc:subject><rdf:Bag><rdf:li>voip</rdf:li><rdf:li>logo</rdf:li></rdf:Bag></dc:subject><dc:coverage>SFLphone Project</dc:coverage><cc:license
-- 
GitLab