From: Stéphane Graber Date: Sat, 28 May 2022 01:40:30 +0000 (-0400) Subject: meson: Add manpages X-Git-Tag: lxc-5.0.0~14^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47c56c50a85e845f5d04a8bd5792e2e88714c5a2;p=thirdparty%2Flxc.git meson: Add manpages Signed-off-by: Stéphane Graber --- diff --git a/doc/ja/meson.build b/doc/ja/meson.build new file mode 100644 index 000000000..0992606b2 --- /dev/null +++ b/doc/ja/meson.build @@ -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 index 000000000..b6a43c57f --- /dev/null +++ b/doc/ko/meson.build @@ -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 index 000000000..9a12140ee --- /dev/null +++ b/doc/meson.build @@ -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 diff --git a/meson.build b/meson.build index ae3959515..1f229c22d 100644 --- a/meson.build +++ b/meson.build @@ -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')