diff --git a/build-aux/meson_post_install.py b/build-aux/meson_post_install.py deleted file mode 100755 index 9028aec7..00000000 --- a/build-aux/meson_post_install.py +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env python3 - -from os import environ, path -from subprocess import call - -if not environ.get('DESTDIR', ''): - PREFIX = environ.get('MESON_INSTALL_PREFIX', '/usr/local') - DATA_DIR = path.join(PREFIX, 'share') - print('Updating icon cache...') - call(['gtk-update-icon-cache', '-qtf', path.join(DATA_DIR, 'icons/hicolor')]) - print("Compiling new schemas...") - call(["glib-compile-schemas", path.join(DATA_DIR, 'glib-2.0/schemas')]) - print("Updating desktop database...") - call(["update-desktop-database", path.join(DATA_DIR, 'applications')]) diff --git a/meson.build b/meson.build index 31d526de..af0a9ce4 100644 --- a/meson.build +++ b/meson.build @@ -2,7 +2,7 @@ project('fractal', 'rust', version: '0.0.1', license: 'GPL-3.0-or-later', - meson_version: '>= 0.57') + meson_version: '>= 0.59') i18n = import('i18n') gnome = import('gnome') @@ -80,4 +80,8 @@ subdir('data') subdir('po') subdir('src') -meson.add_install_script('build-aux/meson_post_install.py') +gnome.post_install( + gtk_update_icon_cache: true, + glib_compile_schemas: true, + update_desktop_database: true, +)