projects/pk-update-icon

changeset 37:7e44a0a8dc2c

Convert the manpage to DocBook V5.0
author Guido Berhoerster <gber@opensuse.org>
date Fri Feb 07 18:10:41 2014 +0100 (2014-02-07)
parents 82a31628a26d
children db09b66c3853
files Makefile docbook-update-source-data.xsl pk-update-icon.1 pk-update-icon.1.xml
line diff
     1.1 --- a/Makefile	Fri Feb 07 18:10:41 2014 +0100
     1.2 +++ b/Makefile	Fri Feb 07 18:10:41 2014 +0100
     1.3 @@ -38,6 +38,23 @@
     1.4  MSGFMT :=	msgfmt
     1.5  INTLTOOL_UPDATE :=	intltool-update
     1.6  INTLTOOL_MERGE :=	intltool-merge
     1.7 +XSLTPROC :=	xsltproc
     1.8 +DOCBOOK5_MANPAGES_STYLESHEET =	http://docbook.sourceforge.net/release/xsl-ns/current/manpages/docbook.xsl
     1.9 +
    1.10 +define generate-manpage-rule =
    1.11 +%.$(1): %.$(1).xml
    1.12 +	$$(XSLTPROC) \
    1.13 +	    --xinclude \
    1.14 +	    --stringparam package $$(PACKAGE) \
    1.15 +	    --stringparam version $$(VERSION)\
    1.16 +	    docbook-update-source-data.xsl $$< | \
    1.17 +	    $$(XSLTPROC) \
    1.18 +	    --xinclude \
    1.19 +	    $$(DOCBOOK5_MANPAGES_FLAGS) \
    1.20 +	    --output $$@ \
    1.21 +	    $$(DOCBOOK5_MANPAGES_STYLESHEET) \
    1.22 +	    -
    1.23 +endef
    1.24  
    1.25  DESTDIR ?=
    1.26  prefix ?=	/usr/local
    1.27 @@ -49,6 +66,7 @@
    1.28  xdgautostartdir ?=	$(sysconfdir)/xdg/autostart
    1.29  
    1.30  OBJS =		main.o pkui-icon.o pkui-backend.o
    1.31 +MANPAGES =	$(PACKAGE).1
    1.32  AUTOSTART_FILE =	$(PACKAGE).desktop
    1.33  MOFILES :=	$(patsubst %.po,%.mo,$(wildcard po/*.po))
    1.34  POTFILE =	po/$(PACKAGE).pot
    1.35 @@ -59,12 +77,14 @@
    1.36  		-DVERSION=\"$(VERSION)\" \
    1.37  		-DLOCALEDIR="\"$(localedir)\""
    1.38  LDLIBS :=	$(shell pkg-config --libs gtk+-2.0 unique-1.0 libnotify packagekit-glib2)
    1.39 +DOCBOOK5_MANPAGES_FLAGS =	--stringparam man.authors.section.enabled 0 \
    1.40 +				--stringparam man.copyright.section.enabled 0
    1.41  
    1.42  .DEFAULT_TARGET = all
    1.43  
    1.44  .PHONY: all clean clobber dist install
    1.45  
    1.46 -all: $(PACKAGE) $(MOFILES) $(AUTOSTART_FILE)
    1.47 +all: $(PACKAGE) $(MANPAGES) $(MOFILES) $(AUTOSTART_FILE)
    1.48  
    1.49  $(PACKAGE): $(OBJS)
    1.50  	$(LINK.o) $^ $(LDLIBS) -o $@
    1.51 @@ -84,6 +104,8 @@
    1.52  	$(MAKEDEPEND.c) $< | $(SED) -f deps.sed >$*.d
    1.53  	$(COMPILE.c) -o $@ $<
    1.54  
    1.55 +$(foreach section,1 2 3 4 5 6 7 8 9,$(eval $(call generate-manpage-rule,$(section))))
    1.56 +
    1.57  %.desktop: %.desktop.in $(MOFILES)
    1.58  	$(INTLTOOL_MERGE) --desktop-style --utf8 po $< $@
    1.59  
    1.60 @@ -102,7 +124,7 @@
    1.61  			$(DESTDIR)$(mandir)/man1/$(PACKAGE).1
    1.62  
    1.63  clean:
    1.64 -	rm -f $(PACKAGE) $(OBJS) $(POTFILE) $(MOFILES) $(AUTOSTART_FILE)
    1.65 +	rm -f $(PACKAGE) $(OBJS) $(POTFILE) $(MOFILES) $(MANPAGES) $(AUTOSTART_FILE)
    1.66  
    1.67  clobber: clean
    1.68  	rm -f $(patsubst %.o,%.d,$(OBJS))
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/docbook-update-source-data.xsl	Fri Feb 07 18:10:41 2014 +0100
     2.3 @@ -0,0 +1,29 @@
     2.4 +<?xml version="1.0"?>
     2.5 +<xsl:stylesheet
     2.6 +  version="1.0"
     2.7 +  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     2.8 +  xmlns:db="http://docbook.org/ns/docbook"
     2.9 +  xmlns="http://docbook.org/ns/docbook"
    2.10 +  exclude-result-prefixes="xsl db">
    2.11 +
    2.12 +  <xsl:param name="package" select="''" />
    2.13 +  <xsl:param name="version" select="''" />
    2.14 +
    2.15 +  <xsl:template match="db:refmeta/db:refmiscinfo[@class = 'source' or
    2.16 +    @class = 'version']"/>
    2.17 +
    2.18 +  <xsl:template match="db:refmeta">
    2.19 +    <xsl:copy>
    2.20 +      <xsl:apply-templates/>
    2.21 +      <refmiscinfo class="source"><xsl:value-of select="$package"/></refmiscinfo>
    2.22 +      <refmiscinfo class="version"><xsl:value-of select="$version"/></refmiscinfo>
    2.23 +    </xsl:copy>
    2.24 +  </xsl:template>
    2.25 +
    2.26 +  <xsl:template match="@*|node()">
    2.27 +    <xsl:copy>
    2.28 +      <xsl:apply-templates select="@*|node()"/>
    2.29 +    </xsl:copy>
    2.30 +  </xsl:template>
    2.31 +
    2.32 +</xsl:stylesheet>
     3.1 --- a/pk-update-icon.1	Fri Feb 07 18:10:41 2014 +0100
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,50 +0,0 @@
     3.4 -.\" Copyright (C) 2011 Guido Berhoerster <gber@opensuse.org>
     3.5 -.\"
     3.6 -.\" Licensed under the GNU General Public License Version 2
     3.7 -.\"
     3.8 -.\" This program is free software; you can redistribute it and/or modify
     3.9 -.\" it under the terms of the GNU General Public License as published by
    3.10 -.\" the Free Software Foundation; either version 2 of the License, or
    3.11 -.\" (at your option) any later version.
    3.12 -.\"
    3.13 -.\" This program is distributed in the hope that it will be useful,
    3.14 -.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
    3.15 -.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    3.16 -.\" GNU General Public License for more details.
    3.17 -.\"
    3.18 -.\" You should have received a copy of the GNU General Public License
    3.19 -.\" along with this program; if not, write to the Free Software
    3.20 -.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
    3.21 -.\"
    3.22 -.TH PK\-UPDATE\-ICON 1 "20 Oct 2011"
    3.23 -.SH NAME
    3.24 -pk\-update\-icon \- display notifications about software updates
    3.25 -.SH SYNOPSIS
    3.26 -\fBpk\-update\-icon\fR
    3.27 -[\fB\-hv?\fR]
    3.28 -[\fB\-d\fR \fIdelay\fR | \fB\-\-delay\fR=\fIdelay\fR]
    3.29 -[\fB\-i\fR \fIinterval\fR | \fB\-\-interval\fR=\fIinterval\fR]
    3.30 -.SH DESCRIPTION
    3.31 -\fBpk\-update\-icon\fR displays notifications and an icon in the tray area of
    3.32 -the panel when package updates are available.
    3.33 -.SH OPTIONS
    3.34 -The following options are supported:
    3.35 -.TP
    3.36 -.BR \-d ", " \-\-delay =\fIdelay\fR
    3.37 -Set the delay in seconds before the first check for updates.
    3.38 -.TP
    3.39 -.BR \-h ", " \-? ", " \-\-help
    3.40 -Print a summary of all command line options and exit.
    3.41 -.TP
    3.42 -.BR \-i ", " \-\-interval =\fIinterval\fR
    3.43 -Set the interval in seconds between checks for updates.
    3.44 -.TP
    3.45 -.BR \-v ", " \-\-version
    3.46 -Print the version number and exit.
    3.47 -.SH EXIT STATUS
    3.48 -.TP
    3.49 -.B 0
    3.50 -The program has exited normally.
    3.51 -.TP
    3.52 -.B >0
    3.53 -An Error has occurred.
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/pk-update-icon.1.xml	Fri Feb 07 18:10:41 2014 +0100
     4.3 @@ -0,0 +1,172 @@
     4.4 +<?xml version="1.0"?>
     4.5 +<!--
     4.6 +
     4.7 +Copyright (C) 2014 Guido Berhoerster <gber@opensuse.org>
     4.8 +
     4.9 +Licensed under the GNU General Public License Version 2
    4.10 +
    4.11 +This program is free software; you can redistribute it and/or modify
    4.12 +it under the terms of the GNU General Public License as published by
    4.13 +the Free Software Foundation; either version 2 of the License, or
    4.14 +(at your option) any later version.
    4.15 +
    4.16 +This program is distributed in the hope that it will be useful,
    4.17 +but WITHOUT ANY WARRANTY; without even the implied warranty of
    4.18 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    4.19 +GNU General Public License for more details.
    4.20 +
    4.21 +You should have received a copy of the GNU General Public License
    4.22 +along with this program; if not, write to the Free Software
    4.23 +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
    4.24 +
    4.25 +-->
    4.26 +<refentry xmlns="http://docbook.org/ns/docbook" xml:lang="en">
    4.27 +  <info>
    4.28 +    <author>
    4.29 +      <personname>
    4.30 +        <firstname>Guido</firstname>
    4.31 +        <surname>Berhoerster</surname>
    4.32 +      </personname>
    4.33 +      <email>gber@opensuse.org</email>
    4.34 +      <personblurb/>
    4.35 +    </author>
    4.36 +    <date>7 February, 2014</date>
    4.37 +  </info>
    4.38 +  <refmeta>
    4.39 +    <refentrytitle>pk-update-icon</refentrytitle>
    4.40 +    <manvolnum>1</manvolnum>
    4.41 +    <refmiscinfo class="source"/>
    4.42 +    <refmiscinfo class="version"/>
    4.43 +    <refmiscinfo class="manual">User Commands</refmiscinfo>
    4.44 +  </refmeta>
    4.45 +  <refnamediv>
    4.46 +    <refname>pk-update-icon</refname>
    4.47 +    <refpurpose>display notifications about software updates</refpurpose>
    4.48 +  </refnamediv>
    4.49 +  <refsynopsisdiv>
    4.50 +    <cmdsynopsis>
    4.51 +      <command>pk-update-icon</command>
    4.52 +      <group>
    4.53 +        <arg choice="plain">
    4.54 +          <option>-h</option>
    4.55 +        </arg>
    4.56 +        <arg choice="plain">
    4.57 +          <option>-?</option>
    4.58 +        </arg>
    4.59 +        <arg choice="plain">
    4.60 +          <option>--help</option>
    4.61 +        </arg>
    4.62 +      </group>
    4.63 +      <group>
    4.64 +        <arg choice="plain">
    4.65 +          <option>-v</option>
    4.66 +        </arg>
    4.67 +        <arg choice="plain">
    4.68 +          <option>--version</option>
    4.69 +        </arg>
    4.70 +      </group>
    4.71 +      <group>
    4.72 +        <arg choice="plain">
    4.73 +          <option>-d</option>
    4.74 +          <replaceable>delay</replaceable>
    4.75 +        </arg>
    4.76 +        <arg choice="plain">
    4.77 +          <option>--delay</option>
    4.78 +          <replaceable>delay</replaceable>
    4.79 +        </arg>
    4.80 +      </group>
    4.81 +      <group >
    4.82 +        <arg choice="plain">
    4.83 +          <option>-i</option>
    4.84 +          <replaceable>interval</replaceable>
    4.85 +        </arg>
    4.86 +        <arg choice="plain">
    4.87 +          <option>--interval</option>
    4.88 +          <replaceable>interval</replaceable>
    4.89 +        </arg>
    4.90 +      </group>
    4.91 +    </cmdsynopsis>
    4.92 +  </refsynopsisdiv>
    4.93 +  <refsect1>
    4.94 +    <title>Description</title>
    4.95 +    <para><command>pk-update-icon</command> displays  notifications  and an
    4.96 +    icon in the tray area of the panel when package updates are
    4.97 +    available.</para>
    4.98 +  </refsect1>
    4.99 +  <refsect1>
   4.100 +    <title>Options</title>
   4.101 +    <para>The following options are supported:</para>
   4.102 +    <variablelist>
   4.103 +      <varlistentry>
   4.104 +        <term>
   4.105 +          <option>-d</option>
   4.106 +          <replaceable>delay</replaceable>
   4.107 +        </term>
   4.108 +        <term>
   4.109 +          <option>--delay</option>
   4.110 +          <replaceable>delay</replaceable>
   4.111 +        </term>
   4.112 +        <listitem>
   4.113 +          <para>Set the delay in seconds before the first check for
   4.114 +          updates.</para>
   4.115 +        </listitem>
   4.116 +      </varlistentry>
   4.117 +      <varlistentry>
   4.118 +        <term>
   4.119 +          <option>-h</option>
   4.120 +        </term>
   4.121 +        <term>
   4.122 +          <option>-?</option>
   4.123 +        </term>
   4.124 +        <term>
   4.125 +          <option>--help</option>
   4.126 +        </term>
   4.127 +        <listitem>
   4.128 +          <para>Print a summary of all command line options and exit.</para>
   4.129 +        </listitem>
   4.130 +      </varlistentry>
   4.131 +      <varlistentry>
   4.132 +        <term>
   4.133 +          <option>-i</option>
   4.134 +          <replaceable>interval</replaceable>
   4.135 +        </term>
   4.136 +        <term>
   4.137 +          <option>--interval</option>
   4.138 +          <replaceable>interval</replaceable>
   4.139 +        </term>
   4.140 +        <listitem>
   4.141 +          <para>Set the interval in seconds between checks for updates.</para>
   4.142 +        </listitem>
   4.143 +      </varlistentry>
   4.144 +      <varlistentry>
   4.145 +        <term>
   4.146 +          <option>-v</option>
   4.147 +        </term>
   4.148 +        <term>
   4.149 +          <option>--version</option>
   4.150 +        </term>
   4.151 +        <listitem>
   4.152 +          <para>Print the version number and exit.</para>
   4.153 +        </listitem>
   4.154 +      </varlistentry>
   4.155 +    </variablelist>
   4.156 +  </refsect1>
   4.157 +  <refsect1>
   4.158 +    <title>Exit Status</title>
   4.159 +    <para>The following exit values are returned:</para>
   4.160 +    <variablelist>
   4.161 +      <varlistentry>
   4.162 +        <term>0</term>
   4.163 +        <listitem>
   4.164 +          <para>Command successfully executed.</para>
   4.165 +        </listitem>
   4.166 +      </varlistentry>
   4.167 +      <varlistentry>
   4.168 +        <term>&gt; 0</term>
   4.169 +        <listitem>
   4.170 +          <para>An error has occured.</para>
   4.171 +        </listitem>
   4.172 +      </varlistentry>
   4.173 +    </variablelist>
   4.174 +  </refsect1>
   4.175 +</refentry>