3 include .
/pve-doc-generator.mk
5 GEN_PACKAGE
=pve-doc-generator
7 MEDIAWIKI_PACKAGE
=pve-docs-mediawiki
9 # also update debian/changelog
12 GITVERSION
:=$(shell cat .git
/refs
/heads
/master
)
14 ARCH
:=$(shell dpkg-architecture
-qDEB_BUILD_ARCH
)
16 GEN_DEB
=${GEN_PACKAGE}_
${DOCRELEASE}-${PKGREL}_
${ARCH}.deb
17 DOC_DEB
=${DOC_PACKAGE}_
${DOCRELEASE}-${PKGREL}_all.deb
18 MEDIAWIKI_DEB
=${MEDIAWIKI_PACKAGE}_
${DOCRELEASE}-${PKGREL}_all.deb
69 CONFIG_LIST
=datacenter.cfg qm.conf pct.conf
72 pve-doc-generator.mk \
74 $(addsuffix .adoc
, ${COMMAND_LIST}) \
75 $(addsuffix .adoc
, ${SERVICE_LIST}) \
76 $(addsuffix .adoc
, ${CONFIG_LIST}) \
77 pve-storage-dir.adoc \
78 pve-storage-glusterfs.adoc \
79 pve-storage-iscsi.adoc \
80 pve-storage-iscsidirect.adoc \
81 pve-storage-lvm.adoc \
82 pve-storage-lvmthin.adoc \
83 pve-storage-nfs.adoc \
84 pve-storage-rbd.adoc \
85 pve-storage-zfspool.adoc \
91 gen-datacenter.cfg
.5-opts.pl \
92 gen-pct.conf
.5-opts.pl \
93 gen-pct-network-opts.pl \
94 gen-pct-mountpoint-opts.pl \
95 gen-qm.conf
.5-opts.pl \
96 gen-vzdump.conf
.5-opts.pl \
97 gen-pve-firewall-cluster-opts.pl \
98 gen-pve-firewall-host-opts.pl \
99 gen-pve-firewall-macros-adoc.pl \
100 gen-pve-firewall-rules-opts.pl \
101 gen-pve-firewall-vm-opts.pl
103 INSTALLATION_SOURCES
= \
105 pve-system-requirements.adoc \
106 pve-installation.adoc
111 system-software-updates \
116 $(addsuffix .adoc
, ${SYSADMIN_PARTS}) \
119 API_VIEWER_SOURCES
= \
120 api-viewer
/index.html \
123 PVE_ADMIN_GUIDE_SOURCES
= \
124 ${DATACENTER_CONF_MAN5_SOURCES} \
125 ${QM_CONF_MAN5_SOURCES} \
126 ${PCT_CONF_MAN5_SOURCES} \
127 ${SYSADMIN_SOURCES} \
128 pve-admin-guide.adoc \
131 ${INSTALLATION_SOURCES} \
135 ${PVE_FIREWALL_MAN8_SOURCES} \
136 ${PVESM_MAN1_SOURCES} \
137 ${PCT_MAN1_SOURCES} \
138 ${PVECM_MAN1_SOURCES} \
139 ${PVEUM_MAN1_SOURCES} \
141 ${QMRESTORE_MAN1_SOURCES} \
142 ${HA_MANAGER_MAN1_SOURCES} \
143 ${PVESTATD_MAN8_SOURCES} \
144 ${PVEDAEMON_MAN8_SOURCES} \
145 ${PVEPROXY_MAN8_SOURCES} \
146 ${SPICEPROXY_MAN8_SOURCES} \
147 ${PVE_HA_CRM_MAN8_SOURCES} \
148 ${PVE_HA_LRM_MAN8_SOURCES} \
149 ${VZDUMP_MAN1_SOURCES} \
150 ${PVEAM_MAN1_SOURCES} \
151 ${PVESUBSCRIPTION_MAN1_SOURCES} \
152 ${PVECEPH_MAN1_SOURCES} \
153 pve-bibliography.adoc \
154 $(addsuffix .adoc
, ${COMMAND_LIST}) \
155 $(addsuffix .adoc
, ${SERVICE_LIST}) \
156 $(addsuffix .adoc
, ${CONFIG_LIST}) \
160 link-refs.json
: scan-adoc-refs
${PVE_ADMIN_GUIDE_SOURCES}
161 .
/scan-adoc-refs
${PVE_ADMIN_GUIDE_SOURCES} >link-refs.json
163 asciidoc-pve
: asciidoc-pve.in link-refs.json
164 cat asciidoc-pve.in link-refs.json
>asciidoc-pve.tmp
165 chmod
+x asciidoc-pve.tmp
166 mv asciidoc-pve.tmp asciidoc-pve
169 section-pve-usbstick-plain.html \
170 section-getting-help-plain.html \
171 section-pve-system-requirements-plain.html \
172 $(addsuffix -plain.html
, $(addprefix sysadmin-
, ${SYSADMIN_PARTS})) \
173 $(addsuffix -plain.html
, $(addprefix chapter-
, ${CHAPTER_LIST})) \
174 $(addsuffix .5-plain.html
, ${CONFIG_LIST}) \
175 $(addsuffix -plain.html
, $(addprefix pve-storage-
, ${STORAGE_TYPES}))
178 pve-admin-guide.pdf \
179 pve-admin-guide.html \
180 pve-admin-guide.epub \
181 $(addsuffix .1.html
, ${COMMAND_LIST}) \
182 $(addsuffix .8.html
, ${SERVICE_LIST}) \
183 $(addsuffix .5.html
, ${CONFIG_LIST}) \
184 $(addsuffix .html
, $(addprefix chapter-
, ${CHAPTER_LIST}))
186 ADOC_STDARG
= -a icons
-a data-uri
-a
"date=$(shell date)" -a
"revnumber=${DOCRELEASE}"
187 ADOC_MAN1_HTML_ARGS
=-a
"manvolnum=1" ${ADOC_STDARG}
188 ADOC_MAN5_HTML_ARGS
=-a
"manvolnum=5" ${ADOC_STDARG}
189 ADOC_MAN8_HTML_ARGS
=-a
"manvolnum=8" ${ADOC_STDARG}
195 %-nwdiag.svg
: %.nwdiag
196 nwdiag
-T svg
$*.nwdiag
-o
$@
;
198 sysadmin-
%-plain.html
: %.adoc
199 asciidoc
-s
-a wiki
-a
'leveloffset=-1' ${ADOC_STDARG} -o
$@
$*.adoc
201 section-
%-plain.html
: %.adoc
202 asciidoc
-s
-a wiki
-a
'leveloffset=-1' ${ADOC_STDARG} -o
$@
$*.adoc
204 chapter-sysadmin.html chapter-sysadmin-plain.html
: ${SYSADMIN_SOURCES}
206 chapter-
%.html
: %.adoc
${PVE_COMMON_DOC_SOURCES}
207 asciidoc
${ADOC_STDARG} -a toc
-o
$@
$*.adoc
209 chapter-
%-plain.html
: %.adoc
${PVE_COMMON_DOC_SOURCES}
210 asciidoc
-s
-a wiki
${ADOC_STDARG} -o
$@
$*.adoc
212 pve-storage-
%-plain.html
: pve-storage-
%.adoc
${PVE_COMMON_DOC_SOURCES}
213 asciidoc
-s
-a wiki
-a
'leveloffset=-1' ${ADOC_STDARG} -o
$@ pve-storage-
$*.adoc
215 %.1.html
: %.adoc
%.1-synopsis.adoc
${PVE_COMMON_DOC_SOURCES}
216 asciidoc
${ADOC_MAN1_HTML_ARGS} -o
$@
$*.adoc
218 pmxcfs
.8.html
: pmxcfs.adoc pmxcfs
.8-cli.adoc
${PVE_COMMON_DOC_SOURCES}
219 asciidoc
${ADOC_MAN8_HTML_ARGS} -o
$@ pmxcfs.adoc
221 %.8.html
: %.adoc
%.8-synopsis.adoc
${PVE_COMMON_DOC_SOURCES}
222 asciidoc
${ADOC_MAN8_HTML_ARGS} -o
$@
$*.adoc
224 %.5.html
: %.adoc
%.5-opts.adoc
${PVE_COMMON_DOC_SOURCES}
225 asciidoc
${ADOC_MAN5_HTML_ARGS} -o
$@
$*.adoc
227 %.5-plain.html
: %.adoc
%.5-opts.adoc
${PVE_COMMON_DOC_SOURCES}
228 asciidoc
-s
${ADOC_MAN5_HTML_ARGS} -o
$@
$*.adoc
230 README.html
: README.adoc
231 asciidoc
${ADOC_STDARG} -o
$@
$<
235 $(BROWSER
) index.html
&
237 index.html
: index.adoc
${API_VIEWER_SOURCES} ${INDEX_INCLUDES}
238 asciidoc
-a
"date=$(shell date)" -a
"revnumber=${DOCRELEASE}" index.adoc
240 pve-admin-guide.html
: ${PVE_ADMIN_GUIDE_SOURCES}
241 asciidoc
-a pvelogo
-a
"revnumber=${DOCRELEASE}" -a
"date=$(shell date)" pve-admin-guide.adoc
243 pve-admin-guide.chunked
: ${PVE_ADMIN_GUIDE_SOURCES}
244 rm -rf pve-admin-guide.chunked
245 a2x
-a docinfo
-a docinfo1
-a icons
-f chunked pve-admin-guide.adoc
247 pve-admin-guide.pdf
: ${PVE_ADMIN_GUIDE_SOURCES} docinfo.xml pve-admin-guide-docinfo.xml
248 inkscape
-z
-D
--export-pdf
=proxmox-logo.pdf images
/proxmox-logo.svg
249 inkscape
-z
-D
--export-pdf
=proxmox-ci-header.pdf images
/proxmox-ci-header.svg
250 grep
">Release ${DOCRELEASE}<" pve-admin-guide-docinfo.xml ||
(echo
"wrong release in pve-admin-guide-docinfo.xml" && false
);
251 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" --dblatex-opts
"-P doc.publisher.show=0 -s asciidoc-dblatex-custom.sty" pve-admin-guide.adoc
252 rm proxmox-logo.pdf proxmox-ci-header.pdf
254 pve-admin-guide.epub
: ${PVE_ADMIN_GUIDE_SOURCES}
255 a2x
-f epub pve-admin-guide.adoc
257 api-viewer
/apidata.js
: extractapi.pl
260 api-viewer
/apidoc.js
: api-viewer
/apidata.js api-viewer
/PVEAPI.js
261 cat api-viewer
/apidata.js api-viewer
/PVEAPI.js
>$@
264 dinstall
: ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB}
265 dpkg
-i
${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB}
269 rm -f
${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB};
270 make
${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB};
272 ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB}: index.html
${INDEX_INCLUDES} ${WIKI_IMPORTS} ${API_VIEWER_SOURCES} ${GEN_DEB_SOURCES}
275 rsync
-a debian
/ build
/debian
276 echo
"git clone git://git.proxmox.com/git/pve-docs.git\\ngit checkout ${GITVERSION}" > build
/debian
/SOURCE
277 # install files for pve-doc-generator package
278 mkdir
-p build
/usr
/share
/${GEN_PACKAGE}
279 mkdir
-p build
/usr
/share
/doc
/${GEN_PACKAGE}
280 install -m
0644 ${GEN_DEB_SOURCES} build
/usr
/share
/${GEN_PACKAGE}
281 install -m
0755 ${GEN_SCRIPTS} build
/usr
/share
/${GEN_PACKAGE}
282 # install files for pvedocs package
283 mkdir
-p build
/usr
/share
/${DOC_PACKAGE}
284 mkdir
-p build
/usr
/share
/doc
/${DOC_PACKAGE}
285 install -m
0644 index.html
${INDEX_INCLUDES} build
/usr
/share
/${DOC_PACKAGE}
286 install -m
0644 ${WIKI_IMPORTS} build
/usr
/share
/${DOC_PACKAGE}
287 # install api doc viewer
288 mkdir build
/usr
/share
/${DOC_PACKAGE}/api-viewer
289 install -m
0644 ${API_VIEWER_SOURCES} build
/usr
/share
/${DOC_PACKAGE}/api-viewer
290 # build Debian packages
291 cd build
; dpkg-buildpackage
-rfakeroot
-b
-us
-uc
294 lintian
${MEDIAWIKI_DEB}
297 upload
: ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB}
298 tar cf
- ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB} | ssh repoman@repo.proxmox.com upload
302 rm -f
*.5-opts.adoc
*.1-synopsis.adoc
*.8-synopsis.adoc
303 rm -f api-viewer
/apidata.js
304 rm -f pve-firewall-macros.adoc pct-network-opts.adoc pct-mountpoint-opts.adoc
308 rm -rf
*.tmp.xml
*.html
*.pdf
*.epub
*.tmp
*.1 *.5 *.8 *.deb
*.changes build api-viewer
/apidoc.js chapter-
*.html chapter-
*-plain.html chapter-
*.html pve-admin-guide.chunked asciidoc-pve link-refs.json
309 find .
-name
'*~' -exec
rm {} ';'