[reprotest] 01/01: Move main package description to README.rst as we did for diffoscope

Ximin Luo infinity0 at debian.org
Tue Nov 28 17:23:50 UTC 2017


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

infinity0 pushed a commit to branch master
in repository reprotest.

commit fbb1b6a1e81a06bfa57009bcd54028b7a949dfc8
Author: Ximin Luo <infinity0 at debian.org>
Date:   Tue Nov 28 18:23:24 2017 +0100

    Move main package description to README.rst as we did for diffoscope
---
 README.rst          | 20 ++++++++++++++++++++
 doc/Makefile        | 29 ++++++++++++++++++++---------
 doc/reprotest.h2m.0 | 14 --------------
 3 files changed, 40 insertions(+), 23 deletions(-)

diff --git a/README.rst b/README.rst
index d428814..397dc23 100644
--- a/README.rst
+++ b/README.rst
@@ -1,3 +1,23 @@
+reprotest
+=========
+
+reprotest builds the same source code twice in different environments, and then
+checks the binaries produced by each build for differences. If any are found,
+then ``diffoscope(1)`` (or if unavailable then ``diff(1)``) is used to display
+them in detail for later analysis.
+
+See the ``COMMAND-LINE EXAMPLES`` section further below to get you
+started, as well as more detailed explanations of all the command-line
+options. The same information is also available in
+``/usr/share/doc/reprotest/README.rst`` or similar.
+
+.. raw:: manpage
+
+   .\" the below hack gets rid of the python "usage" message in favour of the
+   .\" the synopsis we manually defined in doc/$(PACKAGE).h2m.0
+   .SS positional arguments:
+   .\" end_of_description_header
+
 Command-line examples
 =====================
 
diff --git a/doc/Makefile b/doc/Makefile
index 47d5595..31eaa57 100755
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -1,22 +1,33 @@
 #!/usr/bin/make -f
+# This file is also present in diffoscope, please update that as well if you
+# make fixes here.
 
+PACKAGE = reprotest
 VERSION = $$(cd .. && python3 setup.py -V)
+SED_fix_package_quirks =
 
 SED_rm_python_usage_msg = -e '/end_of_description_header/,/positional arguments/{d}'
-SED_fix_rst2man_quirks = -e 's,^ \\- ,,' -e 's,^\[,\\[char91],g'
+SED_fix_rst2man_quirks = \
+  -e 's,^ \\- ,,' \
+  -e 's,^\[,\\[char91],g' \
+  -e 's,\.TH *"" "" "",,g'
+SED_rst2man_output_to_h2m_input = \
+  -e 's,\.SH \(.*\),[\1],g' \
+  -e 's,\[$(PACKAGE)\],[DESCRIPTION],gi'
 
-all: reprotest.1
+all: $(PACKAGE).1
 
-reprotest.1: reprotest.h2m ../reprotest/__init__.py
-	help2man --version-string=$(VERSION) ./reprotest -N --include="$<" | \
+$(PACKAGE).1: $(PACKAGE).h2m ../$(PACKAGE)/__init__.py
+	help2man --version-string=$(VERSION) ./$(PACKAGE) -N --include="$<" | \
 	  sed $(SED_rm_python_usage_msg) > "$@"
 
-reprotest.h2m: reprotest.h2m.0 ../README.rst Makefile
-	{ cat reprotest.h2m.0; cat ../README.rst | \
-	  rst2man --no-doc-title | \
+$(PACKAGE).h2m: $(PACKAGE).h2m.0 ../README.rst Makefile
+	{ cat $(PACKAGE).h2m.0; cat ../README.rst | \
+	  rst2man -q --no-doc-title | \
 	  sed $(SED_fix_rst2man_quirks) \
-	      -e 's,\.SH \(.*\),[\1],g'; } > "$@"
+	      $(SED_fix_package_quirks) \
+	      $(SED_rst2man_output_to_h2m_input); } > "$@"
 
 .PHONY: clean
 clean:
-	$(RM) reprotest.1 reprotest.h2m
+	$(RM) $(PACKAGE).1 $(PACKAGE).h2m
diff --git a/doc/reprotest.h2m.0 b/doc/reprotest.h2m.0
index 286dd85..eb44684 100644
--- a/doc/reprotest.h2m.0
+++ b/doc/reprotest.h2m.0
@@ -8,17 +8,3 @@ reprotest \- Build packages and check them for reproducibility.
 \fBreprotest\fR [options] [\-s <source_root>] <build_command> [<artifact_pattern>] \
 [-- <virtual_server_args> [<virtual_server_args> ...]]
 .fi
-[<DESCRIPTION]
-.B reprotest
-builds the same source code twice in different environments, and then checks
-the binaries produced by each build for differences. If any are found, then
-\fBdiffoscope\fR(1) (or if unavailable then \fBdiff\fR(1)) is used to display
-them in detail for later analysis.
-.sp
-See the \fBCOMMAND-LINE EXAMPLES\fR section further below to get you started,
-as well as more detailed explanations of all the command-line options. The same
-information is also available in \fI/usr/share/doc/reprotest/README.rst\fR or
-similar.
-.\" the below hack gets rid of the python "usage" message in favour of the above
-.SS positional arguments:
-.\" end_of_description_header

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/reprotest.git



More information about the Reproducible-commits mailing list