apk-tools/doc/meson.build
Elly Fong-Jones 5f84463a34 doc: describe apk2 and apk3 file formats
This change adds two manpages: apk-v2(5) and apk-v3(5). These pages
describe the v2 and v3 file formats respectively, as I currently
understand them.
2023-03-03 11:03:39 +00:00

51 lines
1.3 KiB
Meson

man_files = files(
'apk.8.scd',
'apk-add.8.scd',
'apk-audit.8.scd',
'apk-cache.5.scd',
'apk-cache.8.scd',
'apk-del.8.scd',
'apk-dot.8.scd',
'apk-fetch.8.scd',
'apk-fix.8.scd',
'apk-index.8.scd',
'apk-info.8.scd',
'apk-keys.5.scd',
'apk-list.8.scd',
'apk-manifest.8.scd',
'apk-policy.8.scd',
'apk-repositories.5.scd',
'apk-search.8.scd',
'apk-stats.8.scd',
'apk-update.8.scd',
'apk-upgrade.8.scd',
'apk-v2.5.scd',
'apk-v3.5.scd',
'apk-verify.8.scd',
'apk-version.8.scd',
'apk-world.5.scd',
)
if scdoc_dep.found()
scdoc_prog = find_program(scdoc_dep.get_pkgconfig_variable('scdoc'), native: true)
sh = find_program('sh', native: true)
mandir = get_option('mandir')
foreach filename : man_files
topic = '@0@'.format(filename).split('.')[-3].split('/')[-1]
section = '@0@'.format(filename).split('.')[-2]
output = '@0@.@1@'.format(topic, section)
custom_target(
output,
input: filename,
capture: true,
output: output,
command: [
sh, '-c', '@0@ < @INPUT@'.format(scdoc_prog.path())
],
install: true,
install_dir: '@0@/man@1@'.format(mandir, section)
)
endforeach
endif