summaryrefslogtreecommitdiff
path: root/meson_post_install.py
diff options
context:
space:
mode:
authorIñigo Martínez <inigomartinez@gmail.com>2017-09-25 12:27:58 +0200
committerThomas Haller <thaller@redhat.com>2017-10-12 12:15:47 +0200
commit1c1168d4c7a9ed600ea880ed953b9d05b8f04582 (patch)
treefd4a0a391da169452e214161231498369c834a7a /meson_post_install.py
parentd1b7b6a82a17a2f40dcadfafb1c2ea746d869aae (diff)
downloadnetwork-manager-applet-1c1168d4c7a9ed600ea880ed953b9d05b8f04582.tar.gz
build: Port to meson build system
meson is a build system focused on speed an ease of use, which helps speeding up the software development. This patch adds meson support along autotools. https://bugzilla.gnome.org/show_bug.cgi?id=788146
Diffstat (limited to 'meson_post_install.py')
-rw-r--r--meson_post_install.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/meson_post_install.py b/meson_post_install.py
new file mode 100644
index 00000000..c1e6a548
--- /dev/null
+++ b/meson_post_install.py
@@ -0,0 +1,21 @@
+#!/usr/bin/env python3
+
+import os
+import shutil
+import subprocess
+import sys
+
+if not os.environ.get('DESTDIR'):
+ schemadir = os.path.join(sys.argv[1], 'glib-2.0', 'schemas')
+ print('Compile gsettings schemas...')
+ subprocess.call(['glib-compile-schemas', schemadir])
+
+ # FIXME: this is due to unable to copy a generated target file:
+ # https://groups.google.com/forum/#!topic/mesonbuild/3iIoYPrN4P0
+ dst_dir = os.path.join(sys.argv[2], 'xdg', 'autostart')
+ if not os.path.exists(dst_dir):
+ os.makedirs(dst_dir)
+
+ src = os.path.join(sys.argv[1], 'applications', 'nm-applet.desktop')
+ dst = os.path.join(dst_dir, 'nm-applet.desktop')
+ shutil.copyfile(src, dst)