mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-12-14 08:56:34 -05:00
meson: Install completion files
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
This commit is contained in:
parent
a37046cc38
commit
8d241d62c5
4 changed files with 43 additions and 2 deletions
21
meson.build
21
meson.build
|
|
@ -63,6 +63,21 @@ if pulsedspdir == ''
|
||||||
join_paths(libdir, 'pulseaudio')
|
join_paths(libdir, 'pulseaudio')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
bashcompletiondir = get_option('bashcompletiondir')
|
||||||
|
if bashcompletiondir == ''
|
||||||
|
bash_completion_dep = dependency('bash-completion', required : false)
|
||||||
|
if bash_completion_dep.found()
|
||||||
|
bashcompletiondir = bash_completion_dep.get_pkgconfig_variable('completionsdir')
|
||||||
|
else
|
||||||
|
bashcompletiondir = join_paths(datadir, 'bash-completion', 'completions')
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
zshcompletiondir = get_option('zshcompletiondir')
|
||||||
|
if zshcompletiondir == ''
|
||||||
|
zshcompletiondir = join_paths(datadir, 'zsh', 'site-functions')
|
||||||
|
endif
|
||||||
|
|
||||||
# Configuration data
|
# Configuration data
|
||||||
|
|
||||||
cc = meson.get_compiler('c')
|
cc = meson.get_compiler('c')
|
||||||
|
|
@ -420,6 +435,8 @@ check_dep = dependency('check', version : '>= 0.9.10', required : get_option('te
|
||||||
configure_file(output : 'config.h', configuration : cdata)
|
configure_file(output : 'config.h', configuration : cdata)
|
||||||
|
|
||||||
subdir('man')
|
subdir('man')
|
||||||
|
subdir('shell-completion/bash')
|
||||||
|
subdir('shell-completion/zsh')
|
||||||
subdir('src')
|
subdir('src')
|
||||||
|
|
||||||
############################################################
|
############################################################
|
||||||
|
|
@ -441,8 +458,8 @@ summary = [
|
||||||
'System Runtime Path: @0@'.format(cdata.get_unquoted('PA_SYSTEM_RUNTIME_PATH')),
|
'System Runtime Path: @0@'.format(cdata.get_unquoted('PA_SYSTEM_RUNTIME_PATH')),
|
||||||
'System State Path: @0@'.format(cdata.get_unquoted('PA_SYSTEM_STATE_PATH')),
|
'System State Path: @0@'.format(cdata.get_unquoted('PA_SYSTEM_STATE_PATH')),
|
||||||
'System Config Path: @0@'.format(cdata.get_unquoted('PA_SYSTEM_CONFIG_PATH')),
|
'System Config Path: @0@'.format(cdata.get_unquoted('PA_SYSTEM_CONFIG_PATH')),
|
||||||
# 'Zsh completions directory: @0@'.format(${zshcompletiondir}),
|
'Bash completions directory: @0@'.format(bashcompletiondir),
|
||||||
# 'Bash completions directory: @0@'.format(${bashcompletiondir}),
|
'Zsh completions directory: @0@'.format(zshcompletiondir),
|
||||||
'Compiler: @0@ @1@'.format(cc.get_id(), cc.version()),
|
'Compiler: @0@ @1@'.format(cc.get_id(), cc.version()),
|
||||||
# 'CFLAGS: @0@'.format(${CFLAGS}),
|
# 'CFLAGS: @0@'.format(${CFLAGS}),
|
||||||
# 'CPPFLAGS: @0@'.format(${CPPFLAGS}),
|
# 'CPPFLAGS: @0@'.format(${CPPFLAGS}),
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,12 @@ option('pulsedspdir',
|
||||||
option('modlibexecdir',
|
option('modlibexecdir',
|
||||||
type : 'string',
|
type : 'string',
|
||||||
description : 'Specify location where modules will be installed')
|
description : 'Specify location where modules will be installed')
|
||||||
|
option('bashcompletiondir',
|
||||||
|
type : 'string',
|
||||||
|
description : 'Directory for bash completion files')
|
||||||
|
option('zshcompletiondir',
|
||||||
|
type : 'string',
|
||||||
|
description : 'Zsh completions directory')
|
||||||
|
|
||||||
# Optional features
|
# Optional features
|
||||||
|
|
||||||
|
|
|
||||||
17
shell-completion/bash/meson.build
Normal file
17
shell-completion/bash/meson.build
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
aliases = [
|
||||||
|
'pacat',
|
||||||
|
'pacmd',
|
||||||
|
'pactl',
|
||||||
|
'padsp',
|
||||||
|
'paplay',
|
||||||
|
'parec',
|
||||||
|
'parecord',
|
||||||
|
'pasuspender',
|
||||||
|
]
|
||||||
|
|
||||||
|
install_data('pulseaudio', install_dir : bashcompletiondir)
|
||||||
|
|
||||||
|
foreach alias : aliases
|
||||||
|
dst = join_paths(bashcompletiondir, alias)
|
||||||
|
meson.add_install_script('ln', '-fs', 'pulseaudio', dst)
|
||||||
|
endforeach
|
||||||
1
shell-completion/zsh/meson.build
Normal file
1
shell-completion/zsh/meson.build
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
install_data('_pulseaudio', install_dir : zshcompletiondir)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue