]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
meson: Add manpages 4124/head
authorStéphane Graber <stgraber@ubuntu.com>
Sat, 28 May 2022 01:40:30 +0000 (21:40 -0400)
committerStéphane Graber <stgraber@ubuntu.com>
Sat, 28 May 2022 02:02:38 +0000 (22:02 -0400)
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
doc/ja/meson.build [new file with mode: 0644]
doc/ko/meson.build [new file with mode: 0644]
doc/meson.build [new file with mode: 0644]
meson.build

diff --git a/doc/ja/meson.build b/doc/ja/meson.build
new file mode 100644 (file)
index 0000000..0992606
--- /dev/null
@@ -0,0 +1,81 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+if want_mans == true
+    PAGES = [
+        ['lxc', '7'],
+        ['lxc.conf', '5'],
+        ['lxc.container.conf', '5'],
+        ['lxc.system.conf', '5'],
+        ['lxc-update-config', '1'],
+        ['lxc-usernet', '5'],
+        ['lxc-user-nic', '1'],
+        ['lxc-usernsexec', '1'],
+    ]
+
+    if want_tools == true
+        PAGES += [
+            ['lxc-attach', '1'],
+            ['lxc-autostart', '1'],
+            ['lxc-cgroup', '1'],
+            ['lxc-checkconfig', '1'],
+            ['lxc-checkpoint', '1'],
+            ['lxc-config', '1'],
+            ['lxc-console', '1'],
+            ['lxc-copy', '1'],
+            ['lxc-create', '1'],
+            ['lxc-destroy', '1'],
+            ['lxc-device', '1'],
+            ['lxc-execute', '1'],
+            ['lxc-freeze', '1'],
+            ['lxc-info', '1'],
+            ['lxc-ls', '1'],
+            ['lxc-monitor', '1'],
+            ['lxc-snapshot', '1'],
+            ['lxc-start', '1'],
+            ['lxc-stop', '1'],
+            ['lxc-top', '1'],
+            ['lxc-unfreeze', '1'],
+            ['lxc-unshare', '1'],
+            ['lxc-wait', '1'],
+        ]
+    endif
+
+    if want_pam_cgroup == true
+        PAGES += [
+            ['pam_cgfs', '8'],
+        ]
+    endif
+
+    # Common files.
+    configure_file(
+        configuration: conf,
+        input: 'common_options.sgml.in',
+        output: 'common_options.sgml')
+
+    configure_file(
+        configuration: conf,
+        input: 'see_also.sgml.in',
+        output: 'see_also.sgml')
+
+    # Config
+    docconf = configuration_data()
+    docconf.set('docdtd', '"-//OASIS//DTD DocBook XML" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"')
+    docconf.set('builddir', '.')
+    docconf.set('LXC_GENERATE_DATE', generate_date)
+    docconf.set_quoted('PACKAGE_VERSION', meson.project_version())
+
+    # Initial templating.
+    foreach page : PAGES
+        sgml = configure_file(
+            configuration: docconf,
+            input: page[0] + '.sgml.in',
+            output: page[0] + '.sgml')
+
+        configure_file(
+            input: sgml,
+            output: page[0] + '.' + page[1],
+            command: ['docbook2x-man', '--encoding=UTF-8', page[0] + '.sgml'],
+            install: true,
+            install_dir: join_paths(mandir, 'ja', 'man' + page[1]))
+    endforeach
+endif
diff --git a/doc/ko/meson.build b/doc/ko/meson.build
new file mode 100644 (file)
index 0000000..b6a43c5
--- /dev/null
@@ -0,0 +1,74 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+if want_mans == true
+    PAGES = [
+        ['lxc', '7'],
+        ['lxc.conf', '5'],
+        ['lxc.container.conf', '5'],
+        ['lxc.system.conf', '5'],
+        ['lxc-usernet', '5'],
+        ['lxc-user-nic', '1'],
+        ['lxc-usernsexec', '1'],
+    ]
+
+    if want_tools == true
+        PAGES += [
+            ['lxc-attach', '1'],
+            ['lxc-autostart', '1'],
+            ['lxc-cgroup', '1'],
+            ['lxc-checkconfig', '1'],
+            ['lxc-checkpoint', '1'],
+            ['lxc-config', '1'],
+            ['lxc-console', '1'],
+            ['lxc-copy', '1'],
+            ['lxc-create', '1'],
+            ['lxc-destroy', '1'],
+            ['lxc-device', '1'],
+            ['lxc-execute', '1'],
+            ['lxc-freeze', '1'],
+            ['lxc-info', '1'],
+            ['lxc-ls', '1'],
+            ['lxc-monitor', '1'],
+            ['lxc-snapshot', '1'],
+            ['lxc-start', '1'],
+            ['lxc-stop', '1'],
+            ['lxc-top', '1'],
+            ['lxc-unfreeze', '1'],
+            ['lxc-unshare', '1'],
+            ['lxc-wait', '1'],
+        ]
+    endif
+
+    # Common files.
+    configure_file(
+        configuration: conf,
+        input: 'common_options.sgml.in',
+        output: 'common_options.sgml')
+
+    configure_file(
+        configuration: conf,
+        input: 'see_also.sgml.in',
+        output: 'see_also.sgml')
+
+    # Config
+    docconf = configuration_data()
+    docconf.set('docdtd', '"-//OASIS//DTD DocBook XML" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"')
+    docconf.set('builddir', '.')
+    docconf.set('LXC_GENERATE_DATE', generate_date)
+    docconf.set_quoted('PACKAGE_VERSION', meson.project_version())
+
+    # Initial templating.
+    foreach page : PAGES
+        sgml = configure_file(
+            configuration: docconf,
+            input: page[0] + '.sgml.in',
+            output: page[0] + '.sgml')
+
+        configure_file(
+            input: sgml,
+            output: page[0] + '.' + page[1],
+            command: ['docbook2x-man', '--encoding=UTF-8', page[0] + '.sgml'],
+            install: true,
+            install_dir: join_paths(mandir, 'ko', 'man' + page[1]))
+    endforeach
+endif
diff --git a/doc/meson.build b/doc/meson.build
new file mode 100644 (file)
index 0000000..9a12140
--- /dev/null
@@ -0,0 +1,81 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+if want_mans == true
+    PAGES = [
+        ['lxc', '7'],
+        ['lxc.conf', '5'],
+        ['lxc.container.conf', '5'],
+        ['lxc.system.conf', '5'],
+        ['lxc-update-config', '1'],
+        ['lxc-usernet', '5'],
+        ['lxc-user-nic', '1'],
+        ['lxc-usernsexec', '1'],
+    ]
+
+    if want_tools == true
+        PAGES += [
+            ['lxc-attach', '1'],
+            ['lxc-autostart', '1'],
+            ['lxc-cgroup', '1'],
+            ['lxc-checkconfig', '1'],
+            ['lxc-checkpoint', '1'],
+            ['lxc-config', '1'],
+            ['lxc-console', '1'],
+            ['lxc-copy', '1'],
+            ['lxc-create', '1'],
+            ['lxc-destroy', '1'],
+            ['lxc-device', '1'],
+            ['lxc-execute', '1'],
+            ['lxc-freeze', '1'],
+            ['lxc-info', '1'],
+            ['lxc-ls', '1'],
+            ['lxc-monitor', '1'],
+            ['lxc-snapshot', '1'],
+            ['lxc-start', '1'],
+            ['lxc-stop', '1'],
+            ['lxc-top', '1'],
+            ['lxc-unfreeze', '1'],
+            ['lxc-unshare', '1'],
+            ['lxc-wait', '1'],
+        ]
+    endif
+
+    if want_pam_cgroup == true
+        PAGES += [
+            ['pam_cgfs', '8'],
+        ]
+    endif
+
+    # Common files.
+    configure_file(
+        configuration: conf,
+        input: 'common_options.sgml.in',
+        output: 'common_options.sgml')
+
+    configure_file(
+        configuration: conf,
+        input: 'see_also.sgml.in',
+        output: 'see_also.sgml')
+
+    # Config
+    docconf = configuration_data()
+    docconf.set('docdtd', '"-//OASIS//DTD DocBook XML" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"')
+    docconf.set('builddir', '.')
+    docconf.set('LXC_GENERATE_DATE', generate_date)
+    docconf.set_quoted('PACKAGE_VERSION', meson.project_version())
+
+    # Initial templating.
+    foreach page : PAGES
+        sgml = configure_file(
+            configuration: docconf,
+            input: page[0] + '.sgml.in',
+            output: page[0] + '.sgml')
+
+        configure_file(
+            input: sgml,
+            output: page[0] + '.' + page[1],
+            command: ['docbook2x-man', '--encoding=UTF-8', page[0] + '.sgml'],
+            install: true,
+            install_dir: join_paths(mandir, 'man' + page[1]))
+    endforeach
+endif
index ae395951549a4cf7618578607f5ec5272a38fbfa..1f229c22daefe533bf7edd076f498cc5f565b623 100644 (file)
@@ -60,6 +60,7 @@ 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'))
+mandir = join_paths(prefixdir, get_option('mandir'))
 docdir = join_paths(datadir, get_option('doc-path'))
 includedir = join_paths(prefixdir, get_option('includedir'))
 libdir = join_paths(prefixdir, get_option('libdir'))
@@ -207,6 +208,7 @@ else
     # Fallback to current epoch
     time_epoch = run_command(date, '+%s', check: true).stdout()
 endif
+generate_date = run_command(date, '--utc', '--date=@' + time_epoch, '+%Y-%m-%d', check: true).stdout().strip()
 time_epoch = time_epoch.to_int()
 conf.set('TIME_EPOCH', time_epoch)
 
@@ -609,6 +611,9 @@ subdir('config/selinux')
 subdir('config/templates')
 subdir('config/templates/common.conf.d')
 subdir('config/yum')
+subdir('doc')
+subdir('doc/ja')
+subdir('doc/ko')
 subdir('doc/examples')
 subdir('doc/rootfs')
 subdir('hooks')