From 2d2b0c221f04d6e1cd603fd3644331f571ca1e4c Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Mon, 17 Sep 2018 10:31:10 -0400 Subject: [PATCH] Add a manpage Signed-off-by: Stephen Gallagher --- 0001-Generate-manpage.patch | 56 +++++++++++++++++++++++++++++++++++++ sscg.spec | 11 +++++++- 2 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 0001-Generate-manpage.patch diff --git a/0001-Generate-manpage.patch b/0001-Generate-manpage.patch new file mode 100644 index 0000000..9554f17 --- /dev/null +++ b/0001-Generate-manpage.patch @@ -0,0 +1,56 @@ +From df9da4099d1f50f014ee46a19b77f20a1551d260 Mon Sep 17 00:00:00 2001 +From: Stephen Gallagher +Date: Mon, 17 Sep 2018 09:58:25 -0400 +Subject: [PATCH] Generate manpage + +Signed-off-by: Stephen Gallagher +--- + meson.build | 22 +++++++++++++++++++++- + 1 file changed, 21 insertions(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 4763caec12a2ad96726d1de78d29233ec7b4d8f5..8a2daa60f722605746dd2c37901e05ad78a88710 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', +@@ -149,5 +149,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.0 + diff --git a/sscg.spec b/sscg.spec index e8d218d..9320a13 100644 --- a/sscg.spec +++ b/sscg.spec @@ -9,7 +9,7 @@ Name: sscg Version: 2.3.3 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Simple SSL certificate generator License: BSD @@ -23,6 +23,11 @@ BuildRequires: popt-devel BuildRequires: libpath_utils-devel BuildRequires: meson BuildRequires: ninja-build +BuildRequires: help2man + +# Patches +Patch0001: 0001-Generate-manpage.patch + %description A utility to aid in the creation of more secure "self-signed" @@ -53,8 +58,12 @@ false signatures from the service certificate. %license COPYING %doc README.md %{_bindir}/%{name} +%{_mandir}/man8/%{name}.8* %changelog +* Mon Sep 17 2018 Stephen Gallagher - 2.3.3-4 +- Add a manpage. + * Sat Jul 14 2018 Fedora Release Engineering - 2.3.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild