[tor-commits] [websocket/master] Use a static man page.
dcf at torproject.org
dcf at torproject.org
Sat Dec 19 08:34:30 UTC 2015
commit 3646f308859fcea398e138042a38cdeb65ae8c83
Author: David Fifield <david at bamsoftware.com>
Date: Fri Dec 18 22:18:25 2015 -0800
Use a static man page.
---
Makefile | 4 ---
doc/Makefile | 11 +++++++
doc/websocket-server.1 | 69 ++++++++++++++++++++++++++++++++++++++++++++
doc/websocket-server.1.txt | 42 +++++++++++++++++++++++++++
4 files changed, 122 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index b723c86..b6ea18c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,6 @@
DESTDIR =
PREFIX = /usr/local
BINDIR = $(PREFIX)/bin
-VERSION = 0.1
GOBUILDFLAGS =
# Alternate flags to use gccgo, allowing cross-compiling for x86 from
@@ -17,9 +16,6 @@ websocket-server/websocket-server: websocket-server/*.go websocket/*.go
websocket-client/websocket-client: websocket-client/*.go
cd websocket-client && go build $(GOBUILDFLAGS)
-doc/websocket-server.1: websocket-server/websocket-server
- help2man --no-info --name "WebSocket server pluggable transport" --version-string "$(VERSION)" -o "$@" "$<"
-
install: websocket-server/websocket-server
mkdir -p "$(DESTDIR)$(BINDIR)"
cp -f websocket-server/websocket-server "$(DESTDIR)$(BINDIR)"
diff --git a/doc/Makefile b/doc/Makefile
new file mode 100644
index 0000000..464e1b5
--- /dev/null
+++ b/doc/Makefile
@@ -0,0 +1,11 @@
+MAN = websocket-server.1
+
+all: $(MAN)
+
+%.1: %.1.txt
+ a2x --no-xmllint --xsltproc-opts "--stringparam man.th.title.max.length 17" -d manpage -f manpage $<
+
+clean:
+ rm -f $(MAN)
+
+.PHONY: all clean
diff --git a/doc/websocket-server.1 b/doc/websocket-server.1
new file mode 100644
index 0000000..75161b2
--- /dev/null
+++ b/doc/websocket-server.1
@@ -0,0 +1,69 @@
+'\" t
+.\" Title: websocket-server
+.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
+.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
+.\" Date: 12/18/2015
+.\" Manual: \ \&
+.\" Source: \ \&
+.\" Language: English
+.\"
+.TH "WEBSOCKET\-SERVER" "1" "12/18/2015" "\ \&" "\ \&"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+websocket-server \- WebSocket pluggable transport server
+.SH "SYNOPSIS"
+.sp
+\fBwebsocket\-server\fR [\fIOPTIONS\fR]
+.SH "DESCRIPTION"
+.sp
+websocket\-server is a transport plugin for Tor that uses the WebSocket protocol\&. It is the server component of the flash proxy system\&.
+.sp
+Configuration for websocket\-server usually appears in a torrc file\&. Here is a sample configuration:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+ExtORPort auto
+ServerTransportPlugin websocket exec /usr/local/bin/websocket\-server \-\-port 9901
+.fi
+.if n \{\
+.RE
+.\}
+.SH "OPTIONS"
+.PP
+\fB\-\-log\fR=\fIFILENAME\fR
+.RS 4
+Name of a file to write log messages to (default stderr)\&.
+.RE
+.PP
+\fB\-\-port\fR=\fIPORT\fR
+.RS 4
+Port to listen on\&. Overrides the TOR_PT_SERVER_BINDADDR environment variable set by tor\&.
+.RE
+.PP
+\fB\-h\fR, \fB\-\-help\fR
+.RS 4
+Display a help message and exit\&.
+.RE
+.SH "BUGS"
+.sp
+Please report at \fBhttps://trac\&.torproject\&.org/projects/tor\fR\&.
diff --git a/doc/websocket-server.1.txt b/doc/websocket-server.1.txt
new file mode 100644
index 0000000..c227a92
--- /dev/null
+++ b/doc/websocket-server.1.txt
@@ -0,0 +1,42 @@
+// This file is asciidoc source code.
+// To generate manpages, use the a2x command i.e.
+// a2x --no-xmllint -d manpage -f manpage websocket-server.1.txt
+// see http://www.methods.co.nz/asciidoc/userguide.html#X1
+WEBSOCKET-SERVER(1)
+===================
+
+NAME
+----
+websocket-server - WebSocket pluggable transport server
+
+SYNOPSIS
+--------
+**websocket-server** [__OPTIONS__]
+
+DESCRIPTION
+-----------
+websocket-server is a transport plugin for Tor that uses the WebSocket
+protocol. It is the server component of the flash proxy system.
+
+Configuration for websocket-server usually appears in a torrc file. Here
+is a sample configuration:
+----
+ExtORPort auto
+ServerTransportPlugin websocket exec /usr/local/bin/websocket-server --port 9901
+----
+
+OPTIONS
+-------
+**--log**=__FILENAME__::
+ Name of a file to write log messages to (default stderr).
+
+**--port**=__PORT__::
+ Port to listen on. Overrides the TOR_PT_SERVER_BINDADDR environment
+ variable set by tor.
+
+**-h**, **--help**::
+ Display a help message and exit.
+
+BUGS
+----
+Please report at **https://trac.torproject.org/projects/tor**.
More information about the tor-commits
mailing list