Blob Blame History Raw
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/4] 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
@@ -5,11 +5,11 @@ project('sscg', 'c',
           'c_std=gnu99',
           'warning_level=1',
           'b_asneeded=true',
         ],
         license : 'MIT',
-        meson_version : '>=0.36.0')
+        meson_version : '>=0.40.0')
 
 cc = meson.get_compiler('c')
 test_cflags = [
   '-Wpointer-arith',
   '-Wmissing-declarations',
@@ -139,5 +139,25 @@ cdata.set('version', meson.project_version())
 configure_file(
     input : 'config.h.in',
     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.19.1