webpin/meson/post_install.py
2019-04-18 11:40:17 +02:00

16 lines
No EOL
652 B
Python

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