[gnome-builder/wip/jtojnar/postinstall] build: Use meson’s post_install




commit fea7875460e3137e52ef1ea0294b25588e10ef8d
Author: Jan Tojnar <jtojnar gmail com>
Date:   Fri Jul 29 18:04:03 2022 +0200

    build: Use meson’s post_install
    
    Available since Meson 0.59.0:
    https://mesonbuild.com/Gnome-module.html#gnomepost_install
    
    Leaving package icon cache as is because the Meson tool
    only supports the standard hicolor directory.
    https://gitlab.gnome.org/GNOME/gnome-builder/-/commit/f424bfe428be4f9ffb8ca9e6c0cb5487ca5cd4ee

 build-aux/meson/post_install.py | 12 ------------
 meson.build                     |  6 ++++++
 2 files changed, 6 insertions(+), 12 deletions(-)
---
diff --git a/build-aux/meson/post_install.py b/build-aux/meson/post_install.py
index 6dfd4c20e..ed3e63adc 100755
--- a/build-aux/meson/post_install.py
+++ b/build-aux/meson/post_install.py
@@ -8,18 +8,6 @@ datadir = os.path.join(prefix, 'share')
 
 # Packaging tools define DESTDIR and this isn't needed for them
 if 'DESTDIR' not in os.environ:
-    print('Compiling gsettings schemas...')
-    subprocess.call(['glib-compile-schemas',
-                     os.path.join(datadir, 'glib-2.0', 'schemas')])
-
-    print('Updating icon cache...')
-    subprocess.call(['gtk-update-icon-cache', '-qtf',
-                     os.path.join(datadir, 'icons', 'hicolor')])
-
     print('Updating package icon cache...')
     subprocess.call(['gtk-update-icon-cache', '-qtf',
                      os.path.join(datadir, 'gnome-builder', 'icons', 'hicolor')])
-
-    print('Updating desktop database...')
-    subprocess.call(['update-desktop-database', '-q',
-                     os.path.join(datadir, 'applications')])
diff --git a/meson.build b/meson.build
index e70557ce7..c2acbebca 100644
--- a/meson.build
+++ b/meson.build
@@ -355,6 +355,12 @@ subdir('src')
 subdir('po')
 subdir('doc')
 
+gnome.post_install(
+  glib_compile_schemas: true,
+  gtk_update_icon_cache: true,
+  update_desktop_database: true,
+)
+
 meson.add_install_script('build-aux/meson/post_install.py')
 
 message('\n  '.join(status))


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