nvmetcli manpage and misc tweaks.
Subsystems (3)
cover nvmetcli manpage and misc tweaks.
Adding proper documentation solution to nvmetcli.
v1:
*Folded Christoph's input into the man pages. *undeleted README
*Added 'installdoc/uninstalldoc' options in the Makefile
Jay Freyensee (2):
nvmetcli: Adding manpage/html generation
nvmetcli: add python-six to rpm package building
Documentation/Makefile | 31 ++++++ Documentation/nvmetcli.txt | 253 +++++++++++++++++++++++++++++++++++++++++++++ Makefile | 21 +++- rpm/nvmetcli.spec.tmpl | 2 +- 4 files changed, 304 insertions(+), 3 deletions(-) create mode 100644 Documentation/Makefile create mode 100644 Documentation/nvmetcli.txt
Signature · 1 line
2.7.4
PATCH 1/2 nvmetcli: Adding manpage/html generation
Signed-off-by Jay Freyensee <james_p_freyensee at linux.intel.com>
--- Documentation/Makefile | 31 ++++++ Documentation/nvmetcli.txt | 253 +++++++++++++++++++++++++++++++++++++++++++++ Makefile | 21 +++- 3 files changed, 303 insertions(+), 2 deletions(-) create mode 100644 Documentation/Makefile create mode 100644 Documentation/nvmetcli.txt
Documentation/Makefile new file +31 -0
@@ -0,0 +1,31 @@ +PKGNAME = nvmetcli +MANPAGE = ${PKGNAME}.8 +HTMLFILE = ${PKGNAME}.html +XMLFILE = ${PKGNAME}.xml +INSTALL ?= install +PREFIX := /usr + +ASCIIDOC = asciidoc +XMLTO = xmlto --skip-validation + +DOCDATA = ${XMLFILE} ${HTMLFILE} + +${MANPAGE}: ${DOCDATA} + ${XMLTO} man $< + +%.xml: %.txt + ${ASCIIDOC} -b docbook -d manpage -o $@ $< + +%.html: %.txt + ${ASCIIDOC} -a toc -o $@ $< + +installdoc: man8 + +man8: + ${INSTALL} -m 644 ${MANPAGE} ${PREFIX}/share/man/man8 + +uninstalldoc: + -rm -f ${PREFIX}/share/man/man8/${MANPAGE} + +clean: + -rm -f ${MANPAGE} ${HTMLFILE} ${XMLFILE}
Documentation/nvmetcli.txt new file +253 -0
253 lines not on this page · raw message
Makefile +19 -2
@@ -2,6 +2,7 @@ PKGNAME = nvmetcli NAME = nvmet GIT_BRANCH = $$(git branch | grep \* | tr -d \*) VERSION = $$(basename $$(git describe --tags | tr - . | sed 's/^v//')) +DOCDIR = ./Documentation all: @echo "Usage:"
@@ -9,13 +10,29 @@ all: @echo " make deb - Builds debian packages." @echo " make rpm - Builds rpm packages." @echo " make release - Generates the release tarball." + @echo " make doc - Builds manpages & html docs in ${DOCDIR}." @echo @echo " make clean - Cleanup the local repository build files." - @echo " make cleanall - Also remove dist/*" + @echo " make cleandoc - Cleanup auto-generated docs in ${DOCDIR}." + @echo " make cleanall - Remove dist/*, build files, auto-gen docs." + @echo " make installdoc - Install man pages (need sudo)." + @echo " make uninstalldoc - Uninstall man pages (need sudo)." test: @nose2 -C --coverage ./nvmet +doc: ${NAME} + ${MAKE} -C ${DOCDIR} + +installdoc: + ${MAKE} -C ${DOCDIR} installdoc + +uninstalldoc: + ${MAKE} -C ${DOCDIR} uninstalldoc + +cleandoc: + ${MAKE} -C ${DOCDIR} clean + clean: @rm -fv ${NAME}/*.pyc ${NAME}/*.html @rm -frv doc
@@ -25,7 +42,7 @@ clean: @rm -frv ${PKGNAME}-* @echo "Finished cleanup." -cleanall: clean +cleanall: clean cleandoc @rm -frv dist release: build/release-stamp
Signature · 1 line
2.7.4
PATCH 2/2 nvmetcli: add python-six to rpm package building
In reply to Jay FreyenseeQuoted 1 line
From experience, if python-six isn't installed on a Fedora
system, hard-to-decipher errors can occur trying to use nvmetcli.
Signed-off-by Jay Freyensee <james_p_freyensee at linux.intel.com>
--- rpm/nvmetcli.spec.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
rpm/nvmetcli.spec.tmpl +1 -1
@@ -9,7 +9,7 @@ Source: nvmetcli-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-rpmroot BuildArch: noarch BuildRequires: python-devel python-setuptools systemd-units -Requires: python-configshell python-kmod +Requires: python-configshell python-kmod python-six Requires(post): systemd Requires(preun): systemd Requires(postun): systemd
Signature · 1 line
2.7.4
cover nvmetcli manpage and misc tweaks.
In reply to Jay FreyenseeThanks a lot Jay!
I've applied your patches and also updated REAMDE to not duplicate the man page.