[gnome-characters] meson: Use gnome.post_install



commit b011625d91c4c9651e92dfce5350945e7a92e2fd
Author: Maximiliano Sandoval R <msandova gnome org>
Date:   Fri Feb 18 15:33:08 2022 +0100

    meson: Use gnome.post_install

 meson.build           |  6 +++++-
 meson_post_install.py | 18 +++---------------
 2 files changed, 8 insertions(+), 16 deletions(-)
---
diff --git a/meson.build b/meson.build
index 20cc44d..b0d08da 100644
--- a/meson.build
+++ b/meson.build
@@ -83,9 +83,13 @@ configure_file(
 
 meson.add_install_script(
   'meson_post_install.py',
-  characters_datadir,
   characters_bindir,
   characters_pkgdatadir,
   application_id
 )
 
+gnome.post_install(
+  gtk_update_icon_cache: true,
+  glib_compile_schemas: true,
+  update_desktop_database: true,
+)
diff --git a/meson_post_install.py b/meson_post_install.py
index 64c0ab0..6fefea5 100644
--- a/meson_post_install.py
+++ b/meson_post_install.py
@@ -5,10 +5,9 @@ import subprocess
 import sys
 
 destdir = os.environ.get('DESTDIR', '')
-datadir = sys.argv[1]
-bindir = os.path.normpath(destdir + os.sep + sys.argv[2])
-pkgdatadir = sys.argv[3]
-application_id = sys.argv[4]
+bindir = os.path.normpath(destdir + os.sep + sys.argv[1])
+pkgdatadir = sys.argv[2]
+application_id = sys.argv[3]
 
 if not os.path.exists(bindir):
   os.makedirs(bindir)
@@ -16,14 +15,3 @@ if not os.path.exists(bindir):
 src = os.path.join(pkgdatadir, application_id)
 dest = os.path.join(bindir, 'gnome-characters')
 subprocess.call(['ln', '-s', '-f', src, dest])
-
-if not os.environ.get('DESTDIR'):
-    print('Compiling gsettings schemas...')
-    subprocess.call(['glib-compile-schemas', os.path.join(datadir, 'glib-2.0', 'schemas')])
-
-    print('Updating icon cache...')
-    subprocess.call(['gtk-update-icon-cache', '-qtf', os.path.join(datadir, 'icons', 'hicolor')])
-
-    print('Updating desktop database...')
-    subprocess.call(['update-desktop-database', '-q', os.path.join(datadir, 'applications')])
-


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]