build: Switch to Meson’s gnome.post_install function
Instead of using a custom post install script. This drops the GTK 3 dependency. Required bumping minimum Meson version to 0.59 for the `update_desktop_database` kwarg. https://mesonbuild.com/Gnome-module.html#gnomepost_install
This commit is contained in:
parent
6c96a5e7b6
commit
4d234c01dd
|
@ -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])
|
|
|
@ -146,8 +146,11 @@ endif
|
||||||
subdir('malcontent-client')
|
subdir('malcontent-client')
|
||||||
if get_option('ui').enabled()
|
if get_option('ui').enabled()
|
||||||
subdir('malcontent-control')
|
subdir('malcontent-control')
|
||||||
|
|
||||||
|
gnome.post_install(
|
||||||
|
gtk_update_icon_cache: true,
|
||||||
|
update_desktop_database: true,
|
||||||
|
)
|
||||||
endif
|
endif
|
||||||
subdir('pam')
|
subdir('pam')
|
||||||
subdir('po')
|
subdir('po')
|
||||||
|
|
||||||
meson.add_install_script('build-aux/meson_post_install.py')
|
|
||||||
|
|
Loading…
Reference in New Issue