Add manpages for eg25-manager and it's config file

This commit is contained in:
ArenM
2021-12-28 22:32:53 -05:00
parent 75400fb9c0
commit a3c51fc513
3 changed files with 171 additions and 0 deletions

View File

@@ -22,3 +22,31 @@ configure_file(
configuration: serviceconf,
install: true
)
scdoc = dependency('scdoc', native: true, required: false)
if scdoc.found()
scdoc_prog = find_program(scdoc.get_pkgconfig_variable('scdoc'), native: true)
foreach section: [5, 8]
name = 'eg25-manager'
out = '@0@.@1@'.format(name, section)
preprocessed = configure_file(
input: '@0@.scd'.format(out),
output: '@BASENAME@.preprocessed',
configuration: {
'eg25_confdir': eg25_confdir,
'eg25_datadir': eg25_datadir,
}
)
custom_target(
out,
output: out,
input: preprocessed,
command: ['sh', '-c', '@0@ < @INPUT@'.format(scdoc_prog.path())],
capture: true,
install: true,
install_dir: join_paths(get_option('mandir'), 'man@0@'.format(section)))
endforeach
endif