Blame SOURCES/0001-Generate-manpage.patch

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