mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04: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')
|
||||
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
|
||||
|
||||
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)
|
||||
|
||||
subdir('man')
|
||||
subdir('shell-completion/bash')
|
||||
subdir('shell-completion/zsh')
|
||||
subdir('src')
|
||||
|
||||
############################################################
|
||||
|
|
@ -441,8 +458,8 @@ summary = [
|
|||
'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 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()),
|
||||
# 'CFLAGS: @0@'.format(${CFLAGS}),
|
||||
# 'CPPFLAGS: @0@'.format(${CPPFLAGS}),
|
||||
|
|
|
|||
|
|
@ -24,6 +24,12 @@ option('pulsedspdir',
|
|||
option('modlibexecdir',
|
||||
type : 'string',
|
||||
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
|
||||
|
||||
|
|
|
|||
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