~fabrixxm/confy

8d406523e55290be8267b4d38c6678b019c0fd67 — Michael Evans a month ago f516916
Use meson gnome module for post install steps
2 files changed, 7 insertions(+), 24 deletions(-)

D build-aux/meson/postinstall.py
M meson.build
D build-aux/meson/postinstall.py => build-aux/meson/postinstall.py +0 -21
@@ 1,21 0,0 @@
#!/usr/bin/env python3

from os import environ, path
from subprocess import call

prefix = environ.get('MESON_INSTALL_PREFIX', '/usr/local')
datadir = path.join(prefix, 'share')
destdir = environ.get('DESTDIR', '')

# Package managers set this so we don't need to run
if not destdir:
    print('Updating icon cache...')
    call(['gtk-update-icon-cache', '-qtf', path.join(datadir, 'icons', 'hicolor')])

    print('Updating desktop database...')
    call(['update-desktop-database', '-q', path.join(datadir, 'applications')])

    print('Compiling GSettings schemas...')
    call(['glib-compile-schemas', path.join(datadir, 'glib-2.0', 'schemas')])



M meson.build => meson.build +7 -3
@@ 1,15 1,19 @@
project('confy',  
          version: '0.7.1',
    meson_version: '>= 0.58.0',
    meson_version: '>= 0.59.0',
  default_options: [ 'warning_level=2',
                   ],
)

i18n = import('i18n')

gnome = import('gnome')

subdir('data')
subdir('src')
subdir('po')

meson.add_install_script('build-aux/meson/postinstall.py')
gnome.post_install(
  glib_compile_schemas: true,
  gtk_update_icon_cache: true,
  update_desktop_database: true,
)