[gnome-packagekit] trivial: appdata -> metainfo



commit 56417b0c588c5857994e712800bee72c1f47d6fd
Author: Matthias Klumpp <matthias tenstral net>
Date:   Wed Sep 28 01:17:27 2022 +0200

    trivial: appdata -> metainfo
    
    This was done the same in GNOME Software, so it's nice to have for
    consistency.

 RELEASE                                                   |   2 +-
 contrib/gnome-packagekit.spec.in                          |   5 ++---
 data/appdata/meson.build                                  |  14 --------------
 data/meson.build                                          |   2 +-
 data/metainfo/meson.build                                 |  14 ++++++++++++++
 .../org.gnome.PackageUpdater.metainfo.xml.in}             |   4 ++--
 .../org.gnome.Packages.metainfo.xml.in}                   |   6 +++---
 data/{appdata => metainfo}/ss-application-details.png     | Bin
 data/{appdata => metainfo}/ss-application.png             | Bin
 data/{appdata => metainfo}/ss-log.png                     | Bin
 data/{appdata => metainfo}/ss-prefs.png                   | Bin
 data/{appdata => metainfo}/ss-updater.png                 | Bin
 meson.build                                               |   2 +-
 po/POTFILES.in                                            |   4 ++--
 14 files changed, 26 insertions(+), 27 deletions(-)
---
diff --git a/RELEASE b/RELEASE
index 0cb54f80..b5441581 100644
--- a/RELEASE
+++ b/RELEASE
@@ -3,7 +3,7 @@ PackageKit Release Notes
 1. Write NEWS entries for gnome-packagekit in the same format as usual.
 
 git log --format="%s" GNOME_PACKAGEKIT_3_30_0.. | grep -i -v trivial | grep -v Merge | uniq
-Add any user visible changes into data/appdata/*.xml.in
+Add any user visible changes into data/metainfo/*.xml.in
 
 3. Commit changes in gnome-packagekit git:
 
diff --git a/contrib/gnome-packagekit.spec.in b/contrib/gnome-packagekit.spec.in
index f79512b4..5af08dcf 100644
--- a/contrib/gnome-packagekit.spec.in
+++ b/contrib/gnome-packagekit.spec.in
@@ -126,17 +126,16 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
 
 %files installer
 %{_bindir}/gpk-application
-%{_datadir}/appdata/org.gnome.Packages.appdata.xml
+%{_datadir}/metainfo/org.gnome.Packages.metainfo.xml
 %{_datadir}/applications/org.gnome.Packages.desktop
 %{_datadir}/man/man1/gpk-application.1*
 
 %files updater
 %{_bindir}/gpk-update-viewer
-%{_datadir}/appdata/org.gnome.PackageUpdater.appdata.xml
+%{_datadir}/metainfo/org.gnome.PackageUpdater.metainfo.xml
 %{_datadir}/applications/org.gnome.PackageUpdater.desktop
 %{_datadir}/man/man1/gpk-update-viewer.1*
 
 %changelog
 * #LONGDATE# Richard Hughes <richard hughsie com> #VERSION#-0.#BUILD##ALPHATAG#
 - Update from GIT
-
diff --git a/data/meson.build b/data/meson.build
index d6f2c159..b6724fae 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -1,4 +1,4 @@
-subdir('appdata')
+subdir('metainfo')
 subdir('icons')
 
 compiled = gnome.compile_schemas()
diff --git a/data/metainfo/meson.build b/data/metainfo/meson.build
new file mode 100644
index 00000000..a387fc77
--- /dev/null
+++ b/data/metainfo/meson.build
@@ -0,0 +1,14 @@
+metainfo_files = [
+  'org.gnome.Packages.metainfo.xml',
+  'org.gnome.PackageUpdater.metainfo.xml'
+]
+foreach metainfo_file: metainfo_files
+  i18n.merge_file(
+    input: metainfo_file + '.in',
+    output: metainfo_file,
+    type: 'xml',
+    po_dir: join_paths(meson.source_root(), 'po'),
+    install: true,
+    install_dir: join_paths(get_option('datadir'), 'metainfo')
+  )
+endforeach
diff --git a/data/appdata/org.gnome.PackageUpdater.appdata.xml.in 
b/data/metainfo/org.gnome.PackageUpdater.metainfo.xml.in
similarity index 98%
rename from data/appdata/org.gnome.PackageUpdater.appdata.xml.in
rename to data/metainfo/org.gnome.PackageUpdater.metainfo.xml.in
index 6c72f694..4bc489af 100644
--- a/data/appdata/org.gnome.PackageUpdater.appdata.xml.in
+++ b/data/metainfo/org.gnome.PackageUpdater.metainfo.xml.in
@@ -23,14 +23,14 @@
 
   <screenshots>
     <screenshot type="default">
-      <image>https://git.gnome.org/browse/gnome-packagekit/plain/data/appdata/ss-updater.png</image>
+      <image>https://git.gnome.org/browse/gnome-packagekit/plain/data/metainfo/ss-updater.png</image>
     </screenshot>
   </screenshots>
 
   <content_rating type="oars-1.1" />
 
   <!--
-   Validate with `appstreamcli validate *.appdata.xml`
+   Validate with `appstreamcli validate *.metainfo.xml`
   -->
   <releases>
     <release date="2019-03-08" version="3.32.0">
diff --git a/data/appdata/org.gnome.Packages.appdata.xml.in b/data/metainfo/org.gnome.Packages.metainfo.xml.in
similarity index 97%
rename from data/appdata/org.gnome.Packages.appdata.xml.in
rename to data/metainfo/org.gnome.Packages.metainfo.xml.in
index 3ad58b27..164cc081 100644
--- a/data/appdata/org.gnome.Packages.appdata.xml.in
+++ b/data/metainfo/org.gnome.Packages.metainfo.xml.in
@@ -28,17 +28,17 @@
 
   <screenshots>
     <screenshot type="default">
-      <image>https://git.gnome.org/browse/gnome-packagekit/plain/data/appdata/ss-application.png</image>
+      <image>https://git.gnome.org/browse/gnome-packagekit/plain/data/metainfo/ss-application.png</image>
     </screenshot>
     <screenshot>
-      
<image>https://git.gnome.org/browse/gnome-packagekit/plain/data/appdata/ss-application-details.png</image>
+      
<image>https://git.gnome.org/browse/gnome-packagekit/plain/data/metainfo/ss-application-details.png</image>
     </screenshot>
   </screenshots>
 
   <content_rating type="oars-1.1" />
 
   <!--
-   Validate with `appstreamcli validate *.appdata.xml`
+   Validate with `appstreamcli validate *.metainfo.xml`
   -->
   <releases>
     <release date="2019-03-08" version="3.32.0">
diff --git a/data/appdata/ss-application-details.png b/data/metainfo/ss-application-details.png
similarity index 100%
rename from data/appdata/ss-application-details.png
rename to data/metainfo/ss-application-details.png
diff --git a/data/appdata/ss-application.png b/data/metainfo/ss-application.png
similarity index 100%
rename from data/appdata/ss-application.png
rename to data/metainfo/ss-application.png
diff --git a/data/appdata/ss-log.png b/data/metainfo/ss-log.png
similarity index 100%
rename from data/appdata/ss-log.png
rename to data/metainfo/ss-log.png
diff --git a/data/appdata/ss-prefs.png b/data/metainfo/ss-prefs.png
similarity index 100%
rename from data/appdata/ss-prefs.png
rename to data/metainfo/ss-prefs.png
diff --git a/data/appdata/ss-updater.png b/data/metainfo/ss-updater.png
similarity index 100%
rename from data/appdata/ss-updater.png
rename to data/metainfo/ss-updater.png
diff --git a/meson.build b/meson.build
index fd7c3e05..fab8dbaa 100644
--- a/meson.build
+++ b/meson.build
@@ -143,7 +143,7 @@ ascli_exe = find_program('appstreamcli', required: false)
 if ascli_exe.found()
   custom_target('NEWS',
     output : 'NEWS',
-    input : 'data/appdata/org.gnome.Packages.appdata.xml.in',
+    input : 'data/metainfo/org.gnome.Packages.metainfo.xml.in',
     command : [ascli_exe, 'metainfo-to-news',
                '--format=text',
                '@INPUT@',
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 6c183a52..e6cede3f 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,5 +1,5 @@
-data/appdata/org.gnome.Packages.appdata.xml.in
-data/appdata/org.gnome.PackageUpdater.appdata.xml.in
+data/metainfo/org.gnome.Packages.metainfo.xml.in
+data/metainfo/org.gnome.PackageUpdater.metainfo.xml.in
 data/org.gnome.Packages.desktop.in
 src/gpk-application.ui
 src/gpk-client.ui


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