[Pkg-javascript-commits] [node-supports-color] 01/02: Add man page for supports-color binary.

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Fri Mar 27 15:02:03 UTC 2015


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository node-supports-color.

commit 6b4be06c0a1780675b31d0539e6b45afa60b9c54
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Fri Mar 27 15:31:40 2015 +0100

    Add man page for supports-color binary.
---
 debian/control                  |  6 +++-
 debian/man/supports-color.1.xml | 62 +++++++++++++++++++++++++++++++++++++++++
 debian/manpages                 |  1 +
 debian/rules                    | 12 ++++++++
 4 files changed, 80 insertions(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index f25badf..3aa69e1 100644
--- a/debian/control
+++ b/debian/control
@@ -6,7 +6,11 @@ Priority: extra
 Build-Depends: debhelper (>= 9),
                dh-buildinfo,
                nodejs,
-               mocha
+               mocha,
+               docbook2x,
+               docbook-xsl,
+               docbook-xml,
+               xsltproc
 Standards-Version: 3.9.6
 Vcs-Browser: http://anonscm.debian.org/cgit/pkg-javascript/node-supports-color.git
 Vcs-Git: git://anonscm.debian.org/pkg-javascript/node-supports-color.git
diff --git a/debian/man/supports-color.1.xml b/debian/man/supports-color.1.xml
new file mode 100644
index 0000000..24644c7
--- /dev/null
+++ b/debian/man/supports-color.1.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
+<refentry id='supports-color'>
+
+  <refmeta>
+    <refentrytitle>supports-color</refentrytitle>
+    <manvolnum>1</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>supports-color</refname>
+    <refpurpose>test color support with Node.js</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv id='synopsis'>
+    <cmdsynopsis>
+      <command>supports-color</command>
+      <group>
+        <arg choice='opt'><option>--help</option></arg>
+        <arg choice='opt'><option>--version</option></arg>
+      </group>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1 id='description'>
+    <title>DESCRIPTION</title>
+    <para>
+      <command>supports-color</command> uses the supports-color module for
+      Node.js to determine if the terminal supports color.
+      <command>supports-color</command> exits with code 0 if color is supported
+      and 1 if not.
+    </para>
+  </refsect1>
+
+  <refsect1 id='options'>
+    <title>OPTIONS</title>
+
+    <variablelist>
+
+      <varlistentry>
+        <term><option>--help</option></term>
+        <listitem>
+          <para>
+            show usage information
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>--version</option></term>
+        <listitem>
+          <para>
+            display version and exit
+          </para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </refsect1>
+
+</refentry>
diff --git a/debian/manpages b/debian/manpages
new file mode 100644
index 0000000..13cdaf4
--- /dev/null
+++ b/debian/manpages
@@ -0,0 +1 @@
+debian/man/*.1
diff --git a/debian/rules b/debian/rules
index 2f97d3c..b458a43 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,9 +4,21 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+MANPAGES := $(wildcard debian/man/*.*.xml)
+
 %:
 	dh $@
 
+override_dh_clean:
+	dh_clean debian/man/*.1
+
+override_dh_auto_build:
+	# Create man page from DocBook XML
+	for x in $(MANPAGES) ; do \
+	    docbook2x-man $$x ; \
+	    mv `basename $$x | sed 's/.xml$$//'` `dirname $$x` ; \
+	done
+
 # Tests need required-uncached which is not packaged yet
 #override_dh_auto_test:
 #	mocha

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-supports-color.git



More information about the Pkg-javascript-commits mailing list