]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
meson: Rework options
authorStéphane Graber <stgraber@ubuntu.com>
Fri, 6 May 2022 20:25:42 +0000 (22:25 +0200)
committerStéphane Graber <stgraber@ubuntu.com>
Sat, 7 May 2022 16:47:11 +0000 (18:47 +0200)
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
meson.build
meson_options.txt

index 2a549f3ba4e74bb65aa084d56de3b460f6cdf462..6e52289d83bb46431c79e7c6aa1322f0d397f66f 100644 (file)
@@ -48,19 +48,19 @@ project_build_root = meson.current_build_dir()
 # Path handling.
 prefixdir = get_option('prefix')
 
-apparmorcachedir = get_option('apparmor-cache-dir')
-globalconfig = get_option('global-config')
+apparmorcachedir = get_option('apparmor-cache-path')
+globalconfig = get_option('global-config-path')
 localstatedir = join_paths('/', get_option('localstatedir'))
 logpath = get_option('log-path')
-lxcpathprefix = get_option('config-path')
-rootfsmount = get_option('rootfs-mount-dir')
-user_network_db_opt = get_option('user-network-db')
-user_network_conf_opt = get_option('user-network-conf')
+lxcpathprefix = get_option('data-path')
+rootfsmount = get_option('rootfs-mount-path')
+user_network_db_opt = get_option('usernet-db-path')
+user_network_conf_opt = get_option('usernet-config-path')
 
 bashcompletiondir = join_paths('/', 'usr', 'share', 'bash-completion', 'completions')
 bindir = join_paths(prefixdir, get_option('bindir'))
 datadir = join_paths(prefixdir, get_option('datadir'))
-docdir = join_paths(prefixdir, get_option('docdir'))
+docdir = join_paths(datadir, get_option('doc-path'))
 includedir = join_paths(prefixdir, get_option('includedir'))
 libdir = join_paths(prefixdir, get_option('libdir'))
 libexecdir = join_paths(prefixdir, get_option('libexecdir'))
@@ -68,18 +68,19 @@ runtimepath = join_paths(prefixdir, get_option('runtime-path'))
 sbindir = join_paths(prefixdir, get_option('sbindir'))
 sysconfdir = join_paths(prefixdir, get_option('sysconfdir'))
 
+lxcapparmorcachedir = join_paths(localstatedir, apparmorcachedir)
 lxcdefaultconfig = join_paths(sysconfdir, 'lxc/default.conf')
+lxcexamplesdir = join_paths(docdir, 'examples')
 lxcglobalconfig = join_paths(sysconfdir, globalconfig)
-lxcapparmorcachedir = join_paths(localstatedir, apparmorcachedir)
-lxcrootfsmount = join_paths(prefixdir, rootfsmount)
+lxchookbindir = join_paths(libexecdir, 'lxc/hooks')
+lxchookdir = join_paths(datadir, 'lxc/hooks')
 lxcinclude = join_paths(includedir, 'lxc')
 lxclibexec = join_paths(libexecdir, 'lxc')
 lxclogpath = join_paths(localstatedir, logpath)
 lxcpath = join_paths(localstatedir, lxcpathprefix)
+lxcrootfsmount = join_paths(libdir, rootfsmount)
 lxctemplateconfig = join_paths(datadir, 'lxc/config')
 lxctemplatedir = join_paths(datadir, 'lxc/templates')
-lxchookdir = join_paths(datadir, 'lxc/hooks')
-lxchookbindir = join_paths(libexecdir, 'lxc/hooks')
 lxc_user_network_conf = join_paths(sysconfdir, user_network_conf_opt)
 lxc_user_network_db = join_paths(runtimepath, user_network_db_opt)
 
@@ -111,6 +112,8 @@ conf.set_quoted('LXC_USERNIC_DB', lxc_user_network_db)
 # Custom configuration.
 cgrouppattern = get_option('cgroup-pattern')
 wants_io_uring = get_option('io-uring-event-loop')
+want_examples = get_option('examples')
+want_mans = get_option('man')
 want_tests = get_option('tests')
 
 conf.set_quoted('DEFAULT_CGROUP_PATTERN', cgrouppattern)
index ee68938223e3f8852427b1b6efc0b7dec70efc27..6114cf1b20101f874169ba64be50bfebceaa8670 100644 (file)
@@ -1,41 +1,49 @@
 # -*- mode: meson -*-
 
-option('tests', type : 'boolean', value: 'false',
-       description : 'enable tests')
+# Main options
+option('cgroup-pattern', type: 'string', value: '',
+       description: 'CGroup pattern')
 
-option('runtime-path', type : 'string', value : '/run',
-       description : 'the runtime directory')
+option('examples', type: 'boolean', value: 'true',
+       description: 'build and install examples')
 
-option('init-script', type : 'combo',
-       choices : ['systemd', 'sysvinit', 'openrc', 'upstart'], value : 'systemd',
-       description : 'init script')
+option('init-script', type: 'combo',
+       choices: ['systemd', 'sysvinit', 'openrc', 'upstart'], value: 'systemd',
+       description: 'init script')
 
-option('apparmor-cache-dir', type : 'string', value : 'cache/lxc/apparmor',
-       description : 'the AppArmor cache directory')
+option('io-uring-event-loop', type: 'boolean', value: 'false',
+       description: 'Enable io-uring based event loop')
 
-option('rootfs-mount-dir', type : 'string', value : 'lib/x86_64-linux-gnu/lxc/rootfs',
-       description : 'the rootfs mount directory')
+option('man', type: 'boolean', value: 'true',
+       description: 'build and install manpages')
 
-option('cgroup-pattern', type : 'string', value : '',
-       description : 'the rootfs mount directory')
+option('tests', type: 'boolean', value: 'false',
+       description: 'build and install tests')
 
-option('log-path', type : 'string', value : 'log/lxc',
-       description : 'the rootfs mount directory')
+# Paths
+option('apparmor-cache-path', type: 'string', value: 'cache/lxc/apparmor',
+       description: 'AppArmor cache directory')
 
-option('config-path', type : 'string', value : 'lib/lxc',
-       description : 'the rootfs mount directory')
+option('data-path', type: 'string', value: 'lib/lxc',
+       description: 'Container storage directory')
 
-option('global-config', type : 'string', value : 'lxc/lxc.conf',
-       description : 'the rootfs mount directory')
+option('doc-path', type: 'string', value: 'doc/lxc',
+       description: 'Documentation directory')
 
-option('docdir', type : 'string',
-       description : 'documentation directory')
+option('global-config-path', type: 'string', value: 'lxc/lxc.conf',
+       description: 'Global configuration file path')
 
-option('user-network-conf', type : 'string', value : 'lxc/lxc-usernet',
-       description : 'user network interface configuration file')
+option('log-path', type: 'string', value: 'log/lxc',
+       description: 'Loging directory')
 
-option('user-network-db', type : 'string', value : 'lxc/nics',
-       description : 'user network database')
+option('rootfs-mount-path', type: 'string', value: 'lxc/rootfs',
+       description: 'Container rootfs mount directory')
 
-option('io-uring-event-loop', type : 'boolean', value: 'false',
-       description : 'enable io-uring based event loop')
+option('runtime-path', type: 'string', value: '/run',
+       description: 'Main runtime directory')
+
+option('usernet-config-path', type: 'string', value: 'lxc/lxc-usernet',
+       description: 'User network configuration file path')
+
+option('usernet-db-path', type: 'string', value: 'lxc/nics',
+       description: 'User network database file path')