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




commit a3801d5776c30dbc52f0b794ac72f87e464c2b19
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 f103d5fea..7e92e010c 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 6b9843c7c..9c109d265 100644
--- a/meson.build
+++ b/meson.build
@@ -263,6 +263,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'), 'swcatalog', 'xml'),
+  )
+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'), 'swcatalog', 'xml'),
+  )
+endif
+
 gnome = import('gnome')
 i18n = import('i18n')
 
diff --git a/meson_options.txt b/meson_options.txt
index 74baa3c56..2b4ef9047 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]