[pulseaudio-commits] [Git][pulseaudio/pulseaudio][master] meson: allow to disable installing completions

Tanu Kaskinen gitlab at gitlab.freedesktop.org
Thu Nov 7 12:50:59 UTC 2019



Tanu Kaskinen pushed to branch master at PulseAudio / pulseaudio


Commits:
7670dffe by Timo Gurr at 2019-11-07T12:50:56Z
meson: allow to disable installing completions

- - - - -


3 changed files:

- meson_options.txt
- shell-completion/bash/meson.build
- shell-completion/zsh/meson.build


Changes:

=====================================
meson_options.txt
=====================================
@@ -56,10 +56,10 @@ option('udevrulesdir',
        description : 'Directory for udev rules (defaults to /lib/udev/rules.d)')
 option('bashcompletiondir',
        type : 'string',
-       description : 'Directory for bash completion files')
+       description : 'Directory for bash completion scripts ["no" disables]')
 option('zshcompletiondir',
        type : 'string',
-       description : 'Zsh completions directory')
+       description : 'Directory for zsh completion scripts ["no" disables]')
 
 # Optional features
 


=====================================
shell-completion/bash/meson.build
=====================================
@@ -1,18 +1,20 @@
-aliases = [
-  'pacat',
-  'pacmd',
-  'pactl',
-  'padsp',
-  'paplay',
-  'parec',
-  'parecord',
-  'pasuspender',
-]
+if bashcompletiondir != 'no'
+  aliases = [
+    'pacat',
+    'pacmd',
+    'pactl',
+    'padsp',
+    'paplay',
+    'parec',
+    'parecord',
+    'pasuspender',
+  ]
 
-install_data('pulseaudio', install_dir : bashcompletiondir)
+  install_data('pulseaudio', install_dir : bashcompletiondir)
 
-foreach alias : aliases
-  dst = join_paths(bashcompletiondir, alias)
-  cmd = 'ln -fs @0@ $DESTDIR at 1@'.format('pulseaudio', dst)
-  meson.add_install_script('sh', '-c', cmd)
-endforeach
+  foreach alias : aliases
+    dst = join_paths(bashcompletiondir, alias)
+    cmd = 'ln -fs @0@ $DESTDIR at 1@'.format('pulseaudio', dst)
+    meson.add_install_script('sh', '-c', cmd)
+  endforeach
+endif


=====================================
shell-completion/zsh/meson.build
=====================================
@@ -1 +1,3 @@
-install_data('_pulseaudio', install_dir : zshcompletiondir)
+if zshcompletiondir != 'no'
+  install_data('_pulseaudio', install_dir : zshcompletiondir)
+endif



View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/commit/7670dffe596170eedb083526857abf21484ff8ad

-- 
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/commit/7670dffe596170eedb083526857abf21484ff8ad
You're receiving this email because of your account on gitlab.freedesktop.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20191107/e391e707/attachment-0001.html>


More information about the pulseaudio-commits mailing list