diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2017-10-16 11:56:50 +0200 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2017-10-16 11:56:50 +0200 |
commit | 8b4c3b02574da9ab97fadb21a2708fe32cb50a93 (patch) | |
tree | 4aedd9a4e392991e5da166ad3fc90ed5de67d60f | |
parent | b1a7c2b93723cdfdf64e17fb16e7484c6a448d7d (diff) | |
download | network-manager-applet-8b4c3b02574da9ab97fadb21a2708fe32cb50a93.tar.gz |
meson: make post_install work with DESTDIR
-rw-r--r-- | meson_post_install.py | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/meson_post_install.py b/meson_post_install.py index c1e6a548..f5f4255d 100644 --- a/meson_post_install.py +++ b/meson_post_install.py @@ -10,12 +10,14 @@ if not os.environ.get('DESTDIR'): 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) +# 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') +src = os.path.join(sys.argv[1], 'applications', 'nm-applet.desktop') +if os.environ.get('DESTDIR'): + dst_dir = os.environ.get('DESTDIR') + os.path.join(os.getcwd(), dst_dir) + src = os.environ.get('DESTDIR') + os.path.join(os.getcwd(), src) +if not os.path.exists(dst_dir): + os.makedirs(dst_dir) +dst = os.path.join(dst_dir, 'nm-applet.desktop') +shutil.copyfile(src, dst) |