[pacman-contrib] [PATCH 2/3] Add pactree manpage

Johannes Löthberg johannes at kyriasis.com
Sat Oct 15 11:16:56 UTC 2016


Signed-off-by: Johannes Löthberg <johannes at kyriasis.com>
---
 doc/Makefile.am   | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 doc/pactree.8.txt | 72 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 165 insertions(+)
 create mode 100644 doc/Makefile.am
 create mode 100644 doc/pactree.8.txt

diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644
index 0000000..df97fff
--- /dev/null
+++ b/doc/Makefile.am
@@ -0,0 +1,93 @@
+# We have to do some funny stuff here with the manpages. In order to ensure
+# a dist tarball doesn't get put out there without manpages, we keep those
+# files listed in EXTRA_DIST no matter what. However, we only add them to
+# man_MANS if --enable-asciidoc and/or --enable-doxygen are used.
+
+ASCIIDOC_MANS = \
+	pactree.8
+
+HTML_MANPAGES = \
+	pactree.8.html
+
+HTML_DOCS = \
+	$(HTML_MANPAGES)
+
+EXTRA_DIST = \
+	pactree.8.txt \
+	footer.txt \
+	$(ASCIIDOC_MANS)
+
+# Files that should be removed, but which Automake does not know.
+MOSTLYCLEANFILES = *.xml $(ASCIIDOC_MANS) $(HTML_DOCS) repo-remove.8 website.tar.gz
+
+# Ensure manpages are fresh when building a dist tarball
+dist-hook:
+	$(MAKE) $(AM_MAKEFLAGS) clean
+	$(MAKE) $(AM_MAKEFLAGS) all
+
+if USE_GIT_VERSION
+GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 --dirty | sed s/^v//')
+REAL_PACKAGE_VERSION = $(GIT_VERSION)
+else
+REAL_PACKAGE_VERSION = $(PACKAGE_VERSION)
+endif
+
+man_MANS =
+dist_man_MANS = $(ASCIIDOC_MANS)
+
+html: $(HTML_DOCS)
+
+website: website.tar.gz
+
+.PHONY: html website
+
+website.tar.gz: html
+	$(AM_V_GEN)bsdtar czf $@ $(HTML_DOCS) \
+		asciidoc-override.css \
+		-C /etc/asciidoc/stylesheets/ \
+		asciidoc.css \
+		-C /etc/asciidoc/javascripts/ \
+		asciidoc.js \
+		-C /etc/asciidoc/ \
+		images
+
+pkgdatadir = ${datadir}/${PACKAGE}
+
+ASCIIDOC_OPTS = \
+	-f $(srcdir)/asciidoc.conf \
+	-a pacman_contrib_version="$(REAL_PACKAGE_VERSION)" \
+	-a pacman_contrib_date="`date +%Y-%m-%d`" \
+	-a pkgdatadir=$(pkgdatadir) \
+	-a localstatedir=$(localstatedir) \
+	-a sysconfdir=$(sysconfdir)
+
+A2X_OPTS = \
+	--no-xmllint \
+	-d manpage \
+	-f manpage \
+	--xsltproc-opts='-param man.endnotes.list.enabled 0 -param man.endnotes.are.numbered 0'
+
+# These rules are due to the includes and files of the asciidoc text
+$(ASCIIDOC_MANS): asciidoc.conf footer.txt Makefile.am
+	$(AM_V_GEN)a2x $(A2X_OPTS) --asciidoc-opts="$(ASCIIDOC_OPTS) --out-file=./$@.xml" $(srcdir)/$@.txt
+
+%.html: %.txt
+	$(AM_V_GEN)asciidoc $(ASCIIDOC_OPTS) -o - $*.txt | \
+		sed -e 's/\r$$//' > $@
+
+HACKING.html: ../HACKING
+	$(AM_V_GEN)asciidoc $(ASCIIDOC_OPTS) -o - ../HACKING | \
+		sed -e 's/\r$$//' > $@
+
+# Customizations for certain HTML docs
+$(HTML_MANPAGES): asciidoc.conf footer.txt Makefile.am
+$(HTML_OTHER): asciidoc.conf Makefile.am
+%.html: ASCIIDOC_OPTS += -a linkcss -a toc -a icons -a max-width=960px -a stylesheet=asciidoc-override.css
+%.8.html: ASCIIDOC_OPTS += -d manpage
+%.5.html: ASCIIDOC_OPTS += -d manpage
+%.3.html: ASCIIDOC_OPTS += -d manpage
+
+# Dependency rules
+pactree.8 pactree.8.html: pactree.8.txt
+
+# vim:set noet:
diff --git a/doc/pactree.8.txt b/doc/pactree.8.txt
new file mode 100644
index 0000000..4c391c0
--- /dev/null
+++ b/doc/pactree.8.txt
@@ -0,0 +1,72 @@
+/////
+vim:set ts=4 sw=4 syntax=asciidoc noet spell spelllang=en_us:
+/////
+pactree(8)
+=========
+
+Name
+----
+pactree - package dependency tree viewer
+
+
+Synopsis
+--------
+'pactree' [options] package
+
+
+Description
+-----------
+Pactree produces a dependency tree for a package.
+
+By default, a tree-like output is generated, but with the '\--graph' option, a Graphviz
+description is generated.
+
+
+Options
+-------
+*-a, \--ascii*::
+	Use ASCII characters for tree formatting. By default, pactree will use Unicode
+	line drawing characters if it is able to detect that the locale supports them.
+
+*-b, \--dbpath*::
+	Specify an alternative database location.
+
+*-c, \--color*::
+	Colorize output.
+
+*-d, \--depth <num>*::
+	Limits the number of levels of dependency to show. A zero means
+	show the named package only, one shows the packages that are directly
+	required.
+
+*-g, \--graph*::
+	Generate a Graphviz description. If this option is given, the '\--color' and
+	'\--linear' options are ignored.
+
+*-h, \--help*::
+	Output syntax and command-line options.
+
+*-l, \--linear*::
+	Prints package names at the start of each line, one per line.
+
+*-o, \--optdeps*::
+	Show packages that are optionally depended upon by the named package.
+
+*-r, \--reverse*::
+	Show packages that depend on the named package.
+
+*-s, \--sync*::
+	Read package data from sync databases instead of local database.
+
+*-u, \--unique*::
+	List dependent packages once. Implies '\--linear'.
+
+*\--config <file>*::
+	Specify an alternate pacman configuration file.
+
+
+See Also
+--------
+linkman:pacman[8], linkman:pacman.conf[5], linkman:makepkg[8]
+
+include::footer.txt[]
-- 
2.10.0


More information about the pacman-contrib mailing list