|
|
|
@ -50,13 +50,15 @@ else: |
|
|
|
|
script_dir = os.path.join(install_root, 'share/meson-' + version) |
|
|
|
|
bin_dir = os.path.join(install_root, 'bin') |
|
|
|
|
bin_script = os.path.join(script_dir, 'meson.py') |
|
|
|
|
gui_script = os.path.join(script_dir, 'mesongui.py') |
|
|
|
|
bin_name = os.path.join(bin_dir, 'meson') |
|
|
|
|
gui_name = os.path.join(bin_dir, 'mesongui') |
|
|
|
|
man_dir = os.path.join(install_root, 'share/man/man1') |
|
|
|
|
in_manfile = 'man/meson.1' |
|
|
|
|
out_manfile = os.path.join(man_dir, 'meson.1.gz') |
|
|
|
|
|
|
|
|
|
symlink_value = os.path.relpath(bin_script, os.path.dirname(bin_name)) |
|
|
|
|
|
|
|
|
|
guisymlink_value = os.path.relpath(gui_script, os.path.dirname(gui_name)) |
|
|
|
|
files = glob.glob('*.py') |
|
|
|
|
files += glob.glob('*.ui') |
|
|
|
|
|
|
|
|
@ -77,7 +79,8 @@ try: |
|
|
|
|
os.remove(bin_name) |
|
|
|
|
except OSError: |
|
|
|
|
pass |
|
|
|
|
print('Creating symlink %s.' % bin_name) |
|
|
|
|
print('Creating symlinks %s and %s.' % (bin_name, gui_name)) |
|
|
|
|
os.symlink(symlink_value, bin_name) |
|
|
|
|
os.symlink(guisymlink_value, gui_name) |
|
|
|
|
print('Installing manfile to %s.' % man_dir) |
|
|
|
|
open(out_manfile, 'wb').write(gzip.compress(open(in_manfile, 'rb').read())) |
|
|
|
|