summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2022-09-08 13:56:18 +0200
committerJan Tojnar <jtojnar@gmail.com>2022-09-08 13:56:18 +0200
commit49daccd91b854c3e2acf10372227555cc131cf4a (patch)
tree261dc006ffd1682fce9ae6e1319c1f7ac2ece21d
parent9128ece94d34efe32b529021fc7a9bc43f1835f5 (diff)
downloadgnome-online-accounts-49daccd91b854c3e2acf10372227555cc131cf4a.tar.gz
build: Use gnome.post_install() function
Introduced in Meson 0.57.0, it simplifies the code a bit: https://mesonbuild.com/Gnome-module.html#gnomepost_install
-rw-r--r--meson.build9
-rw-r--r--meson_post_install.py17
2 files changed, 4 insertions, 22 deletions
diff --git a/meson.build b/meson.build
index 4bf81d3..562451b 100644
--- a/meson.build
+++ b/meson.build
@@ -3,7 +3,7 @@ project(
version: '3.45.3',
license: 'LGPL2+',
default_options: 'buildtype=debugoptimized',
- meson_version: '>= 0.56.0'
+ meson_version: '>= 0.57.0',
)
goa_name = 'goa'
@@ -265,10 +265,9 @@ endif
subdir('po')
-meson.add_install_script(
- 'meson_post_install.py',
- goa_datadir,
- enable_goabackend ? 'compile-schemas' : ''
+gnome.post_install(
+ glib_compile_schemas: true,
+ gtk_update_icon_cache: true,
)
summary({
diff --git a/meson_post_install.py b/meson_post_install.py
deleted file mode 100644
index 68dc142..0000000
--- a/meson_post_install.py
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/usr/bin/env python3
-
-import os
-import subprocess
-import sys
-
-if not os.environ.get('DESTDIR'):
- datadir = sys.argv[1]
-
- icondir = os.path.join(datadir, 'icons', 'hicolor')
- print('Update icon cache...')
- subprocess.call(['gtk-update-icon-cache', '-f', '-t', icondir])
-
- if sys.argv[2] == 'compile-schemas':
- schemadir = os.path.join(datadir, 'glib-2.0', 'schemas')
- print('Compiling gsettings schemas...')
- subprocess.call(['glib-compile-schemas', schemadir])