sscg/SOURCES/0001-Generate-manpage.patch

51 lines
1.3 KiB
Diff

From 71e2451c6ba4d5f17de9e24687b66b93f2e58954 Mon Sep 17 00:00:00 2001
From: Stephen Gallagher <sgallagh@redhat.com>
Date: Mon, 17 Sep 2018 09:58:25 -0400
Subject: [PATCH 1/6] Generate manpage
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
---
meson.build | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index e6f33475cce6891d17656bcd10e1afabd43bdc07..a2ca4ba1472bfff61fbbd30ba1ddc7ecc89e723c 100644
--- a/meson.build
+++ b/meson.build
@@ -7,7 +7,7 @@ project('sscg', 'c',
'b_asneeded=true',
],
license : 'MIT',
- meson_version : '>=0.36.0')
+ meson_version : '>=0.40.0')
cc = meson.get_compiler('c')
test_cflags = [
@@ -141,3 +141,23 @@ configure_file(
output : 'config.h',
configuration : cdata)
+# Generate a manpage from the POPT documentation
+help2man = find_program('help2man')
+
+manpage = custom_target('manpage',
+ output : 'sscg.8',
+ capture : true,
+ command : [
+ help2man,
+ '-s', '8',
+ '-n', 'Tool for generating x.509 certificates',
+ '-N',
+ sscg,
+ ],
+ install : true,
+ build_by_default : true,
+ install_dir : join_paths(
+ get_option('prefix'),
+ get_option('mandir'),
+ 'man8'),
+)
--
2.23.0