aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bash-completion/meson.build10
-rw-r--r--meson.build6
-rw-r--r--meson_options.txt4
-rw-r--r--zsh-completion/meson.build9
4 files changed, 29 insertions, 0 deletions
diff --git a/bash-completion/meson.build b/bash-completion/meson.build
new file mode 100644
index 00000000..926bb065
--- /dev/null
+++ b/bash-completion/meson.build
@@ -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')
diff --git a/meson.build b/meson.build
index 585ebb2d..3ac018ec 100644
--- a/meson.build
+++ b/meson.build
@@ -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,
diff --git a/meson_options.txt b/meson_options.txt
index cd922a21..e4e7c4df 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -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')
diff --git a/zsh-completion/meson.build b/zsh-completion/meson.build
new file mode 100644
index 00000000..b55d326b
--- /dev/null
+++ b/zsh-completion/meson.build
@@ -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')