summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2022-09-08 13:52:01 +0200
committerNiels De Graef <nielsdegraef@gmail.com>2022-10-11 18:47:56 +0000
commit686d58fb2454e5038bb951423245ed8c2d4b5cf6 (patch)
tree1b961e0b9c731449beeb56bd5ec2e5b7eac1d2b6
parent01b87066431ff96374fba67f4de5cc79f4af8c45 (diff)
downloadfolks-686d58fb2454e5038bb951423245ed8c2d4b5cf6.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 Icons are not installed so no need to regenerate the icon cache.
-rw-r--r--meson.build4
-rw-r--r--meson_post_install.py15
2 files changed, 3 insertions, 16 deletions
diff --git a/meson.build b/meson.build
index 003e516f..4b14ed15 100644
--- a/meson.build
+++ b/meson.build
@@ -182,7 +182,9 @@ common_pkgconf_variables = [
# Post-install scripts
#-------------------------------------------------
-meson.add_install_script('meson_post_install.py')
+gnome.post_install(
+ glib_compile_schemas: true,
+)
# Subdirectories
diff --git a/meson_post_install.py b/meson_post_install.py
deleted file mode 100644
index bf320a9d..00000000
--- a/meson_post_install.py
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env python3
-
-import os
-import subprocess
-
-install_prefix = os.environ['MESON_INSTALL_PREFIX']
-icondir = os.path.join(install_prefix, 'share', 'icons', 'hicolor')
-schemadir = os.path.join(install_prefix, 'share', 'glib-2.0', 'schemas')
-
-if not os.environ.get('DESTDIR'):
- print('Update icon cache...')
- subprocess.call(['gtk-update-icon-cache', '-f', '-t', icondir])
-
- print('Compiling gsettings schemas...')
- subprocess.call(['glib-compile-schemas', schemadir])