[gnome-packagekit/wip/hughsie/meson] f



commit 63a3bb120238874591c97cbddf5fb4c7909de2bd
Author: Richard Hughes <richard hughsie com>
Date:   Tue Dec 6 09:40:09 2016 +0000

    f

 data/appdata/meson.build |   31 ++++++++++------------
 data/meson.build         |   62 ++++++++++++---------------------------------
 2 files changed, 31 insertions(+), 62 deletions(-)
---
diff --git a/data/appdata/meson.build b/data/appdata/meson.build
index 473076f..35e1a11 100644
--- a/data/appdata/meson.build
+++ b/data/appdata/meson.build
@@ -2,20 +2,17 @@
 #
 # Licensed under the GNU General Public License Version 2 or later
 
-i18n.merge_file(
-  input: 'org.gnome.Packages.appdata.xml.in',
-  output: 'org.gnome.Packages.appdata.xml',
-  type: 'xml',
-  po_dir: join_paths(meson.source_root(), 'po'),
-  install: true,
-  install_dir: join_paths(get_option('datadir'), 'appdata')
-)
-
-i18n.merge_file(
-  input: 'org.gnome.PackageUpdater.appdata.xml.in',
-  output: 'org.gnome.PackageUpdater.appdata.xml',
-  type: 'xml',
-  po_dir: join_paths(meson.source_root(), 'po'),
-  install: true,
-  install_dir: join_paths(get_option('datadir'), 'appdata')
-)
+appdata_files = [
+  'org.gnome.Packages.appdata.xml',
+  'org.gnome.PackageUpdater.appdata.xml'
+]
+foreach appdata_file: appdata_files
+  i18n.merge_file(
+    input: appdata_file + '.in',
+    output: appdata_file,
+    type: 'xml',
+    po_dir: join_paths(meson.source_root(), 'po'),
+    install: true,
+    install_dir: join_paths(get_option('datadir'), 'appdata')
+  )
+endforeach
diff --git a/data/meson.build b/data/meson.build
index 647fe84..675bfa2 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -14,48 +14,20 @@ install_data('org.gnome.packagekit.gschema.migrate',
   install_dir : 'share/GConf/gsettings'
 )
 
-i18n.merge_file(
-  input: 'gpk-install-local-file.desktop.in',
-  output: 'gpk-install-local-file.desktop',
-  type: 'desktop',
-  po_dir: join_paths(meson.source_root(), 'po'),
-  install: true,
-  install_dir: join_paths(get_option('datadir'), 'applications')
-)
-
-i18n.merge_file(
-  input: 'gpk-log.desktop.in',
-  output: 'gpk-log.desktop',
-  type: 'desktop',
-  po_dir: join_paths(meson.source_root(), 'po'),
-  install: true,
-  install_dir: join_paths(get_option('datadir'), 'applications')
-)
-
-i18n.merge_file(
-  input: 'gpk-prefs.desktop.in',
-  output: 'gpk-prefs.desktop',
-  type: 'desktop',
-  po_dir: join_paths(meson.source_root(), 'po'),
-  install: true,
-  install_dir: join_paths(get_option('datadir'), 'applications')
-)
-
-i18n.merge_file(
-  input: 'org.gnome.Packages.desktop.in',
-  output: 'org.gnome.Packages.desktop',
-  type: 'desktop',
-  po_dir: join_paths(meson.source_root(), 'po'),
-  install: true,
-  install_dir: join_paths(get_option('datadir'), 'applications')
-)
-
-i18n.merge_file(
-  input: 'org.gnome.PackageUpdater.desktop.in',
-  output: 'org.gnome.PackageUpdater.desktop',
-  type: 'desktop',
-  po_dir: join_paths(meson.source_root(), 'po'),
-  install: true,
-  install_dir: join_paths(get_option('datadir'), 'applications')
-)
-
+desktop_files = [
+  'gpk-install-local-file.desktop',
+  'gpk-log.desktop',
+  'gpk-prefs.desktop',
+  'org.gnome.Packages.desktop',
+  'org.gnome.PackageUpdater.desktop'
+]
+foreach desktop_file: desktop_files
+  i18n.merge_file(
+    input: desktop_file + '.in',
+    output: desktop_file,
+    type: 'desktop',
+    po_dir: join_paths(meson.source_root(), 'po'),
+    install: true,
+    install_dir: join_paths(get_option('datadir'), 'applications')
+  )
+endforeach


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