[gnome-software] Update man page generation



commit 775dcd0d4c2caf3ae0505ebc0cffa2cdcb0ec8e0
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Sep 1 23:20:40 2013 -0400

    Update man page generation
    
    Use xsltproc directly, rather than the docbook2man wrapper.
    Turn the man page source into xml, and modernize it a bit.
    Also, document the available commandline options.

 configure.ac            |    6 ++--
 src/Makefile.am         |   12 ++++++-
 src/gnome-software.sgml |   74 -----------------------------------------------
 src/gnome-software.xml  |   74 +++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 87 insertions(+), 79 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 156a9b5..d67d4ed 100644
--- a/configure.ac
+++ b/configure.ac
@@ -80,10 +80,10 @@ AC_ARG_ENABLE(man,
                               [generate man pages [default=auto]])],,
               enable_man=maybe)
 AS_IF([test "$enable_man" != no], [
-  AC_PATH_PROG(DOCBOOK2MAN, docbook2man)
-  AS_IF([test -z "$DOCBOOK2MAN"], [
+  AC_PATH_PROG([XSLTPROC], [xsltproc])
+  AS_IF([test -z "$XSLTPROC"], [
     AS_IF([test "$enable_man" = yes], [
-      AC_MSG_ERROR([docbook2man is required for --enable-man])
+      AC_MSG_ERROR([xsltproc is required for --enable-man])
     ])
     enable_man=no
   ])
diff --git a/src/Makefile.am b/src/Makefile.am
index ec4b0bd..b08b44a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -119,8 +119,16 @@ if ENABLE_MAN
 man_MANS += gnome-software.1
 endif
 
-gnome-software.1: gnome-software.sgml
-       docbook2man $? > /dev/null
+XSLTPROC_FLAGS = \
+       --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
+
+gnome-software.1: gnome-software.xml
+       $(AM_V_GEN) $(XSLTPROC) $(XSLTPROC_FLAGS) 
http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
 
 clean-local:
        rm -f *~
diff --git a/src/gnome-software.xml b/src/gnome-software.xml
new file mode 100644
index 0000000..d26f223
--- /dev/null
+++ b/src/gnome-software.xml
@@ -0,0 +1,74 @@
+<?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="gnome-software">
+
+  <refentryinfo>
+    <title>gnome-software</title>
+    <productname>GNOME</productname>
+    <author>
+      <contrib>Maintainer</contrib>
+      <firstname>Richard</firstname>
+      <surname>Hughes</surname>
+      <email>richard hughsie com</email>
+    </author>
+    <copyright>
+      <year>2013</year>
+      <holder>Richard Hughes</holder>
+    </copyright>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>gnome-software</refentrytitle>
+    <manvolnum>1</manvolnum>
+    <refmiscinfo class="manual">User Commands</refmiscinfo>
+  </refmeta>
+
+  <refnamediv>
+    <refname>gnome-software</refname>
+    <refpurpose>Install applications</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>gnome-software</command>
+      <arg choice="opt" rep="repeat">OPTION</arg>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1>
+    <title>Description</title>
+    <para>
+      This manual page documents briefly the <command>gnome-software</command> command.
+    </para>
+    <para>
+      <command>gnome-software</command> allows you to add and remove
+      applications and update your system.
+    </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>--version</option></term>
+        <listitem><para>Prints the program version and exits.</para></listitem>
+      </varlistentry>
+      <varlistentry>
+        <term><option>--mode</option> <replaceable>MODE</replaceable></term>
+        <listitem><para>Starts gnome-software in the given mode. <replaceable>MODE</replaceable> can be 
'updates', 'installed' or 'overview'.</para></listitem>
+      </varlistentry>
+    </variablelist>
+  </refsect1>
+
+  <refsect1>
+    <title>Author</title>
+    <para>This manual page was written by Richard Hughes <email>richard hughsie com</email>.
+    </para>
+  </refsect1>
+</refentry>


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