parent
b2ce02949d
commit
27d3cf5490
@ -0,0 +1,85 @@
|
||||
commit 112f0b9ca720b8f0da4d4a39153c16f55e3294e1
|
||||
Author: Morten Linderud <morten@linderud.pw>
|
||||
Date: Sat Mar 12 15:53:51 2022
|
||||
|
||||
meson: Include documentation
|
||||
|
||||
Documentation was removed from the build system with the migration to
|
||||
meson. This implements the help2man generation which existed in the
|
||||
autoconf setup.
|
||||
|
||||
Signed-off-by: Morten Linderud <morten@linderud.pw>
|
||||
|
||||
diff --git a/meson.build b/meson.build
|
||||
index 517dbf6..72c5a73 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -52,6 +52,7 @@ datadir = join_paths(prefixdir, get_option('datadir'))
|
||||
|
||||
lxcfssharedir = join_paths(datadir, 'lxcfs')
|
||||
lxcconfdir = join_paths(datadir, 'lxc/config/common.conf.d')
|
||||
+lxcmandir = join_paths(datadir, 'man')
|
||||
|
||||
conf.set_quoted('BINDIR', bindir)
|
||||
conf.set_quoted('LIBDIR', libdir)
|
||||
@@ -68,6 +69,7 @@ conf.set_quoted('LXCFSTARGETDIR', join_paths(localstatedir, 'lib/lxcfs'))
|
||||
# Custom configuration.
|
||||
init_script = get_option('init-script')
|
||||
want_tests = get_option('tests')
|
||||
+want_docs= get_option('docs')
|
||||
|
||||
|
||||
# Build flags.
|
||||
@@ -167,8 +169,7 @@ add_project_arguments('-include', 'config.h', language: 'c')
|
||||
|
||||
# Binary.
|
||||
lxcfs_sources = files('src/lxcfs.c')
|
||||
-public_programs = []
|
||||
-public_programs += executable(
|
||||
+lxcfs = executable(
|
||||
'lxcfs',
|
||||
lxcfs_sources,
|
||||
dependencies: [
|
||||
@@ -251,6 +252,24 @@ lxcfs_spec = custom_target(
|
||||
'@OUTPUT@',
|
||||
])
|
||||
|
||||
+# Man pages
|
||||
+if want_docs == true
|
||||
+ help2man = find_program('help2man')
|
||||
+ help2man_opts = [
|
||||
+ '--name="System virtualization filesystem for containers"',
|
||||
+ '--no-discard-stderr',
|
||||
+ '--section=1',
|
||||
+ '--opt-include=docs/lxcfs.man.add',
|
||||
+ '--no-info',
|
||||
+ ]
|
||||
+ custom_target('lxcfs.1',
|
||||
+ output: 'lxcfs.1',
|
||||
+ command: [help2man, help2man_opts, '--output=@OUTPUT@', lxcfs],
|
||||
+ install: true,
|
||||
+ install_dir: join_paths(lxcmandir, 'man1'))
|
||||
+endif
|
||||
+
|
||||
+
|
||||
# Include sub-directories.
|
||||
subdir('config/init')
|
||||
subdir('share')
|
||||
@@ -275,5 +294,6 @@ status = [
|
||||
'lxcfs source root directory: @0@'.format(project_source_root),
|
||||
'init system: @0@'.format(init_script),
|
||||
'tests: @0@'.format(want_tests),
|
||||
+ 'documentation: @0@'.format(want_docs),
|
||||
]
|
||||
message('\n '.join(status))
|
||||
diff --git a/meson_options.txt b/meson_options.txt
|
||||
index 8529aef..6718c45 100644
|
||||
--- a/meson_options.txt
|
||||
+++ b/meson_options.txt
|
||||
@@ -12,3 +12,6 @@ option('with-init-script', type : 'string', value : 'systemd',
|
||||
option('init-script', type : 'combo',
|
||||
choices : ['systemd', 'sysvinit', 'openrc', 'upstart'], value : 'systemd',
|
||||
description : 'init script')
|
||||
+
|
||||
+option('docs', type : 'boolean', value: 'true',
|
||||
+ description : 'build documentation')
|
@ -0,0 +1,22 @@
|
||||
diff --git a/config/init/meson.build b/config/init/meson.build
|
||||
index 5061973..e39c2ab 100644
|
||||
--- a/config/init/meson.build
|
||||
+++ b/config/init/meson.build
|
||||
@@ -1,6 +1,8 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
if init_script == 'systemd'
|
||||
+ systemd = dependency('systemd')
|
||||
+ systemd_system_unit_dir = systemd.get_pkgconfig_variable('systemdsystemunitdir')
|
||||
systemd_service = custom_target(
|
||||
'lxcfs.service',
|
||||
input: 'systemd/lxcfs.service.in',
|
||||
@@ -12,7 +14,7 @@ if init_script == 'systemd'
|
||||
'@OUTPUT@',
|
||||
],
|
||||
install: true,
|
||||
- install_dir: '/lib/systemd/system')
|
||||
+ install_dir: systemd_system_unit_dir)
|
||||
|
||||
elif init_script == 'upstart'
|
||||
install_data('upstart/lxcfs.conf', install_dir: join_paths(sysconfdir, 'init'))
|
@ -1 +1 @@
|
||||
SHA512 (lxcfs-4.0.12.tar.gz) = da8415599bb08e4e15a7e4044edbcad217e4034d96366d508e06cceb2a75d459e24aeb7efd5716e2f41449ec653ecd9916f0d934f738e1df8e9576738cc1ac18
|
||||
SHA512 (lxcfs-5.0.0.tar.gz) = f6ab0feea862812dde08dd828cb7843820a27f56ec88ef1bf264e3fe585037b9327849e4a31c629f2712c861cdc80d59ea15c190d875d48b2d446fe15d9e57b8
|
||||
|
Loading…
Reference in new issue