]> git.proxmox.com Git - proxmox-backup.git/commitdiff
start generating manual pages
authorDietmar Maurer <dietmar@proxmox.com>
Sun, 24 Feb 2019 08:51:10 +0000 (09:51 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Sun, 24 Feb 2019 09:18:38 +0000 (10:18 +0100)
Depend on docutils-doc

Makefile
debian/control
defines.mk
docs/Makefile [new file with mode: 0644]
docs/pbs-copyright.rst [new file with mode: 0644]
docs/proxmox-backup-client/description.rst [new file with mode: 0644]
docs/proxmox-backup-client/man1.rst [new file with mode: 0644]

index e31417a4696e304703bf0d7cf4979c4e41a2ccc4..1a5c17507c0a9e9a37fb32a8a89331c2c3f9d9bd 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@ include defines.mk
 ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
 GITVERSION:=$(shell git rev-parse HEAD)
 
-SUBDIRS := etc www
+SUBDIRS := etc www docs
 
 # Binaries usable by users
 USR_BIN := \
@@ -87,6 +87,9 @@ clean:
 dinstall: ${DEB}
        dpkg -i ${DEB}
 
+# make sure we build binaries before docs
+docs: cargo-build
+
 .PHONY: cargo-build
 cargo-build:
        cargo build $(CARGO_BUILD_ARGS)
@@ -104,3 +107,4 @@ install: $(COMPILED_BINS)
        $(foreach i,$(SERVICE_BIN), \
            install -m755 $(COMPILEDIR)/$(i) $(DESTDIR)$(LIBEXECDIR)/proxmox-backup/ ;)
        $(MAKE) -C www install
+       $(MAKE) -C docs install
index ad71012a8a6237d380b9002d9fb75f4a7d6ee755..977870de115caa154f2bc7bd07977f9bc402eba0 100644 (file)
@@ -6,6 +6,7 @@ Build-Depends: bash-completion,
                debhelper (>= 10),
                libpam0g-dev,
                pkg-config,
+              docutils-doc,
 Standards-Version: 3.9.5
 Homepage: https://www.proxmox.com
 
index 3cc60cc1180e3fbeabc4b225fb2977415a28cd2e..142e1384cf04897983fa65d40cea60834a303960 100644 (file)
@@ -8,6 +8,7 @@ SBINDIR := $(PREFIX)/sbin
 LIBDIR := $(PREFIX)/lib
 LIBEXECDIR := $(LIBDIR)
 DATAROOTDIR := $(PREFIX)/share
+MAN1DIR := $(PREFIX)/share/man/man1
 JSDIR := $(DATAROOTDIR)/javascript/proxmox-backup
 SYSCONFDIR := /etc
 
diff --git a/docs/Makefile b/docs/Makefile
new file mode 100644 (file)
index 0000000..00ca722
--- /dev/null
@@ -0,0 +1,23 @@
+include ../defines.mk
+
+ifeq ($(BUILD_MODE), release)
+COMPILEDIR := ../target/release
+else
+COMPILEDIR := ../target/debug
+endif
+
+##UNITS:= proxmox-backup-client
+
+proxmox-backup-client.1: proxmox-backup-client/man1.rst ${COMPILEDIR}/proxmox-backup-client
+       ${COMPILEDIR}/proxmox-backup-client printdoc > proxmox-backup-client/synopsis.rst
+       rst2man $< >$@
+
+all: proxmox-backup-client.1
+
+
+clean:
+       rm -f *.1 */synopsis.rst
+
+install: proxmox-backup-client.1
+       install -dm755 $(DESTDIR)$(MAN1DIR)
+       install -m755  proxmox-backup-client.1 $(DESTDIR)$(MAN1DIR)/
diff --git a/docs/pbs-copyright.rst b/docs/pbs-copyright.rst
new file mode 100644 (file)
index 0000000..cdab177
--- /dev/null
@@ -0,0 +1,18 @@
+Copyright and Disclaimer
+========================
+
+Copyright (C) 2007-2019 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/
diff --git a/docs/proxmox-backup-client/description.rst b/docs/proxmox-backup-client/description.rst
new file mode 100644 (file)
index 0000000..c259fa9
--- /dev/null
@@ -0,0 +1,4 @@
+This is just a test.
+
+.. NOTE: No further info.
+
diff --git a/docs/proxmox-backup-client/man1.rst b/docs/proxmox-backup-client/man1.rst
new file mode 100644 (file)
index 0000000..5734c89
--- /dev/null
@@ -0,0 +1,28 @@
+==========================
+proxmox-backup-client
+==========================
+
+.. |VERSION| replace:: 1.0
+
+-------------------------------------------------------------
+Command line toot for Backup and Restore
+-------------------------------------------------------------
+
+:Author:    Proxmox Support Team <support@proxmox.com>
+:Version:   Version |VERSION|
+:Manual section: 1
+
+
+Synopsis
+==========
+
+.. include:: synopsis.rst
+
+Description
+============
+
+.. include:: description.rst
+
+
+.. include:: ../pbs-copyright.rst
+