[sysprof/wip/tingping/appdata] Add appdata file



commit b4f76dcac9c789c2c0e27d2b1ba7abbe19cb5758
Author: Patrick Griffis <tingping tingping se>
Date:   Tue Jan 17 07:43:48 2017 -0500

    Add appdata file

 configure.ac                             |    1 +
 data/Makefile.am                         |   13 ++++++++++++-
 data/meson.build                         |   10 ++++++++++
 data/org.gnome.Sysprof2.appdata.xml.in   |   29 +++++++++++++++++++++++++++++
 data/screenshots/sysprof-main-window.png |  Bin 0 -> 108240 bytes
 po/POTFILES.in                           |    1 +
 6 files changed, 53 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 9eff4f5..3715b3e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -78,6 +78,7 @@ PKG_PROG_PKG_CONFIG([0.22])
 GLIB_GSETTINGS
 GOBJECT_INTROSPECTION_CHECK([1.42.0])
 VAPIGEN_CHECK
+APPSTREAM_XML
 
 
 
diff --git a/data/Makefile.am b/data/Makefile.am
index 405014f..edc6c94 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -18,15 +18,26 @@ gsettings_SCHEMAS = org.gnome.sysprof2.gschema.xml
 
 @GSETTINGS_RULES@
 
+
+%.appdata.xml: %.appdata.xml.in
+       $(AM_V_GEN)$(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@
+
+@APPSTREAM_XML_RULES@
+appstream_in_files = org.gnome.Sysprof2.appdata.xml.in
+appstream_XML = $(appstream_in_files:.xml.in=.xml)
+
+
 EXTRA_DIST = \
        sysprof.pc.in \
        org.gnome.Sysprof2.desktop \
+       $(appstream_in_files) \
        $(mime_DATA) \
        $(gsettings_SCHEMAS) \
        meson.build \
+       screenshots \
        $(NULL)
 
-DISTCLEANFILES = $(pkgconfig_DATA)
+DISTCLEANFILES = $(pkgconfig_DATA) $(appstream_XML)
 GITIGNOREFILES = $(dbusservice_DATA)
 
 
diff --git a/data/meson.build b/data/meson.build
index 9951945..8c8227d 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -1,4 +1,6 @@
 datadir = get_option('datadir')
+podir = join_paths(meson.source_root(), 'po')
+msgfmt = find_program('msgfmt')
 
 install_data('sysprof-mime.xml',
   install_dir: join_paths(datadir, 'mime/packages')
@@ -12,6 +14,14 @@ install_data('org.gnome.sysprof2.gschema.xml',
   install_dir: join_paths(datadir, 'glib-2.0/schemas')
 )
 
+# TODO: 0.37.0 adds i18n.merge_file()
+custom_target('appdata-file',
+    input: 'org.gnome.Sysprof2.appdata.xml.in',
+    output: 'org.gnome.Sysprof2.appdata.xml',
+    command: [msgfmt, '--xml', '--template', '@INPUT@', '-d', podir, '-o', '@OUTPUT@'],
+    install: true,
+    install_dir: join_paths(datadir, 'appdata')
+)
 
 pkgconf = configuration_data()
 pkgconf.set('VERSION', meson.project_version())
diff --git a/data/org.gnome.Sysprof2.appdata.xml.in b/data/org.gnome.Sysprof2.appdata.xml.in
new file mode 100644
index 0000000..76491b2
--- /dev/null
+++ b/data/org.gnome.Sysprof2.appdata.xml.in
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component type="desktop">
+  <id>org.gnome.Sysprof2.desktop</id>
+  <translation type="gettext">sysprof</translation>
+  <name>Sysprof</name>
+  <summary>Profiler for an application or entire system</summary>
+  <project_license>GPL-3.0+</project_license>
+  <project_group>GNOME</project_group>
+  <description>
+    <p>Sysprof allows you to profile applications to aid in debugging and optimization.</p>
+  </description>
+  <url type="homepage">https://wiki.gnome.org/Apps/Sysprof</url>
+  <url type="bugtracker">https://bugzilla.gnome.org/enter_bug.cgi?product=sysprof</url>
+  <url type="donation">http://www.gnome.org/friends</url>
+
+  <screenshots>
+    <screenshot type="default">
+      <image>https://git.gnome.org/browse/sysprof/plain/data/screenshots/sysprof-main-window.png</image>
+    </screenshot>
+  </screenshots>
+  <kudos>
+    <kudo>AppMenu</kudo>
+    <kudo>HiDpiIcon</kudo>
+    <kudo>ModernToolkit</kudo>
+  </kudos>
+
+  <metadata_license>CC0-1.0</metadata_license>
+  <update_contact>tingping_at_tingping.se</update_contact>
+</component>
diff --git a/data/screenshots/sysprof-main-window.png b/data/screenshots/sysprof-main-window.png
new file mode 100644
index 0000000..cf94e77
Binary files /dev/null and b/data/screenshots/sysprof-main-window.png differ
diff --git a/po/POTFILES.in b/po/POTFILES.in
index e23237e..bb78e98 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,5 +1,6 @@
 # List of source files containing translatable strings.
 # Please keep this file sorted alphabetically.
+data/org.gnome.Sysprof2.appdata.xml.in
 data/org.gnome.Sysprof2.desktop
 data/org.gnome.sysprof2.gschema.xml
 lib/resources/ui/sp-callgraph-view.ui


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