build: install bash and zsh completions
This commit is contained in:
parent
593be166d1
commit
7c29fbd36f
10
bash-completion/meson.build
Normal file
10
bash-completion/meson.build
Normal file
@ -0,0 +1,10 @@
|
||||
bash_completions = [
|
||||
'openrc',
|
||||
'openrc-service-script',
|
||||
'rc-service',
|
||||
'rc-status',
|
||||
'rc-update',
|
||||
]
|
||||
|
||||
install_data(bash_completions,
|
||||
install_dir : get_option('datadir') / 'bash-completion/completions')
|
@ -156,6 +156,9 @@ init_d_conf_data.set('SYSCONFDIR', get_option('sysconfdir'))
|
||||
dl_dep = cc.find_library('dl', required: false)
|
||||
util_dep = cc.find_library('util', required: false)
|
||||
|
||||
if get_option('bash-completions')
|
||||
subdir('bash-completion')
|
||||
endif
|
||||
subdir('conf.d')
|
||||
subdir('etc')
|
||||
subdir('init.d')
|
||||
@ -169,6 +172,9 @@ subdir('sh')
|
||||
subdir('src')
|
||||
subdir('support')
|
||||
subdir('sysctl.d')
|
||||
if get_option('zsh-completions')
|
||||
subdir('zsh-completion')
|
||||
endif
|
||||
|
||||
meson.add_install_script('tools/meson_runlevels.sh',
|
||||
os,
|
||||
|
@ -1,5 +1,7 @@
|
||||
option('audit', type : 'feature', value : 'auto',
|
||||
description : 'enable libaudit support')
|
||||
option('bash-completions', type : 'boolean',
|
||||
description : 'install bash completions')
|
||||
option('branding', type : 'string',
|
||||
description : 'Add branding to OpenRC')
|
||||
option('local_prefix', type : 'string', value : '/usr/local',
|
||||
@ -31,3 +33,5 @@ option('termcap', type : 'combo',
|
||||
choices :
|
||||
[ '', 'ncurses', 'termcap' ],
|
||||
description : 'the termcap library to use')
|
||||
option('zsh-completions', type : 'boolean',
|
||||
description : 'install zsh completions')
|
||||
|
9
zsh-completion/meson.build
Normal file
9
zsh-completion/meson.build
Normal file
@ -0,0 +1,9 @@
|
||||
zsh_completions = [
|
||||
'_openrc',
|
||||
'_rc-service',
|
||||
'_rc-status',
|
||||
'_rc-update',
|
||||
]
|
||||
|
||||
install_data(zsh_completions,
|
||||
install_dir : get_option('datadir') / 'zsh/site-functions')
|
Loading…
Reference in New Issue
Block a user