diff options
author | Matt Turner <mattst88@gmail.com> | 2022-09-03 11:41:35 -0400 |
---|---|---|
committer | Christopher Davis <brainblasted@disroot.org> | 2022-09-25 18:16:27 +0000 |
commit | d9048fffe0b5a5e01273cfbccb3bdccb35af2a29 (patch) | |
tree | aff0671cea198583589f196c6a0c60009128d192 | |
parent | 8f0676277badfd5da43f27ff4a72e71f2fc3a9e6 (diff) | |
download | baobab-d9048fffe0b5a5e01273cfbccb3bdccb35af2a29.tar.gz |
build: Use GNOME module post_install()
-rwxr-xr-x | build-aux/post-install.py | 19 | ||||
-rw-r--r-- | meson.build | 9 |
2 files changed, 6 insertions, 22 deletions
diff --git a/build-aux/post-install.py b/build-aux/post-install.py deleted file mode 100755 index 69d526a..0000000 --- a/build-aux/post-install.py +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env python3 - -import os -import pathlib -import subprocess - -prefix = pathlib.Path(os.environ.get('MESON_INSTALL_PREFIX', '/usr/local')) -datadir = prefix / 'share' -destdir = os.environ.get('DESTDIR', '') - -if not destdir: - print('Compiling gsettings schemas...') - subprocess.call(['glib-compile-schemas', str(datadir / 'glib-2.0' / 'schemas')]) - - print('Updating icon cache...') - subprocess.call(['gtk-update-icon-cache', '-qtf', str(datadir / 'icons' / 'hicolor')]) - - print('Updating desktop database...') - subprocess.call(['update-desktop-database', '-q', str(datadir / 'applications')]) diff --git a/meson.build b/meson.build index 47362ab..0e45d38 100644 --- a/meson.build +++ b/meson.build @@ -2,7 +2,7 @@ project( 'baobab', ['vala', 'c'], version: '44.alpha', license: 'GPL2+', - meson_version: '>= 0.50.0', + meson_version: '>= 0.59.0', ) gnome = import('gnome') @@ -25,8 +25,11 @@ conf.set_quoted('GNOMELOCALEDIR', join_paths(get_option('prefix'), get_option('l configure_file(output: 'config.h', configuration: conf) config_h_dir = include_directories('.') -meson.add_install_script(python.find_installation('python3').path(), - join_paths(meson.source_root(), 'build-aux', 'post-install.py')) +gnome.post_install( + glib_compile_schemas: true, + gtk_update_icon_cache: true, + update_desktop_database: true, +) add_project_arguments( '--disable-since-check', |