Tooth/build-aux/meson_post_install.py
Chris b6d9b9478d
fix(meson): add support for 0.56.0 (#26)
* meson: depend on 0.56 instead of 0.59

* data/Meson: Relax appstream validation requirement

Co-authored-by: Chris Talbot <chris@talbothome.com>
Co-authored-by: maryjane <maryjane@disroot.org>
2022-12-07 06:18:28 +02:00

20 lines
678 B
Python

#!/usr/bin/env python3
import os
import subprocess
prefix = os.environ.get('MESON_INSTALL_PREFIX', '/usr/local')
data_dir = os.path.join(prefix, 'share')
icon_dir = os.path.join(data_dir, 'icons', 'hicolor')
app_dir = os.path.join(data_dir, 'applications')
schema_dir = os.path.join(data_dir, 'glib-2.0', 'schemas')
if not os.environ.get('DESTDIR'):
print('Compiling gsettings schemas...')
subprocess.call (['glib-compile-schemas', schema_dir])
print('Update icon cache...')
subprocess.call(['gtk-update-icon-cache', '-f', '-t', icon_dir])
print('Updating desktop database...')
subprocess.call(['update-desktop-database', '-q', app_dir])