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
70 CONFIG_LIST
=datacenter.cfg qm.conf pct.conf
73 pve-doc-generator.mk \
75 $(addsuffix .adoc
, ${COMMAND_LIST}) \
76 $(addsuffix .adoc
, ${SERVICE_LIST}) \
77 $(addsuffix .adoc
, ${CONFIG_LIST}) \
78 pve-storage-dir.adoc \
79 pve-storage-glusterfs.adoc \
80 pve-storage-iscsi.adoc \
81 pve-storage-iscsidirect.adoc \
82 pve-storage-lvm.adoc \
83 pve-storage-lvmthin.adoc \
84 pve-storage-nfs.adoc \
85 pve-storage-rbd.adoc \
86 pve-storage-zfspool.adoc \
92 gen-datacenter.cfg
.5-opts.pl \
93 gen-pct.conf
.5-opts.pl \
94 gen-pct-network-opts.pl \
95 gen-pct-mountpoint-opts.pl \
96 gen-qm.conf
.5-opts.pl \
97 gen-vzdump.conf
.5-opts.pl \
98 gen-pve-firewall-cluster-opts.pl \
99 gen-pve-firewall-host-opts.pl \
100 gen-pve-firewall-macros-adoc.pl \
101 gen-pve-firewall-rules-opts.pl \
102 gen-pve-firewall-vm-opts.pl
104 INSTALLATION_SOURCES
= \
106 pve-system-requirements.adoc \
107 pve-installation.adoc
112 system-software-updates \
113 pve-disk-health-monitoring \
118 $(addsuffix .adoc
, ${SYSADMIN_PARTS}) \
121 API_VIEWER_SOURCES
= \
122 api-viewer
/index.html \
125 PVE_ADMIN_GUIDE_SOURCES
= \
126 ${DATACENTER_CONF_MAN5_SOURCES} \
127 ${QM_CONF_MAN5_SOURCES} \
128 ${PCT_CONF_MAN5_SOURCES} \
129 ${SYSADMIN_SOURCES} \
130 pve-admin-guide.adoc \
133 ${INSTALLATION_SOURCES} \
137 ${PVE_FIREWALL_MAN8_SOURCES} \
138 ${PVESM_MAN1_SOURCES} \
139 ${PCT_MAN1_SOURCES} \
140 ${PVECM_MAN1_SOURCES} \
141 ${PVEUM_MAN1_SOURCES} \
143 ${QMRESTORE_MAN1_SOURCES} \
144 ${HA_MANAGER_MAN1_SOURCES} \
145 ${PVESTATD_MAN8_SOURCES} \
146 ${PVEDAEMON_MAN8_SOURCES} \
147 ${PVEPROXY_MAN8_SOURCES} \
148 ${SPICEPROXY_MAN8_SOURCES} \
149 ${PVE_HA_CRM_MAN8_SOURCES} \
150 ${PVE_HA_LRM_MAN8_SOURCES} \
151 ${VZDUMP_MAN1_SOURCES} \
152 ${PVEAM_MAN1_SOURCES} \
153 ${PVESUBSCRIPTION_MAN1_SOURCES} \
154 ${PVECEPH_MAN1_SOURCES} \
155 ${PVEPERF_MAN1_SOURCES} \
156 pve-bibliography.adoc \
157 $(addsuffix .adoc
, ${COMMAND_LIST}) \
158 $(addsuffix .adoc
, ${SERVICE_LIST}) \
159 $(addsuffix .adoc
, ${CONFIG_LIST}) \
163 link-refs.json
: scan-adoc-refs
${PVE_ADMIN_GUIDE_SOURCES}
164 .
/scan-adoc-refs
${PVE_ADMIN_GUIDE_SOURCES} >link-refs.json
166 asciidoc-pve
: asciidoc-pve.in link-refs.json
167 cat asciidoc-pve.in link-refs.json
>asciidoc-pve.tmp
168 sed
-e s
/@RELEASE@
/${DOCRELEASE}/ -i asciidoc-pve.tmp
169 chmod
+x asciidoc-pve.tmp
170 mv asciidoc-pve.tmp asciidoc-pve
173 .
/asciidoc-pve compile-wiki-section pve-package-repos.adoc
174 #./asciidoc-pve compile-wiki-chapter ha-manager.adoc
177 section-pve-usbstick-plain.html \
178 section-getting-help-plain.html \
179 section-pve-system-requirements-plain.html \
180 $(addsuffix -plain.html
, $(addprefix sysadmin-
, ${SYSADMIN_PARTS})) \
181 $(addsuffix -plain.html
, $(addprefix chapter-
, ${CHAPTER_LIST})) \
182 $(addsuffix .5-plain.html
, ${CONFIG_LIST}) \
183 $(addsuffix -plain.html
, $(addprefix pve-storage-
, ${STORAGE_TYPES}))
186 pve-admin-guide.pdf \
187 pve-admin-guide.html \
188 pve-admin-guide.epub \
189 $(addsuffix .1.html
, ${COMMAND_LIST}) \
190 $(addsuffix .8.html
, ${SERVICE_LIST}) \
191 $(addsuffix .5.html
, ${CONFIG_LIST}) \
192 $(addsuffix .html
, $(addprefix chapter-
, ${CHAPTER_LIST}))
194 ADOC_STDARG
= -a icons
-a data-uri
-a
"date=$(shell date)" -a
"revnumber=${DOCRELEASE}"
195 ADOC_MAN1_HTML_ARGS
=-a
"manvolnum=1" ${ADOC_STDARG}
196 ADOC_MAN5_HTML_ARGS
=-a
"manvolnum=5" ${ADOC_STDARG}
197 ADOC_MAN8_HTML_ARGS
=-a
"manvolnum=8" ${ADOC_STDARG}
203 %-nwdiag.svg
: %.nwdiag
204 nwdiag
-T svg
$*.nwdiag
-o
$@
;
206 sysadmin-
%-plain.html
: asciidoc-pve
%.adoc
207 .
/asciidoc-pve compile-wiki-section
-o
$@
$*.adoc
209 section-
%-plain.html
: asciidoc-pve
%.adoc
210 .
/asciidoc-pve compile-wiki-section
-o
$@
$*.adoc
212 chapter-sysadmin.html chapter-sysadmin-plain.html
: ${SYSADMIN_SOURCES}
214 chapter-
%.html
: %.adoc
${PVE_COMMON_DOC_SOURCES}
215 asciidoc
${ADOC_STDARG} -a toc
-o
$@
$*.adoc
217 chapter-
%-plain.html
: %.adoc
${PVE_COMMON_DOC_SOURCES}
218 .
/asciidoc-pve compile-wiki-chapter
-o
$@
$*.adoc
220 pve-storage-
%-plain.html
: pve-storage-
%.adoc
${PVE_COMMON_DOC_SOURCES}
221 .
/asciidoc-pve compile-wiki-section
-o
$@ pve-storage-
$*.adoc
223 %.1.html
: %.adoc
%.1-synopsis.adoc
${PVE_COMMON_DOC_SOURCES}
224 asciidoc
${ADOC_MAN1_HTML_ARGS} -o
$@
$*.adoc
226 pmxcfs
.8.html
: pmxcfs.adoc pmxcfs
.8-cli.adoc
${PVE_COMMON_DOC_SOURCES}
227 asciidoc
${ADOC_MAN8_HTML_ARGS} -o
$@ pmxcfs.adoc
229 %.8.html
: %.adoc
%.8-synopsis.adoc
${PVE_COMMON_DOC_SOURCES}
230 asciidoc
${ADOC_MAN8_HTML_ARGS} -o
$@
$*.adoc
232 %.5.html
: %.adoc
%.5-opts.adoc
${PVE_COMMON_DOC_SOURCES}
233 asciidoc
${ADOC_MAN5_HTML_ARGS} -o
$@
$*.adoc
235 %.5-plain.html
: %.adoc
%.5-opts.adoc
${PVE_COMMON_DOC_SOURCES}
236 asciidoc
-s
${ADOC_MAN5_HTML_ARGS} -o
$@
$*.adoc
238 README.html
: README.adoc
239 asciidoc
${ADOC_STDARG} -o
$@
$<
243 $(BROWSER
) index.html
&
245 index.html
: index.adoc
${API_VIEWER_SOURCES} ${INDEX_INCLUDES}
246 asciidoc
-a
"date=$(shell date)" -a
"revnumber=${DOCRELEASE}" index.adoc
248 pve-admin-guide.html
: ${PVE_ADMIN_GUIDE_SOURCES}
249 asciidoc
-a pvelogo
-a
"revnumber=${DOCRELEASE}" -a
"date=$(shell date)" pve-admin-guide.adoc
251 pve-admin-guide.chunked
: ${PVE_ADMIN_GUIDE_SOURCES}
252 rm -rf pve-admin-guide.chunked
253 a2x
-a docinfo
-a docinfo1
-a icons
-f chunked pve-admin-guide.adoc
255 pve-admin-guide.pdf
: ${PVE_ADMIN_GUIDE_SOURCES} docinfo.xml pve-admin-guide-docinfo.xml
256 inkscape
-z
-D
--export-pdf
=proxmox-logo.pdf images
/proxmox-logo.svg
257 inkscape
-z
-D
--export-pdf
=proxmox-ci-header.pdf images
/proxmox-ci-header.svg
258 grep
">Release ${DOCRELEASE}<" pve-admin-guide-docinfo.xml ||
(echo
"wrong release in pve-admin-guide-docinfo.xml" && false
);
259 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
260 rm proxmox-logo.pdf proxmox-ci-header.pdf
262 pve-admin-guide.epub
: ${PVE_ADMIN_GUIDE_SOURCES}
263 a2x
-f epub pve-admin-guide.adoc
265 api-viewer
/apidata.js
: extractapi.pl
268 api-viewer
/apidoc.js
: api-viewer
/apidata.js api-viewer
/PVEAPI.js
269 cat api-viewer
/apidata.js api-viewer
/PVEAPI.js
>$@
272 dinstall
: ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB}
273 dpkg
-i
${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB}
277 rm -f
${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB};
278 make
${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB};
280 ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB}: index.html
${INDEX_INCLUDES} ${WIKI_IMPORTS} ${API_VIEWER_SOURCES} ${GEN_DEB_SOURCES}
283 rsync
-a debian
/ build
/debian
284 echo
"git clone git://git.proxmox.com/git/pve-docs.git\\ngit checkout ${GITVERSION}" > build
/debian
/SOURCE
285 # install files for pve-doc-generator package
286 mkdir
-p build
/usr
/share
/${GEN_PACKAGE}
287 mkdir
-p build
/usr
/share
/doc
/${GEN_PACKAGE}
288 install -m
0644 ${GEN_DEB_SOURCES} build
/usr
/share
/${GEN_PACKAGE}
289 install -m
0755 ${GEN_SCRIPTS} build
/usr
/share
/${GEN_PACKAGE}
290 # install files for pvedocs package
291 mkdir
-p build
/usr
/share
/${DOC_PACKAGE}
292 mkdir
-p build
/usr
/share
/doc
/${DOC_PACKAGE}
293 install -m
0644 index.html
${INDEX_INCLUDES} build
/usr
/share
/${DOC_PACKAGE}
294 install -m
0644 ${WIKI_IMPORTS} build
/usr
/share
/${DOC_PACKAGE}
295 # install api doc viewer
296 mkdir build
/usr
/share
/${DOC_PACKAGE}/api-viewer
297 install -m
0644 ${API_VIEWER_SOURCES} build
/usr
/share
/${DOC_PACKAGE}/api-viewer
298 # build Debian packages
299 cd build
; dpkg-buildpackage
-rfakeroot
-b
-us
-uc
302 lintian
${MEDIAWIKI_DEB}
305 upload
: ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB}
306 tar cf
- ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB} | ssh repoman@repo.proxmox.com upload
310 rm -f
*.5-opts.adoc
*.1-synopsis.adoc
*.8-synopsis.adoc
311 rm -f api-viewer
/apidata.js
312 rm -f pve-firewall-macros.adoc pct-network-opts.adoc pct-mountpoint-opts.adoc
316 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 .asciidoc-pve-tmp_
*
317 find .
-name
'*~' -exec
rm {} ';'