diff options
author | Arnaud Rebillout <arnaud.rebillout@collabora.com> | 2018-10-22 11:31:04 +0700 |
---|---|---|
committer | Arun Raghavan <arun@arunraghavan.net> | 2018-12-27 17:25:56 +0530 |
commit | 12f0e9232f7149fda377abec386f5069652bc318 (patch) | |
tree | bd105658a27eb1b9472cd4d96b511bc9e605e55b | |
parent | bf3fbd5a8a2fe6ba41afac5d9c1fe83beebf3fa7 (diff) | |
download | pulseaudio-12f0e9232f7149fda377abec386f5069652bc318.tar.gz |
meson: Process and install files: default.pa, system.pa, daemon.conf, client.conf
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
-rw-r--r-- | meson.build | 3 | ||||
-rw-r--r-- | src/daemon/meson.build | 64 | ||||
-rw-r--r-- | src/pulse/meson.build | 12 |
3 files changed, 78 insertions, 1 deletions
diff --git a/meson.build b/meson.build index 42a062e7..4cc77efb 100644 --- a/meson.build +++ b/meson.build @@ -45,6 +45,7 @@ localstatedir = join_paths(prefix, get_option('localstatedir')) sysconfdir = join_paths(prefix, get_option('sysconfdir')) pulselibexecdir = join_paths(libexecdir, 'pulse') +pulsesysconfdir = join_paths(sysconfdir, 'pulse') pulsedspdir = get_option('pulsedspdir') if pulsedspdir == '' @@ -69,7 +70,7 @@ cdata.set_quoted('PA_MACHINE_ID_FALLBACK', join_paths(localstatedir, 'lib', 'dbu cdata.set_quoted('PA_SRCDIR', join_paths(meson.current_source_dir(), 'src')) cdata.set_quoted('PA_BUILDDIR', meson.current_build_dir()) cdata.set_quoted('PA_SOEXT', '.so') -cdata.set_quoted('PA_DEFAULT_CONFIG_DIR', join_paths(sysconfdir, 'pulse')) +cdata.set_quoted('PA_DEFAULT_CONFIG_DIR', pulsesysconfdir) cdata.set_quoted('PA_BINARY', join_paths(bindir, 'pulseaudio')) cdata.set_quoted('PA_SYSTEM_RUNTIME_PATH', join_paths(localstatedir, 'run', 'pulse')) cdata.set_quoted('PA_SYSTEM_CONFIG_PATH', join_paths(localstatedir, 'lib', 'pulse')) diff --git a/src/daemon/meson.build b/src/daemon/meson.build index bc631d29..40527e9c 100644 --- a/src/daemon/meson.build +++ b/src/daemon/meson.build @@ -45,3 +45,67 @@ if x11_dep.found() install_dir : bindir, ) endif + +# Configuration files + +m4 = find_program('m4', required: true) + +daemon_conf = configuration_data() +daemon_conf.merge_from(cdata) +daemon_conf.set('PA_DEFAULT_CONFIG_DIR', cdata.get_unquoted('PA_DEFAULT_CONFIG_DIR')) + +daemon_template_file = configure_file( + input : 'daemon.conf.in', + output : 'daemon.conf.tmp', + configuration : daemon_conf, +) + +custom_target('daemon.conf', + input : daemon_template_file, + output : 'daemon.conf', + capture : true, + command : [m4, '@INPUT@'], + install : true, + install_dir : pulsesysconfdir, +) + +default_conf = configuration_data() +default_conf.merge_from(cdata) +default_conf.set('PA_BINARY', cdata.get_unquoted('PA_BINARY')) +default_conf.set('PA_SOEXT', cdata.get_unquoted('PA_SOEXT')) +# TODO: OS_IS_WIN32, HAVE_MKFIFO, HAVE_AF_UNIX + +default_template_file = configure_file( + input : 'default.pa.in', + output : 'default.pa.tmp', + configuration : default_conf, +) + +custom_target('default.pa', + input : default_template_file, + output : 'default.pa', + capture : true, + command : [m4, '@INPUT@'], + install : true, + install_dir : pulsesysconfdir, +) + +system_conf = configuration_data() +system_conf.merge_from(cdata) +system_conf.set('PA_BINARY', cdata.get_unquoted('PA_BINARY')) +system_conf.set('PA_SOEXT', cdata.get_unquoted('PA_SOEXT')) + +system_template_file = configure_file( + input : 'system.pa.in', + output : 'system.pa.tmp', + configuration : system_conf, +) + +custom_target('system.pa', + input : system_template_file, + output : 'system.pa', + capture : true, + command : [m4, '@INPUT@'], + install : true, + install_dir : pulsesysconfdir, +) diff --git a/src/pulse/meson.build b/src/pulse/meson.build index b1bf6433..a34ec7b1 100644 --- a/src/pulse/meson.build +++ b/src/pulse/meson.build @@ -90,3 +90,15 @@ if glib_dep.found() install : true, ) endif + +# Configuration files + +client_conf = configuration_data() +client_conf.set('PA_BINARY', cdata.get_unquoted('PA_BINARY')) + +client_conf_file = configure_file( + input : 'client.conf.in', + output : 'client.conf', + configuration : client_conf, + install_dir : pulsesysconfdir, +) |