|
|
@ -45,10 +45,12 @@ bin_script = os.path.join(script_dir, 'meson.py') |
|
|
|
gui_script = os.path.join(script_dir, 'mesongui.py') |
|
|
|
gui_script = os.path.join(script_dir, 'mesongui.py') |
|
|
|
conf_script = os.path.join(script_dir, 'mesonconf.py') |
|
|
|
conf_script = os.path.join(script_dir, 'mesonconf.py') |
|
|
|
intro_script = os.path.join(script_dir, 'mesonintrospect.py') |
|
|
|
intro_script = os.path.join(script_dir, 'mesonintrospect.py') |
|
|
|
|
|
|
|
wraptool_script = os.path.join(script_dir, 'wraptool.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') |
|
|
|
gui_name = os.path.join(bin_dir, 'mesongui') |
|
|
|
conf_name = os.path.join(bin_dir, 'mesonconf') |
|
|
|
conf_name = os.path.join(bin_dir, 'mesonconf') |
|
|
|
intro_name = os.path.join(bin_dir, 'mesonintrospect') |
|
|
|
intro_name = os.path.join(bin_dir, 'mesonintrospect') |
|
|
|
|
|
|
|
wraptool_name = os.path.join(bin_dir, 'wraptool') |
|
|
|
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') |
|
|
@ -58,12 +60,16 @@ in_confmanfile = 'man/mesonconf.1' |
|
|
|
out_confmanfile = os.path.join(man_dir, 'mesonconf.1.gz') |
|
|
|
out_confmanfile = os.path.join(man_dir, 'mesonconf.1.gz') |
|
|
|
in_intromanfile = 'man/mesonintrospect.1' |
|
|
|
in_intromanfile = 'man/mesonintrospect.1' |
|
|
|
out_intromanfile = os.path.join(man_dir, 'mesonintrospect.1.gz') |
|
|
|
out_intromanfile = os.path.join(man_dir, 'mesonintrospect.1.gz') |
|
|
|
|
|
|
|
in_wrapmanfile = 'man/wraptool.1' |
|
|
|
|
|
|
|
out_wrapmanfile = os.path.join(man_dir, 'wraptool.1.gz') |
|
|
|
rpmmacros_dir = os.path.join(install_root, 'lib/rpm/macros.d') |
|
|
|
rpmmacros_dir = os.path.join(install_root, 'lib/rpm/macros.d') |
|
|
|
|
|
|
|
|
|
|
|
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)) |
|
|
|
guisymlink_value = os.path.relpath(gui_script, os.path.dirname(gui_name)) |
|
|
|
confsymlink_value = os.path.relpath(conf_script, os.path.dirname(conf_name)) |
|
|
|
confsymlink_value = os.path.relpath(conf_script, os.path.dirname(conf_name)) |
|
|
|
introsymlink_value = os.path.relpath(intro_script, os.path.dirname(intro_name)) |
|
|
|
introsymlink_value = os.path.relpath(intro_script, os.path.dirname(intro_name)) |
|
|
|
|
|
|
|
wrapsymlink_value = os.path.relpath(intro_script, os.path.dirname(intro_name)) |
|
|
|
|
|
|
|
|
|
|
|
files = glob.glob('*.py') |
|
|
|
files = glob.glob('*.py') |
|
|
|
files += glob.glob('*.ui') |
|
|
|
files += glob.glob('*.ui') |
|
|
|
|
|
|
|
|
|
|
@ -101,15 +107,21 @@ try: |
|
|
|
os.unlink(intro_name) |
|
|
|
os.unlink(intro_name) |
|
|
|
except FileNotFoundError: |
|
|
|
except FileNotFoundError: |
|
|
|
pass |
|
|
|
pass |
|
|
|
|
|
|
|
try: |
|
|
|
|
|
|
|
os.unlink(wraptool_name) |
|
|
|
|
|
|
|
except FileNotFoundError: |
|
|
|
|
|
|
|
pass |
|
|
|
os.symlink(symlink_value, bin_name) |
|
|
|
os.symlink(symlink_value, bin_name) |
|
|
|
os.symlink(guisymlink_value, gui_name) |
|
|
|
os.symlink(guisymlink_value, gui_name) |
|
|
|
os.symlink(confsymlink_value, conf_name) |
|
|
|
os.symlink(confsymlink_value, conf_name) |
|
|
|
os.symlink(introsymlink_value, intro_name) |
|
|
|
os.symlink(introsymlink_value, intro_name) |
|
|
|
|
|
|
|
os.symlink(wrapsymlink_value, wraptool_name) |
|
|
|
print('Installing manfiles to %s.' % man_dir) |
|
|
|
print('Installing manfiles 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())) |
|
|
|
open(out_confmanfile, 'wb').write(gzip.compress(open(in_confmanfile, 'rb').read())) |
|
|
|
open(out_confmanfile, 'wb').write(gzip.compress(open(in_confmanfile, 'rb').read())) |
|
|
|
open(out_guimanfile, 'wb').write(gzip.compress(open(in_guimanfile, 'rb').read())) |
|
|
|
open(out_guimanfile, 'wb').write(gzip.compress(open(in_guimanfile, 'rb').read())) |
|
|
|
open(out_intromanfile, 'wb').write(gzip.compress(open(in_intromanfile, 'rb').read())) |
|
|
|
open(out_intromanfile, 'wb').write(gzip.compress(open(in_intromanfile, 'rb').read())) |
|
|
|
|
|
|
|
open(out_wrapmanfile, 'wb').write(gzip.compress(open(in_wrapmanfile, 'rb').read())) |
|
|
|
|
|
|
|
|
|
|
|
print('Installing modules to %s.' % module_dir) |
|
|
|
print('Installing modules to %s.' % module_dir) |
|
|
|
if os.path.exists('modules/__pycache__'): |
|
|
|
if os.path.exists('modules/__pycache__'): |
|
|
|