mirror of
https://git.proxmox.com/git/fwupd
synced 2025-05-15 10:28:30 +00:00

Since bash-completion 2.9, it was no longer possible to override
the completionsdir through prefix. [1] In 2.10, the overridability
was re-estabilished but this time through datadir variable. [2]
This should not really matter except for developers installing the project
into a custom prefix or distros using per-package prefixes like NixOS.
[1]: 81ba2c7e7d
[2]: https://github.com/scop/bash-completion/pull/344
34 lines
863 B
Meson
34 lines
863 B
Meson
if bashcomp.found()
|
|
completions_dir = bashcomp.get_pkgconfig_variable('completionsdir',
|
|
define_variable: bashcomp.version().version_compare('>= 2.10') ? ['datadir', datadir] : ['prefix', prefix],
|
|
)
|
|
|
|
|
|
if get_option('agent')
|
|
install_data(['fwupdagent'],
|
|
install_dir : completions_dir,
|
|
)
|
|
endif # get_option('agent')
|
|
|
|
# replace @libexecdir@
|
|
fwupdtool_path = join_paths(libexecdir, 'fwupd')
|
|
con2 = configuration_data()
|
|
con2.set('libexecdir', fwupdtool_path)
|
|
configure_file(
|
|
input : 'fwupdtool.in',
|
|
output : 'fwupdtool',
|
|
configuration : con2,
|
|
install: true,
|
|
install_dir: completions_dir)
|
|
|
|
if build_daemon and get_option('agent')
|
|
configure_file(
|
|
input : 'fwupdmgr.in',
|
|
output : 'fwupdmgr',
|
|
configuration : con2,
|
|
install: true,
|
|
install_dir: completions_dir)
|
|
endif # build_daemon and get_option('agent')
|
|
|
|
endif # bashcomp.found()
|