From d002457e2e0fb3c43053185e726468af57801c4c Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Tue, 23 Aug 2022 21:38:18 -0400 Subject: [PATCH] build: Use GNOME module post_install() --- meson.build | 10 ++++++++-- meson_post_install.py | 15 --------------- 2 files changed, 8 insertions(+), 17 deletions(-) delete mode 100644 meson_post_install.py diff --git a/meson.build b/meson.build index 771adf17..0eb1c2c9 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,7 @@ -project('sound-juicer', 'c', version: '3.38.0') +project('sound-juicer', 'c', + version: '3.38.0', + meson_version: '>= 0.57.0', +) sound_juicer_prefix = get_option('prefix') sound_juicer_bindir = join_paths(sound_juicer_prefix, get_option('bindir')) @@ -82,7 +85,10 @@ doc_data = files( install_data(doc_data, install_dir: sound_juicer_docdir) -meson.add_install_script('meson_post_install.py') +gnome.post_install( + glib_compile_schemas: true, + gtk_update_icon_cache: true, +) subdir('po') subdir('help') diff --git a/meson_post_install.py b/meson_post_install.py deleted file mode 100644 index b26c88a8..00000000 --- a/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]) -- GitLab