summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2022-10-07 21:03:04 -0400
committerMatt Turner <mattst88@gmail.com>2022-10-07 21:03:04 -0400
commit1050ed212e29f81b24726317017d995e996a29b2 (patch)
tree7743059925662c65c311b8da827adf45f57da9fe
parente8f799466185f3a4134efb076d9d7ba4a04beb4e (diff)
downloadgnome-dictionary-1050ed212e29f81b24726317017d995e996a29b2.tar.gz
build: Use GNOME module post_install()
-rw-r--r--build-aux/meson/post-install.py15
-rw-r--r--meson.build9
2 files changed, 6 insertions, 18 deletions
diff --git a/build-aux/meson/post-install.py b/build-aux/meson/post-install.py
deleted file mode 100644
index b26c88a..0000000
--- a/build-aux/meson/post-install.py
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env python3
-
-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])
diff --git a/meson.build b/meson.build
index 4e3dcac..6cfad7c 100644
--- a/meson.build
+++ b/meson.build
@@ -6,7 +6,7 @@ project('gnome-dictionary', 'c',
'warning_level=1',
],
license: 'GPL-2.0-or-later',
- meson_version: '>= 0.54.0',
+ meson_version: '>= 0.57.0',
)
gdict_version = meson.project_version().split('.')
@@ -49,5 +49,8 @@ subdir('po')
subdir('data')
subdir('help')
-# Post-installation trigger
-meson.add_install_script('build-aux/meson/post-install.py')
+# Post-installation
+gnome.post_install(
+ glib_compile_schemas: true,
+ gtk_update_icon_cache: true,
+)