summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Catanzaro <mcatanzaro@redhat.com>2022-07-18 13:30:58 -0500
committerMarge Bot <marge-bot@gnome.org>2022-07-22 22:32:43 +0000
commit10d1974f2405549e923fb013e2aa7dffcaa670fa (patch)
treede5a83217d7167acb81b9646615814cd210d54d7
parent973ddb6acbd7ed742546b82f9010c4a581d78b24 (diff)
downloadepiphany-10d1974f2405549e923fb013e2aa7dffcaa670fa.tar.gz
Remove legacy postinstall script
Nowadays Meson has built-in support for this. Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1175>
-rw-r--r--meson.build9
-rw-r--r--post_install.py27
2 files changed, 6 insertions, 30 deletions
diff --git a/meson.build b/meson.build
index 068e18efa..0b27bf5ba 100644
--- a/meson.build
+++ b/meson.build
@@ -1,7 +1,7 @@
project('epiphany', 'c',
license: 'GPL3+',
version: '43.alpha',
- meson_version: '>= 0.51.0',
+ meson_version: '>= 0.59.0',
default_options: ['c_std=gnu11',
'warning_level=2']
)
@@ -159,5 +159,8 @@ subdir('embed')
subdir('src')
subdir('tests')
-meson.add_install_script('post_install.py')
-
+gnome.post_install(
+ gtk_update_icon_cache: true,
+ glib_compile_schemas: true,
+ update_desktop_database: true
+)
diff --git a/post_install.py b/post_install.py
deleted file mode 100644
index 81afb18b7..000000000
--- a/post_install.py
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env python3
-
-import os
-import subprocess
-
-prefix = os.environ.get('MESON_INSTALL_PREFIX', '/usr/local')
-datadir = os.path.join(prefix, 'share')
-
-# Packaging tools define DESTDIR and this isn't needed for them
-if 'DESTDIR' not in os.environ:
- print('Updating icon cache...')
- icon_cache_dir = os.path.join(datadir, 'icons', 'hicolor')
- if not os.path.exists(icon_cache_dir):
- os.makedirs(icon_cache_dir)
- subprocess.call(['gtk-update-icon-cache', '-qtf', icon_cache_dir])
-
- print('Updating desktop database...')
- desktop_database_dir = os.path.join(datadir, 'applications')
- if not os.path.exists(desktop_database_dir):
- os.makedirs(desktop_database_dir)
- subprocess.call(['update-desktop-database', '-q', desktop_database_dir])
-
- print('Compiling GSettings schemas...')
- schemas_dir = os.path.join(datadir, 'glib-2.0', 'schemas')
- if not os.path.exists(schemas_dir):
- os.makedirs(schemas_dir)
- subprocess.call(['glib-compile-schemas', schemas_dir])