diff options
author | Oz Tiram <[email protected]> | 2025-03-30 15:20:05 +0200 |
---|---|---|
committer | Luke from DC <[email protected]> | 2025-04-04 22:19:13 +0000 |
commit | b1f21edcec82c25cbd6b59b521a841f86fb1f327 (patch) | |
tree | 57bed53a768722d58d0d4c081be54198f90d6cb6 /install-scripts | |
parent | 0672f82ffb2e56ffb711703b3b786714d2bc794c (diff) | |
download | atril-b1f21edcec82c25cbd6b59b521a841f86fb1f327.tar.bz2 atril-b1f21edcec82c25cbd6b59b521a841f86fb1f327.tar.xz |
Initial support for meson
Mostly copy and paste from linuxmint/xreader
Signed-off-by: Oz Tiram <[email protected]>
Diffstat (limited to 'install-scripts')
-rw-r--r-- | install-scripts/meson.build | 21 | ||||
-rw-r--r-- | install-scripts/meson_install_schemas.py | 10 | ||||
-rw-r--r-- | install-scripts/meson_update_icon_cache.py | 10 | ||||
-rw-r--r-- | install-scripts/meson_update_mime_database.py | 10 |
4 files changed, 51 insertions, 0 deletions
diff --git a/install-scripts/meson.build b/install-scripts/meson.build new file mode 100644 index 00000000..e27404dd --- /dev/null +++ b/install-scripts/meson.build @@ -0,0 +1,21 @@ +# These scripts run as post-installation scripts. + +# They're designed to do nothing if DESTDIR is set, which happens +# during debian builds for instance - there's a fake install target +# so running these would be pointless. + +# When using deb packaging, these aren't needed, as these operations +# are run automatically by the package manager. + +# They're really only necessary in straight builds where 'ninja install' +# will be run directly, to install the program onto the system. + + +# Re-compile gsettings +meson.add_install_script('meson_install_schemas.py') + +# Update mime info +meson.add_install_script('meson_update_mime_database.py') + +# Update the Gtk icon cache +meson.add_install_script('meson_update_icon_cache.py') diff --git a/install-scripts/meson_install_schemas.py b/install-scripts/meson_install_schemas.py new file mode 100644 index 00000000..6b2bbe2d --- /dev/null +++ b/install-scripts/meson_install_schemas.py @@ -0,0 +1,10 @@ +#!/usr/bin/python3 + +import os +import subprocess + +schemadir = os.path.join(os.environ['MESON_INSTALL_PREFIX'], 'share', 'glib-2.0', 'schemas') + +if not os.environ.get('DESTDIR'): + print('Compiling gsettings schemas...') + subprocess.call(['glib-compile-schemas', schemadir]) diff --git a/install-scripts/meson_update_icon_cache.py b/install-scripts/meson_update_icon_cache.py new file mode 100644 index 00000000..d618191a --- /dev/null +++ b/install-scripts/meson_update_icon_cache.py @@ -0,0 +1,10 @@ +#!/usr/bin/python3 + +import os +import subprocess + +themedir = os.path.join(os.environ['MESON_INSTALL_PREFIX'], 'share', 'icons', 'hicolor') + +if not os.environ.get('DESTDIR'): + print('Updating gtk icon cache... %s' % themedir) + subprocess.call(['gtk-update-icon-cache', '-f', '-t', themedir]) diff --git a/install-scripts/meson_update_mime_database.py b/install-scripts/meson_update_mime_database.py new file mode 100644 index 00000000..a997dbca --- /dev/null +++ b/install-scripts/meson_update_mime_database.py @@ -0,0 +1,10 @@ +#!/usr/bin/python3 + +import os +import subprocess + +mimedir = os.path.join(os.environ['MESON_INSTALL_PREFIX'], 'share', 'mime') + +if not os.environ.get('DESTDIR'): + print('Updating mime database...') + subprocess.call(['update-mime-database', mimedir]) |