File: gui-appdata-format-location.patch

package info (click to toggle)
scanmem 0.17-6
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,268 kB
  • sloc: ansic: 4,758; python: 1,581; sh: 182; makefile: 98
file content (71 lines) | stat: -rw-r--r-- 2,676 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
From 00e6db7e4ec97734a18d7e2ede2981601b533b14 Mon Sep 17 00:00:00 2001
From: Sebastian Parschauer <s.parschauer@gmx.de>
Date: Fri, 19 Jan 2018 17:42:12 +0100
Subject: [PATCH] gui: appdata: Use new format and location
Forwarded: https://github.com/scanmem/scanmem/issues/295

Lintian reports that our appdata uses legacy format and location.
It refers to:
https://www.freedesktop.org/software/appstream/docs/
chap-Metadata.html#sect-Metadata-GenericComponent

So adapt to the new "<id/>" element, rename "<updatecontact/>" to
"<update_contact/>", and use the "<component/>" element instead
of "<application/>". Also add the required "<image/>" element.
Install to /usr/share/metainfo/ instead of /usr/share/appdata/.

Verified-by: appstreamcli validate
Fixes #295

[sparschauer: Merge with "0cc3830 gui: Update screenshot ..."]
Last-Update: 2018-01-21

Patch-Name: gui-appdata-format-location.patch
---
 gui/GameConqueror.appdata.xml.in | 14 +++++++++-----
 gui/Makefile.am                  |  2 +-
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/gui/GameConqueror.appdata.xml.in b/gui/GameConqueror.appdata.xml.in
index a99fce5..ad4cf5f 100644
--- a/gui/GameConqueror.appdata.xml.in
+++ b/gui/GameConqueror.appdata.xml.in
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- Copyright 2014 Igor Gnatenko <i.gnatenko.brain@gmail.com> -->
-<application>
-  <id type="desktop">GameConqueror.desktop</id>
+<component type="desktop">
+  <id>org.scanmem.gameconqueror</id>
   <metadata_license>CC0-1.0</metadata_license>
   <project_license>GPL-3.0+</project_license>
   <_name>Game Conqueror</_name>
@@ -23,8 +23,12 @@
   </ul>
   </description>
   <screenshots>
-    <screenshot type="default" width="627" height="457">https://raw.githubusercontent.com/scanmem/scanmem/master/gui/screenshot.png</screenshot>
+    <screenshot type="default">
+      <image type="source" width="550" height="587">
+        https://raw.githubusercontent.com/scanmem/scanmem/master/gui/screenshot.png
+      </image>
+    </screenshot>
   </screenshots>
   <url type="homepage">https://github.com/scanmem/scanmem</url>
-  <updatecontact>i.gnatenko.brain@gmail.com</updatecontact>
-</application>
+  <update_contact>i.gnatenko.brain@gmail.com</update_contact>
+</component>
diff --git a/gui/Makefile.am b/gui/Makefile.am
index 8c27738..e86af9f 100644
--- a/gui/Makefile.am
+++ b/gui/Makefile.am
@@ -21,7 +21,7 @@ EXTRA_DIST = gameconqueror.in consts.py.in
 
 desktopdir=$(datadir)/applications
 polkitdir=$(datadir)/polkit-1/actions
-appdatadir=$(datadir)/appdata
+appdatadir=$(datadir)/metainfo
 
 install-data-hook:
 	chmod +x $(DESTDIR)$(gameconquerordir)/GameConqueror.py