From 1050ed212e29f81b24726317017d995e996a29b2 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Fri, 7 Oct 2022 21:03:04 -0400 Subject: build: Use GNOME module post_install() --- build-aux/meson/post-install.py | 15 --------------- meson.build | 9 ++++++--- 2 files changed, 6 insertions(+), 18 deletions(-) delete mode 100644 build-aux/meson/post-install.py 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, +) -- cgit v1.2.1