[seahorse/wip/nielsdg/manpage-xsltproc] Update manpage and generate from XML file



commit 09d3c4ffc23658c61c923d43014dcbc7a38d6bd8
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Sun Mar 17 15:41:52 2019 +0100

    Update manpage and generate from XML file

 data/meson.build  |  23 ++++++++++++
 data/seahorse.xml | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 meson.build       |   1 +
 meson_options.txt |   1 +
 src/meson.build   |   3 --
 src/seahorse.1    |  41 ---------------------
 6 files changed, 129 insertions(+), 44 deletions(-)
---
diff --git a/data/meson.build b/data/meson.build
index 53e82994..3ed66c7e 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -59,3 +59,26 @@ install_data(
   'seahorse-search-provider.ini',
   install_dir: join_paths(datadir, 'gnome-shell', 'search-providers')
 )
+
+# manpage
+if with_manpage
+  xsltproc = find_program('xsltproc')
+  custom_target('manfile-seahorse',
+    input: 'seahorse.xml',
+    output: 'seahorse.1',
+    install: true,
+    install_dir: join_paths(get_option('mandir'), 'man1'),
+    command: [
+      xsltproc,
+      '--nonet',
+      '--stringparam', 'man.output.quietly', '1',
+      '--stringparam', 'funcsynopsis.style', 'ansi',
+      '--stringparam', 'man.th.extra1.suppress', '1',
+      '--stringparam', 'man.authors.section.enabled', '0',
+      '--stringparam', 'man.copyright.section.enabled', '0',
+      '-o', '@OUTPUT@',
+      'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl',
+      '@INPUT@'
+    ]
+  )
+endif
diff --git a/data/seahorse.xml b/data/seahorse.xml
new file mode 100644
index 00000000..81648661
--- /dev/null
+++ b/data/seahorse.xml
@@ -0,0 +1,104 @@
+<?xml version='1.0'?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd";>
+
+<refentry id="seahorse">
+
+  <refentryinfo>
+    <title>seahorse</title>
+    <productname>GNOME</productname>
+
+    <authorgroup>
+      <author>
+        <contrib>Maintainer</contrib>
+        <firstname>Niels</firstname>
+        <surname>De Graef</surname>
+        <email>nielsdegraef gmail com</email>
+      </author>
+    </authorgroup>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>seahorse</refentrytitle>
+    <manvolnum>1</manvolnum>
+    <refmiscinfo class="manual">User Commands</refmiscinfo>
+  </refmeta>
+
+  <refnamediv>
+    <refname>seahorse</refname>
+    <refpurpose>Passwords and Keys</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>seahorse</command>
+      <arg choice="opt" rep="repeat">OPTIONS</arg>
+      <arg choice="opt" rep="repeat">FILES</arg>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1><title>Description</title>
+    <para>
+      Seahorse is a graphical interface for managing and using encryption keys,
+      passwords and certificates.  Currently it supports PGP keys (using
+      GPG/GPGME) and SSH keys. Its goal is to provide an easy to use Key
+      Management Tool, along with an easy to use interface for encryption
+      operations.
+    </para>
+  </refsect1>
+
+  <refsect1><title>Options</title>
+    <variablelist>
+      <varlistentry>
+        <term><option>-?</option>, <option>--help</option></term>
+
+        <listitem>
+          <para>Prints a short help text and exits.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>--help-all</option></term>
+
+        <listitem>
+          <para>Show all help options</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>--help-gtk</option></term>
+
+        <listitem>
+          <para>Show all GTK options</para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+  </refsect1>
+
+  <refsect1><title>Application options</title>
+    <variablelist>
+      <varlistentry>
+        <term><option>-v</option>, <option>--version</option></term>
+
+        <listitem>
+          <para>Version of this application</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>--display=<replaceable>DISPLAY</replaceable></option></term>
+
+        <listitem>
+          <para>X display to use</para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+  </refsect1>
+
+  <refsect1><title>Bugs</title>
+    <para>
+      If you find a bug, please report it at https://gitlab.gnome.org/GNOME/seahorse/issues/new.
+    </para>
+  </refsect1>
+
+</refentry>
diff --git a/meson.build b/meson.build
index ccd25d1f..822d1cd2 100644
--- a/meson.build
+++ b/meson.build
@@ -15,6 +15,7 @@ with_hkp = get_option('hkp-support')
 with_ldap = get_option('ldap-support')
 with_keyservers = get_option('keyservers-support')
 with_key_sharing = get_option('key-sharing')
+with_manpage = get_option('manpage')
 
 # Some variables
 cc = meson.get_compiler('c')
diff --git a/meson_options.txt b/meson_options.txt
index a497e1b8..2b2ce4cf 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -6,3 +6,4 @@ option('keyservers-support', type: 'boolean', value: true, description: 'Add sup
 option('hkp-support', type: 'boolean', value: true, description: 'Add support for keyservers using LDAP')
 option('ldap-support', type: 'boolean', value: true, description: 'Add support for keyservers using HKP')
 option('key-sharing', type: 'boolean', value: true, description: 'Add support for DNS-SD key sharing')
+option('manpage', type: 'boolean', value: true, description: 'Build and install the manpage')
diff --git a/src/meson.build b/src/meson.build
index 93a5c13a..c5b11df5 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -51,6 +51,3 @@ seahorse_exe = executable('seahorse',
   link_with: seahorse_linkedlibs,
   install: true,
 )
-
-# Manpage
-install_man('seahorse.1')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]