add spiceproxy man page
[pve-docs.git] / Makefile
CommitLineData
bef0c1b4
DM
1DGDIR=.
2
3include ./pve-doc-generator.mk
deb7f2ea 4
9344ee0d
DM
5PACKAGE=pve-doc-generator
6
7# also update debian/changelog
8PKGREL=1
9
b4f3c18a
DM
10GITVERSION:=$(shell cat .git/refs/heads/master)
11
bef0c1b4 12DEB=${PACKAGE}_${DOCRELEASE}-${PKGREL}_amd64.deb
9344ee0d 13
672abac1
DM
14COMMAND_LIST=pvecm qm qmrestore pct pveam pvesm pveum vzdump ha-manager
15
96f2beeb
DM
16SERVICE_LIST= \
17 pve-firewall \
18 pve-ha-crm \
19 pve-ha-lrm \
20 pvestatd \
21 pmxcfs \
22 pveproxy \
2d8f1c92 23 spiceproxy \
96f2beeb 24 pvedaemon
672abac1
DM
25
26CONFIG_LIST=datacenter.cfg qm.conf pct.conf
27
28DEB_SOURCES= \
29 pve-doc-generator.mk \
30 attributes.txt \
31 $(addsuffix .adoc, ${COMMAND_LIST}) \
32 $(addsuffix .adoc, ${SERVICE_LIST}) \
33 $(addsuffix .adoc, ${CONFIG_LIST}) \
34 pve-storage-dir.adoc \
35 pve-storage-glusterfs.adoc \
36 pve-storage-iscsi.adoc \
37 pve-storage-iscsidirect.adoc \
38 pve-storage-lvm.adoc \
39 pve-storage-nfs.adoc \
40 pve-storage-rbd.adoc \
41 pve-storage-zfspool.adoc \
bd88f9d9 42 pmxcfs.8-cli.adoc \
672abac1 43 pve-copyright.adoc \
9344ee0d
DM
44 docinfo.xml
45
46GEN_SCRIPTS= \
f6b81378
DM
47 gen-datacenter.cfg.5-opts.pl \
48 gen-pct.conf.5-opts.pl \
9b4799ab 49 gen-qm.conf.5-opts.pl \
9344ee0d
DM
50 gen-pve-firewall-cluster-opts.pl \
51 gen-pve-firewall-host-opts.pl \
52 gen-pve-firewall-macros-adoc.pl \
53 gen-pve-firewall-rules-opts.pl \
f6b81378 54 gen-pve-firewall-vm-opts.pl
9344ee0d 55
deb7f2ea 56VZDUMP_SOURCES=attributes.txt vzdump.adoc vzdump.1-synopsis.adoc
d61bab51 57PVEAM_SOURCES=attributes.txt pveam.adoc pveam.1-synopsis.adoc
deb7f2ea 58
672abac1
DM
59SYSADMIN_SOURCES= \
60 getting-help.adoc \
61 pve-package-repos.adoc \
62 pve-installation.adoc \
63 system-software-updates.adoc \
d91f8c1e
DM
64 sysadmin.adoc
65
672abac1
DM
66PVE_ADMIN_GUIDE_SOURCES= \
67 ${DATACENTER_CONF_MAN5_SOURCES} \
68 ${QM_CONF_MAN5_SOURCES} \
69 ${PCT_CONF_MAN5_SOURCES} \
70 ${SYSADMIN_SOURCES} \
71 pve-admin-guide.adoc \
72 pve-intro.adoc \
73 pmxcfs.adoc \
bd88f9d9 74 pmxcfs.8-cli.adoc \
672abac1
DM
75 pve-faq.adoc \
76 ${PVE_FIREWALL_MAN8_SOURCES} \
77 ${PVESM_MAN1_SOURCES} \
78 ${PCT_MAN1_SOURCES} \
79 ${PVECM_MAN1_SOURCES} \
80 ${PVEUM_MAN1_SOURCES} \
81 ${QM_MAN1_SOURCES} \
82 ${QMRESTORE_MAN1_SOURCES} \
83 ${HA_MANAGER_MAN1_SOURCES} \
2d8f1c92
DM
84 ${PVESTATD_MAN8_SOURCES} \
85 ${PVEDAEMON_MAN8_SOURCES} \
86 ${PVEPROXY_MAN8_SOURCES} \
87 ${SPICEPROXY_MAN8_SOURCES} \
672abac1
DM
88 ${PVE_HA_CRM_MAN8_SOURCES} \
89 ${PVE_HA_LRM_MAN8_SOURCES} \
90 ${PVEAM_SOURCES} \
91 ${VZDUMP_SOURCES} \
92 images/cluster-nwdiag.svg \
93 images/node-nwdiag.svg \
94 pve-bibliography.adoc \
95 $(addsuffix .adoc, ${COMMAND_LIST}) \
96 $(addsuffix .adoc, ${SERVICE_LIST}) \
97 $(addsuffix .adoc, ${CONFIG_LIST}) \
98 GFDL.adoc \
deb7f2ea
DM
99 attributes.txt
100
101ADOC_STDARG= -a icons -a data-uri -a "date=$(shell date)"
bef0c1b4
DM
102ADOC_MAN1_HTML_ARGS=-a "manvolnum=1" ${ADOC_STDARG} -a "revnumber=${DOCRELEASE}"
103ADOC_MAN5_HTML_ARGS=-a "manvolnum=5" ${ADOC_STDARG} -a "revnumber=${DOCRELEASE}"
104ADOC_MAN8_HTML_ARGS=-a "manvolnum=8" ${ADOC_STDARG} -a "revnumber=${DOCRELEASE}"
deb7f2ea 105
fc1090ef 106BROWSER?=xdg-open
df41beec 107
7b2c36ae
DM
108all: pve-admin-guide.html
109
deb7f2ea
DM
110%-nwdiag.svg: %.nwdiag
111 nwdiag -T svg $*.nwdiag -o $@;
112
bd88f9d9 113%.1.html: %.adoc %.1-synopsis.adoc ${PVE_COMMON_DOC_SOURCES}
deb7f2ea 114 asciidoc ${ADOC_MAN1_HTML_ARGS} -o $@ $*.adoc
9344ee0d 115 test -n "$${NOVIEW}" || $(BROWSER) $@ &
deb7f2ea
DM
116
117
7c40c631
DM
118pmxcfs.8.html: pmxcfs.adoc pmxcfs.8-cli.adoc ${PVE_COMMON_DOC_SOURCES}
119 asciidoc ${ADOC_MAN8_HTML_ARGS} -o $@ pmxcfs.adoc
120 test -n "$${NOVIEW}" || $(BROWSER) $@ &
deb7f2ea 121
7c40c631 122%.8.html: %.adoc %.8-synopsis.adoc ${PVE_COMMON_DOC_SOURCES}
deb7f2ea 123 asciidoc ${ADOC_MAN8_HTML_ARGS} -o $@ $*.adoc
9344ee0d 124 test -n "$${NOVIEW}" || $(BROWSER) $@ &
71e16346 125
7c40c631 126%.5.html: %.adoc %.5-opts.adoc ${PVE_COMMON_DOC_SOURCES}
c016ebb7 127 asciidoc ${ADOC_MAN5_HTML_ARGS} -o $@ $*.adoc
9344ee0d 128 test -n "$${NOVIEW}" || $(BROWSER) $@ &
c016ebb7 129
deb7f2ea
DM
130index.html: index.adoc ${PVE_ADMIN_GUIDE_SOURCES}
131 $(MAKE) NOVIEW=1 pve-admin-guide.pdf pve-admin-guide.html pve-admin-guide.epub
672abac1 132 $(MAKE) NOVIEW=1 $(addsuffix .1.html, ${COMMAND_LIST}) $(addsuffix .8.html, ${SERVICE_LIST}) $(addsuffix .5.html, ${CONFIG_LIST})
bef0c1b4 133 asciidoc -a "date=$(shell date)" -a "revnumber=${DOCRELEASE}" index.adoc
9344ee0d 134 test -n "$${NOVIEW}" || $(BROWSER) index.html &
deb7f2ea
DM
135
136pve-admin-guide.html: ${PVE_ADMIN_GUIDE_SOURCES}
bef0c1b4 137 asciidoc -a "revnumber=${DOCRELEASE}" -a "date=$(shell date)" pve-admin-guide.adoc
9344ee0d 138 test -n "$${NOVIEW}" || $(BROWSER) $@ &
deb7f2ea 139
2296c490 140pve-admin-guide.pdf: ${PVE_ADMIN_GUIDE_SOURCES} docinfo.xml pve-admin-guide-docinfo.xml
bef0c1b4 141 grep ">Release ${DOCRELEASE}<" pve-admin-guide-docinfo.xml || (echo "wrong release in pve-admin-guide-docinfo.xml" && false);
27125931 142 a2x -a docinfo -a docinfo1 -f pdf -L --dblatex-opts "-P latex.output.revhistory=0" --dblatex-opts "-P latex.class.options=12pt" --dblatex-opts "-P doc.section.depth=2 -P toc.section.depth=2" pve-admin-guide.adoc
9344ee0d 143 test -n "$${NOVIEW}" || $(BROWSER) $@ &
deb7f2ea
DM
144
145pve-admin-guide.epub: ${PVE_ADMIN_GUIDE_SOURCES}
146 a2x -f epub pve-admin-guide.adoc
9344ee0d
DM
147 test -n "$${NOVIEW}" || $(BROWSER) $@ &
148
149.PHONY: dinstall
150dinstall: ${DEB}
151 dpkg -i ${DEB}
152
153.PHONY: deb
154${DEB} deb:
155 rm -rf build
156 mkdir build
157 rsync -a debian/ build/debian
158 mkdir -p build/usr/share/${PACKAGE}
b4f3c18a
DM
159 mkdir -p build/usr/share/doc/${PACKAGE}
160 echo "git clone git://git.proxmox.com/git/pve-docs.git\\ngit checkout ${GITVERSION}" > build/usr/share/doc/${PACKAGE}/SOURCE
9344ee0d
DM
161 install -m 0644 ${DEB_SOURCES} build/usr/share/${PACKAGE}
162 install -m 0755 ${GEN_SCRIPTS} build/usr/share/${PACKAGE}
163 cd build; dpkg-buildpackage -rfakeroot -b -us -uc
164 lintian ${DEB}
165
89e93b38
DM
166.PHONY: upload
167upload: ${DEB}
168 umount /pve/${DOCRELEASE}; mount /pve/${DOCRELEASE} -o rw
169 mkdir -p /pve/${DOCRELEASE}/extra
170 rm -f /pve/${DOCRELEASE}/extra/${PACKAGE}_*.deb
171 rm -f /pve/${DOCRELEASE}/extra/Packages*
172 cp ${DEB} /pve/${DOCRELEASE}/extra
173 cd /pve/${DOCRELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz
174 umount /pve/${DOCRELEASE}; mount /pve/${DOCRELEASE} -o ro
deb7f2ea 175
c016ebb7
DM
176update: clean
177 rm -f *.5-opts.adoc .1-synopsis.adoc .8-synopsis.adoc
178 make all
deb7f2ea
DM
179
180clean:
9344ee0d
DM
181 rm -rf *~ *.html *.pdf *.epub *.tmp *.1 *.5 *.8 *.deb *.changes build
182