[gnome-software/mwleeds/hardcoded-pwa-list: 5/14] Add gnome-pwa-list default set of web apps




commit 69ec65dd295711da6471c69d74de189001332fd6
Author: Phaedrus Leeds <mwleeds protonmail com>
Date:   Tue Mar 8 18:06:10 2022 -0800

    Add gnome-pwa-list default set of web apps
    
    For context see
    https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1575

 .gitignore                      |  1 +
 meson.build                     | 17 +++++++++++++++++
 meson_options.txt               |  2 ++
 subprojects/gnome-pwa-list.wrap |  5 +++++
 4 files changed, 25 insertions(+)
---
diff --git a/.gitignore b/.gitignore
index 9095d8039..acb460b0a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
 subprojects/appstream/
 subprojects/gi-docgen.wrap
 subprojects/gi-docgen/
+subprojects/gnome-pwa-list/
 subprojects/graphene.wrap
 subprojects/graphene/
 subprojects/gtk/
diff --git a/meson.build b/meson.build
index aeeb72a06..68ead611f 100644
--- a/meson.build
+++ b/meson.build
@@ -258,6 +258,23 @@ if get_option('snap')
   snap = dependency('snapd-glib', version : '>= 1.50')
 endif
 
+if get_option('hardcoded_foss_webapps') or get_option('hardcoded_proprietary_webapps')
+  assert(get_option('webapps'), 'webapps option must be true when 
hardcoded_foss_webapps/hardcoded_proprietary_webapps is')
+  pwa_list_proj = subproject('gnome-pwa-list')
+endif
+if get_option('hardcoded_foss_webapps')
+  pwa_list_foss = pwa_list_proj.get_variable('gnome_pwa_list_foss')
+  install_data(pwa_list_foss,
+    install_dir : join_paths(get_option('datadir'), 'app-info', 'xmls'),
+  )
+endif
+if get_option('hardcoded_proprietary_webapps')
+  pwa_list_proprietary = pwa_list_proj.get_variable('gnome_pwa_list_proprietary')
+  install_data(pwa_list_proprietary,
+    install_dir : join_paths(get_option('datadir'), 'app-info', 'xmls'),
+  )
+endif
+
 gnome = import('gnome')
 i18n = import('i18n')
 
diff --git a/meson_options.txt b/meson_options.txt
index 030da3e23..2635a8ad3 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -10,6 +10,8 @@ option('flatpak', type : 'boolean', value : true, description : 'enable Flatpak
 option('malcontent', type : 'boolean', value : true, description : 'enable parental controls support using 
libmalcontent')
 option('rpm_ostree', type : 'boolean', value : false, description : 'enable rpm-ostree support')
 option('webapps', type : 'boolean', value : false, description : 'enable webapps support')
+option('hardcoded_foss_webapps', type : 'boolean', value : false, description : 'enable inclusion of a 
default set of installable FOSS webapps')
+option('hardcoded_proprietary_webapps', type : 'boolean', value : false, description : 'enable inclusion of 
a default set of installable proprietary webapps')
 option('gudev', type : 'boolean', value : true, description : 'enable GUdev support')
 option('apt', type : 'boolean', value : false, description : 'enable apt: URL handler in the .desktop file')
 option('snap', type : 'boolean', value : false, description : 'enable Snap support')
diff --git a/subprojects/gnome-pwa-list.wrap b/subprojects/gnome-pwa-list.wrap
new file mode 100644
index 000000000..5f31b4bf6
--- /dev/null
+++ b/subprojects/gnome-pwa-list.wrap
@@ -0,0 +1,5 @@
+[wrap-git]
+directory = gnome-pwa-list
+url = https://gitlab.gnome.org/mwleeds/gnome-pwa-list.git
+revision = 48ac9f7ed6a639eab7648f3e3b19105694eaf306
+depth = 1


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