aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorKenny Levinsen <kl@kl.wtf>2020-08-08 14:54:25 +0200
committerKenny Levinsen <kl@kl.wtf>2020-08-08 14:54:25 +0200
commitb312fbfb5ec60524ae74332d5f17cb74fa43fa39 (patch)
tree41e9dc05aa7897e12e400626edba50ccec5055c7 /meson.build
parent48e712ffd9f5982ee03eb3e16c8951a377565c51 (diff)
man: Add simple seatd(1) page
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build26
1 files changed, 26 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index e4785d9..48bb88d 100644
--- a/meson.build
+++ b/meson.build
@@ -180,6 +180,32 @@ test(
)
)
+scdoc = dependency('scdoc', required: get_option('man-pages'), version: '>= 1.9.7')
+
+if scdoc.found()
+ sh = find_program('sh')
+
+ man_pages = ['seatd.1.scd']
+
+ mandir = get_option('mandir')
+
+ foreach src : man_pages
+ topic = src.split('.')[0]
+ section = src.split('.')[1]
+ output = '@0@.@1@'.format(topic, section)
+
+ custom_target(
+ output,
+ input: 'man/' + src,
+ output: output,
+ command: [
+ sh, '-c', '@0@ < @INPUT@ > @1@'.format(scdoc.get_pkgconfig_variable('scdoc'), output)
+ ],
+ install: true,
+ install_dir: '@0@/man@1@'.format(mandir, section)
+ )
+ endforeach
+endif
summary({
'seatd': get_option('seatd').enabled() ? 1 : 0,