diff --git a/build-aux/meson_post_install.py b/build-aux/meson_post_install.py deleted file mode 100644 index aefcadf..0000000 --- a/build-aux/meson_post_install.py +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- - -import os -import subprocess - -install_prefix = os.environ['MESON_INSTALL_PREFIX'] - -if not os.environ.get('DESTDIR'): - icon_cache_dir = os.path.join(install_prefix, 'share', 'icons', 'hicolor') - if os.path.exists(icon_cache_dir): - print('Updating icon cacheā€¦') - subprocess.call(['gtk-update-icon-cache', '-qtf', icon_cache_dir]) - - desktop_database_dir = os.path.join(install_prefix, 'share', 'applications') - if os.path.exists(desktop_database_dir): - print('Updating desktop databaseā€¦') - subprocess.call(['update-desktop-database', '-q', desktop_database_dir]) diff --git a/meson.build b/meson.build index 10dd469..d6f65bf 100644 --- a/meson.build +++ b/meson.build @@ -146,8 +146,11 @@ endif subdir('malcontent-client') if get_option('ui').enabled() subdir('malcontent-control') + + gnome.post_install( + gtk_update_icon_cache: true, + update_desktop_database: true, + ) endif subdir('pam') subdir('po') - -meson.add_install_script('build-aux/meson_post_install.py')