diff --git a/Makefile.in b/Makefile.in index 3c64857af..249656454 100644 --- a/Makefile.in +++ b/Makefile.in @@ -29,8 +29,8 @@ endif umu/umu_version.json: umu/umu_version.json.in $(info :: Updating $(@) ) cp $(<) $(<).tmp - sed 's|##UMU_VERSION##|$(shell git describe --always --long --tags)|g' -i $(<).tmp - sed 's|##REAPER_VERSION##|$(shell git describe --always --long --tags)|g' -i $(<).tmp + sed 's|@UMU_VERSION@|$(shell git describe --always --long --tags)|g' -i $(<).tmp + sed 's|@REAPER_VERSION@|$(shell git describe --always --long --tags)|g' -i $(<).tmp mv $(<).tmp $(@) .PHONY: version @@ -44,7 +44,7 @@ version-install: version $(OBJDIR)/.build-umu: | $(OBJDIR) $(info :: Building umu ) - sed 's|##INSTALL_PATH##|$(DATADIR)/$(INSTALLDIR)|g' umu/umu-run.in > $(OBJDIR)/umu-run + sed 's|@INSTALL_PATH@|$(DATADIR)/$(INSTALLDIR)|g' umu/umu-run.in > $(OBJDIR)/umu-run touch $(@) .PHONY: umu @@ -88,7 +88,7 @@ umu-install: version-install umu-dist-install umu-docs-install umu-bin-install # umu-launcher is separate to allow control over installing the bin target $(OBJDIR)/.build-umu-launcher: | $(OBJDIR) $(info :: Building umu-launcher ) - sed 's|##INSTALL_PATH##|$(DATADIR)/$(INSTALLDIR)|g' umu/umu-launcher/umu-run.in > $(OBJDIR)/umu-launcher-run + sed 's|@INSTALL_PATH@|$(DATADIR)/$(INSTALLDIR)|g' umu/umu-launcher/umu-run.in > $(OBJDIR)/umu-launcher-run touch $(@) .PHONY: umu-launcher diff --git a/docs/meson.build b/docs/meson.build new file mode 100644 index 000000000..1150f16d4 --- /dev/null +++ b/docs/meson.build @@ -0,0 +1,21 @@ +scdoc = find_program('scdoc') + +custom_target('man1', + input : 'umu.1.scd', + output : 'umu.1', + command : [ scdoc ], + feed : true, + capture : true, + install : true, + install_dir : get_option('mandir'), +) + +custom_target('man5', + input : 'umu.5.scd', + output : 'umu.5', + command : [ scdoc ], + feed : true, + capture : true, + install : true, + install_dir : get_option('mandir'), +) \ No newline at end of file diff --git a/meson.build b/meson.build new file mode 100644 index 000000000..ecfbd1892 --- /dev/null +++ b/meson.build @@ -0,0 +1,15 @@ +project('umu', + ['cpp'], + license : 'GPL-3.0-only', + license_files : ['LICENSE'], +) + +subproject('reaper', + default_options : [ + 'prefix=' + get_option('prefix'), + 'bindir=' + get_option('prefix') / get_option('datadir') / meson.project_name(), + ], +) + +subdir('umu') +subdir('docs') diff --git a/subprojects/reaper.wrap b/subprojects/reaper.wrap new file mode 100644 index 000000000..1b456d6cc --- /dev/null +++ b/subprojects/reaper.wrap @@ -0,0 +1,8 @@ +[wrap-git] +directory = reaper +url = https://github.com/Plagman/reaper.git +revision = head +depth = 1 + +[provide] +program_names = reaper diff --git a/umu/meson.build b/umu/meson.build new file mode 100644 index 000000000..50529e5e2 --- /dev/null +++ b/umu/meson.build @@ -0,0 +1,49 @@ +git = find_program('git') + +umu_run_data = configuration_data() +umu_run_data.set('INSTALL_PATH', get_option('prefix') / get_option('datadir') / meson.project_name()) +configure_file( + input : 'umu-run.in', + output : 'umu-run', + configuration : umu_run_data, + install : true, + install_dir : get_option('bindir'), + install_mode: 'rwxr-xr-x', +) + +install_data( + [ + 'umu_consts.py', + 'umu_dl_util.py', + 'umu_log.py', + 'umu_plugins.py', + 'umu_util.py', + ], + install_dir: get_option('datadir') / meson.project_name(), +) +install_data( + [ + 'umu_run.py', + ], + install_dir: get_option('datadir') / meson.project_name(), + install_mode: 'rwxr-xr-x', +) + +umu_desc = run_command( + git, '-C', meson.source_root(), 'describe', '--always', '--long', '--tags', check: true +).stdout().strip() +reaper_desc = run_command( + git, '-C', meson.source_root() / 'subprojects/reaper', 'describe', '--always', '--long', '--tags', check: true +).stdout().strip() +umu_version_data = configuration_data() +umu_version_data.set('UMU_VERSION', umu_desc) +umu_version_data.set('REAPER_VERSION', umu_desc) +configure_file( + input : 'umu_version.json.in', + output : 'umu_version.json', + configuration : umu_version_data, + install : true, + install_dir: get_option('datadir') / meson.project_name(), +) + +subdir('umu-launcher') diff --git a/umu/umu-launcher/meson.build b/umu/umu-launcher/meson.build new file mode 100644 index 000000000..a4441f95b --- /dev/null +++ b/umu/umu-launcher/meson.build @@ -0,0 +1,18 @@ +fs = import('fs') + +configure_file( + input : 'umu-run.in', + output : 'umu-run', + configuration : umu_run_data, + install : false, + install_dir : get_option('datadir') / meson.project_name() / fs.name(meson.current_source_dir()), + install_mode: 'rwxr-xr-x', +) + +install_data( + [ + 'compatibilitytool.vdf', + 'toolmanifest.vdf' + ], + install_dir: get_option('datadir') / meson.project_name() / fs.name(meson.current_source_dir()), +) diff --git a/umu/umu-launcher/umu-run.in b/umu/umu-launcher/umu-run.in index ed92c1405..d7d2ef586 100755 --- a/umu/umu-launcher/umu-run.in +++ b/umu/umu-launcher/umu-run.in @@ -1,3 +1,3 @@ #!/usr/bin/env sh -##INSTALL_PATH##/umu_run.py "$@" +@INSTALL_PATH@/umu_run.py "$@" diff --git a/umu/umu-run.in b/umu/umu-run.in index ed92c1405..d7d2ef586 100755 --- a/umu/umu-run.in +++ b/umu/umu-run.in @@ -1,3 +1,3 @@ #!/usr/bin/env sh -##INSTALL_PATH##/umu_run.py "$@" +@INSTALL_PATH@/umu_run.py "$@" diff --git a/umu/umu_version.json.in b/umu/umu_version.json.in index 473089e11..4a5ef790e 100644 --- a/umu/umu_version.json.in +++ b/umu/umu_version.json.in @@ -1,10 +1,10 @@ { "umu": { "versions": { - "launcher": "##UMU_VERSION##", - "runner": "##UMU_VERSION##", + "launcher": "@UMU_VERSION@", + "runner": "@UMU_VERSION@", "runtime_platform": "sniper_platform_0.20240125.75305", - "reaper": "##REAPER_VERSION##", + "reaper": "@REAPER_VERSION@", "pressure_vessel": "v0.20240212.0" } }