]> git.proxmox.com Git - pve-client.git/commitdiff
add a manual page
authorDietmar Maurer <dietmar@proxmox.com>
Mon, 18 Jun 2018 08:32:14 +0000 (10:32 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 18 Jun 2018 08:37:19 +0000 (10:37 +0200)
Makefile
debian/control
pveclient
pveclient.adoc [new file with mode: 0644]

index 0529606021338693df868120df91ac7f68dd674f..c5fe801d6b12e2cdfb8f0a48c4ad6c434e6bdffe 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -8,6 +8,7 @@ DESTDIR=
 
 PERL5_DIR=${DESTDIR}/usr/share/perl5
 LIB_DIR=${DESTDIR}/usr/share/${PACKAGE}
 
 PERL5_DIR=${DESTDIR}/usr/share/perl5
 LIB_DIR=${DESTDIR}/usr/share/${PACKAGE}
+MAN1DIR=${DESTDIR}//usr/share/man/man1
 DOCDIR=${DESTDIR}/usr/share/doc/${PACKAGE}
 BASHCOMPLDIR=${DESTDIR}/usr/share/bash-completion/completions/
 
 DOCDIR=${DESTDIR}/usr/share/doc/${PACKAGE}
 BASHCOMPLDIR=${DESTDIR}/usr/share/bash-completion/completions/
 
@@ -40,7 +41,14 @@ deb ${DEB}:
        cd build; dpkg-buildpackage -rfakeroot -b -us -uc
        lintian ${DEB}
 
        cd build; dpkg-buildpackage -rfakeroot -b -us -uc
        lintian ${DEB}
 
-install:  pve-api-definition.dat
+pveclient.1-synopsis.adoc: pveclient ${PVE_CLIENT_SOURCES}
+       perl -I. ./pveclient printsynopsis > $@.tmp
+       mv $@.tmp $@
+
+pveclient.1: pveclient.1-synopsis.adoc
+       a2x -f manpage pveclient.adoc
+
+install:  pve-api-definition.dat pveclient.1
        install -d -m 0755 ${PERL5_DIR}/PVE/APIClient
        # install library tools from pve-common
        for i in ${PVE_COMMON_FILES}; do install -m 0644 PVE/APIClient/$$i ${PERL5_DIR}/PVE/APIClient; done
        install -d -m 0755 ${PERL5_DIR}/PVE/APIClient
        # install library tools from pve-common
        for i in ${PVE_COMMON_FILES}; do install -m 0644 PVE/APIClient/$$i ${PERL5_DIR}/PVE/APIClient; done
@@ -49,7 +57,9 @@ install:  pve-api-definition.dat
        install -D -m 0644 pve-api-definition.dat ${LIB_DIR}/pve-api-definition.dat
        install -D -m 0755 pveclient ${DESTDIR}/usr/bin/pveclient
        install -D -m 0644 pveclient.bash-completion ${BASHCOMPLDIR}/pveclient
        install -D -m 0644 pve-api-definition.dat ${LIB_DIR}/pve-api-definition.dat
        install -D -m 0755 pveclient ${DESTDIR}/usr/bin/pveclient
        install -D -m 0644 pveclient.bash-completion ${BASHCOMPLDIR}/pveclient
-
+       # install manual page
+       install -D -m 0644 pveclient.1 ${MAN1DIR}/pveclient.1
+       gzip -9 ${MAN1DIR}/pveclient.1
 
 update-pve-common:
        for i in ${PVE_COMMON_FILES}; do cp ../pve-common/src/PVE/$$i PVE/APIClient/; done
 
 update-pve-common:
        for i in ${PVE_COMMON_FILES}; do cp ../pve-common/src/PVE/$$i PVE/APIClient/; done
@@ -70,6 +80,7 @@ distclean: clean
 
 clean:
        rm -rf ./build *.deb *.changes *.buildinfo
 
 clean:
        rm -rf ./build *.deb *.changes *.buildinfo
+       rm pveclient.1-synopsis.adoc pveclient.1
        find . -name '*~' -exec rm {} ';'
 
 .PHONY: dinstall
        find . -name '*~' -exec rm {} ';'
 
 .PHONY: dinstall
index faf58262036c19ccfef11cfd7fdaa5854c770d1e..f23ebcfc131847fe91b7e8e6721d7058391130e1 100644 (file)
@@ -3,6 +3,7 @@ Section: perl
 Priority: optional
 Maintainer: Proxmox Support Team <support@proxmox.com>
 Build-Depends: debhelper (>= 9),
 Priority: optional
 Maintainer: Proxmox Support Team <support@proxmox.com>
 Build-Depends: debhelper (>= 9),
+              asciidoc-base,
                perl (>= 5.10.0-19),
 Standards-Version: 3.9.5
 Homepage: http://www.proxmox.com
                perl (>= 5.10.0-19),
 Standards-Version: 3.9.5
 Homepage: http://www.proxmox.com
index 9177db68160fc31d10a0284a59ebf7f18b027b99..d13b7eb685001153d305999f4f1d65b408b6c4a3 100755 (executable)
--- a/pveclient
+++ b/pveclient
@@ -198,4 +198,11 @@ our $cmddef = {
 };
 
 
 };
 
 
+if ($cmd && $cmd eq 'printsynopsis') {
+
+    print __PACKAGE__->generate_asciidoc_synopsis();
+
+    exit(0);
+}
+
 __PACKAGE__->run_cli_handler();
 __PACKAGE__->run_cli_handler();
diff --git a/pveclient.adoc b/pveclient.adoc
new file mode 100644 (file)
index 0000000..b52a13b
--- /dev/null
@@ -0,0 +1,51 @@
+pveclient(1)
+============
+
+NAME
+----
+
+pveclient - Command line tool to manage Proxmox VE
+
+
+SYNOPSIS
+--------
+
+include::pveclient.1-synopsis.adoc[]
+
+
+DESCRIPTION
+-----------
+
+TODO
+
+
+Files
+-----
+
+`~/.config/pveclient/config`::
+
+Main configuration file used to store remotes.
+
+`~/.config/pveclient/.tickets`::
+
+Cache to store authentification tickets.
+
+
+Copyright and Disclaimer
+------------------------
+
+Copyright (C) 2018 Proxmox Server Solutions GmbH
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as
+published by the Free Software Foundation, either version 3 of the
+License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public
+License along with this program.  If not, see
+http://www.gnu.org/licenses/