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