1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
|
# Copyright 2022 Collabora Ltd.
# SPDX-License-Identifier: LGPL-2.1-or-later
if build_gtk_doc
subdir('reference')
endif
xsltproc_flags = [
'--nonet',
'--stringparam', 'man.output.quietly', '1',
'--stringparam', 'funcsynopsis.style', 'ansi',
'--stringparam', 'man.th.extra1.suppress', '1',
'--stringparam', 'man.authors.section.enabled', '0',
'--stringparam', 'man.copyright.section.enabled', '0',
]
man1 = [
'flatpak',
'flatpak-remotes',
'flatpak-remote-add',
'flatpak-remote-delete',
'flatpak-remote-modify',
'flatpak-remote-ls',
'flatpak-remote-info',
'flatpak-install',
'flatpak-config',
'flatpak-update',
'flatpak-uninstall',
'flatpak-mask',
'flatpak-pin',
'flatpak-list',
'flatpak-info',
'flatpak-make-current',
'flatpak-run',
'flatpak-override',
'flatpak-enter',
'flatpak-ps',
'flatpak-document-export',
'flatpak-document-unexport',
'flatpak-document-info',
'flatpak-documents',
'flatpak-permission-remove',
'flatpak-permissions',
'flatpak-permission-show',
'flatpak-permission-reset',
'flatpak-permission-set',
'flatpak-build-init',
'flatpak-build',
'flatpak-build-bundle',
'flatpak-build-import-bundle',
'flatpak-build-finish',
'flatpak-build-export',
'flatpak-build-update-repo',
'flatpak-build-sign',
'flatpak-build-commit-from',
'flatpak-repo',
'flatpak-search',
'flatpak-create-usb',
'flatpak-repair',
'flatpak-kill',
'flatpak-history',
'flatpak-spawn',
]
man5 = [
'flatpak-metadata',
'flatpakrepo',
'flatpakref',
'flatpak-remote',
'flatpak-installation',
]
man_compat_symlinks = [
['flatpak-flatpakrepo', 'flatpakrepo', '5'],
['flatpak-flatpakref', 'flatpakref', '5'],
]
xml_files = []
foreach pair : [[man1, '1'], [man5, '5']]
pages = pair[0]
section = pair[1]
foreach man : pages
xml_files += [man + '.xml']
if build_man_pages
custom_target(
man + '.' + section,
input : [man + '.xml'],
output : [man + '.' + section],
command : [
xsltproc,
'-o', '@OUTPUT@',
] + xsltproc_flags + [
manpages_xsl,
'@INPUT@',
],
build_by_default : true,
install : true,
install_dir : get_option('mandir') / ('man' + section),
)
endif
endforeach
endforeach
foreach entry : man_compat_symlinks
name = entry[0]
target = entry[1]
section = entry[2]
if build_man_pages
#TODO: replace with install_symlink() when we can depend on meson 0.61
meson.add_install_script(
'sh', '-c', 'ln -sf @0@ $MESON_INSTALL_DESTDIR_PREFIX/@1@/@2@'.format(
target + '.' + section,
get_option('mandir') / ('man' + section),
name + '.' + section
)
)
endif
endforeach
if xmlto.found()
cdata = configuration_data()
cdata.set('VERSION', meson.project_version())
cdata.set('srcdir', meson.current_source_dir())
flatpak_docs_xml = configure_file(
input : 'flatpak-docs.xml.in',
output : 'flatpak-docs.xml',
configuration : cdata,
)
custom_target(
'flatpak-docs.html',
input : [
flatpak_docs_xml,
'xmlto-config.xsl',
],
output : ['flatpak-docs.html'],
depend_files : xml_files,
command : [
xmlto,
'-o', meson.current_build_dir(),
] + get_option('xmlto_flags') + [
'--skip-validation',
'xhtml-nochunks',
'-m', '@INPUT1@',
'@INPUT0@',
],
build_by_default : true,
install : true,
install_dir : docdir,
)
install_data('docbook.css', install_dir : docdir)
endif
|