[five-or-more] build: Use GNOME module post_install()



commit 3edc7e1c58ccf2b2d84eeab1ac453d5d829e7726
Author: Matt Turner <mattst88 gmail com>
Date:   Sat Sep 3 12:00:02 2022 -0400

    build: Use GNOME module post_install()

 meson.build           |  7 ++++++-
 meson_post_install.py | 11 -----------
 2 files changed, 6 insertions(+), 12 deletions(-)
---
diff --git a/meson.build b/meson.build
index a7d403c..a65a639 100644
--- a/meson.build
+++ b/meson.build
@@ -1,6 +1,6 @@
 project('five-or-more', ['c', 'vala'],
   version: '3.32.0',
-  meson_version: '>= 0.50.0',
+  meson_version: '>= 0.57.0',
   license: 'GPLv2'
 )
 
@@ -48,6 +48,11 @@ add_project_arguments([
 # Extra scripts
 meson.add_install_script('meson_post_install.py')
 
+gnome.post_install(
+  glib_compile_schemas: true,
+  gtk_update_icon_cache: true,
+)
+
 # Subdirs
 subdir('data')
 subdir('help')
diff --git a/meson_post_install.py b/meson_post_install.py
index 29e0b7b..0ad3132 100644
--- a/meson_post_install.py
+++ b/meson_post_install.py
@@ -3,17 +3,6 @@
 import os
 import subprocess
 
-install_prefix = os.environ['MESON_INSTALL_PREFIX']
-icondir = os.path.join(install_prefix, 'share', 'icons', 'hicolor')
-schemadir = os.path.join(install_prefix, 'share', 'glib-2.0', 'schemas')
-
-if not os.environ.get('DESTDIR'):
-       print('Update icon cache...')
-       subprocess.call(['gtk-update-icon-cache', '-f', '-t', icondir])
-
-       print('Compiling gsettings schemas...')
-       subprocess.call(['glib-compile-schemas', schemadir])
-
 sourcedir = os.environ['MESON_SOURCE_ROOT']
 hooksdir = os.path.join(sourcedir, '.git', 'hooks')
 precommit = os.path.join(hooksdir, 'pre-commit')


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