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
68 CONFIG_LIST
=datacenter.cfg qm.conf pct.conf
71 pve-doc-generator.mk \
73 $(addsuffix .adoc
, ${COMMAND_LIST}) \
74 $(addsuffix .adoc
, ${SERVICE_LIST}) \
75 $(addsuffix .adoc
, ${CONFIG_LIST}) \
76 pve-storage-dir.adoc \
77 pve-storage-glusterfs.adoc \
78 pve-storage-iscsi.adoc \
79 pve-storage-iscsidirect.adoc \
80 pve-storage-lvm.adoc \
81 pve-storage-nfs.adoc \
82 pve-storage-rbd.adoc \
83 pve-storage-zfspool.adoc \
89 gen-datacenter.cfg
.5-opts.pl \
90 gen-pct.conf
.5-opts.pl \
91 gen-pct-network-opts.pl \
92 gen-pct-mountpoint-opts.pl \
93 gen-qm.conf
.5-opts.pl \
94 gen-vzdump.conf
.5-opts.pl \
95 gen-pve-firewall-cluster-opts.pl \
96 gen-pve-firewall-host-opts.pl \
97 gen-pve-firewall-macros-adoc.pl \
98 gen-pve-firewall-rules-opts.pl \
99 gen-pve-firewall-vm-opts.pl
103 pve-package-repos.adoc \
104 pve-installation.adoc \
105 system-software-updates.adoc \
109 API_VIEWER_SOURCES
= \
110 api-viewer
/index.html \
113 PVE_ADMIN_GUIDE_SOURCES
= \
114 ${DATACENTER_CONF_MAN5_SOURCES} \
115 ${QM_CONF_MAN5_SOURCES} \
116 ${PCT_CONF_MAN5_SOURCES} \
117 ${SYSADMIN_SOURCES} \
118 pve-admin-guide.adoc \
123 ${PVE_FIREWALL_MAN8_SOURCES} \
124 ${PVESM_MAN1_SOURCES} \
125 ${PCT_MAN1_SOURCES} \
126 ${PVECM_MAN1_SOURCES} \
127 ${PVEUM_MAN1_SOURCES} \
129 ${QMRESTORE_MAN1_SOURCES} \
130 ${HA_MANAGER_MAN1_SOURCES} \
131 ${PVESTATD_MAN8_SOURCES} \
132 ${PVEDAEMON_MAN8_SOURCES} \
133 ${PVEPROXY_MAN8_SOURCES} \
134 ${SPICEPROXY_MAN8_SOURCES} \
135 ${PVE_HA_CRM_MAN8_SOURCES} \
136 ${PVE_HA_LRM_MAN8_SOURCES} \
137 ${VZDUMP_MAN1_SOURCES} \
138 ${PVEAM_MAN1_SOURCES} \
139 ${PVESUBSCRIPTION_MAN1_SOURCES} \
140 ${PVECEPH_MAN1_SOURCES} \
141 pve-bibliography.adoc \
142 $(addsuffix .adoc
, ${COMMAND_LIST}) \
143 $(addsuffix .adoc
, ${SERVICE_LIST}) \
144 $(addsuffix .adoc
, ${CONFIG_LIST}) \
149 $(addsuffix -plain.html
, $(addprefix chapter-
, ${CHAPTER_LIST}))\
150 $(addsuffix .5-plain.html
, ${CONFIG_LIST}) \
151 $(addsuffix -plain.html
, $(addprefix pve-storage-
, ${STORAGE_TYPES}))
154 pve-admin-guide.pdf \
155 pve-admin-guide.html \
156 pve-admin-guide.epub \
157 $(addsuffix .1.html
, ${COMMAND_LIST}) \
158 $(addsuffix .8.html
, ${SERVICE_LIST}) \
159 $(addsuffix .5.html
, ${CONFIG_LIST}) \
160 $(addsuffix .html
, $(addprefix chapter-
, ${CHAPTER_LIST}))
162 ADOC_STDARG
= -a icons
-a data-uri
-a
"date=$(shell date)" -a
"revnumber=${DOCRELEASE}"
163 ADOC_MAN1_HTML_ARGS
=-a
"manvolnum=1" ${ADOC_STDARG}
164 ADOC_MAN5_HTML_ARGS
=-a
"manvolnum=5" ${ADOC_STDARG}
165 ADOC_MAN8_HTML_ARGS
=-a
"manvolnum=8" ${ADOC_STDARG}
171 %-nwdiag.svg
: %.nwdiag
172 nwdiag
-T svg
$*.nwdiag
-o
$@
;
174 chapter-sysadmin.html chapter-sysadmin-plain.html
: ${SYSADMIN_SOURCES}
176 chapter-
%.html
: %.adoc
${PVE_COMMON_DOC_SOURCES}
177 asciidoc
${ADOC_STDARG} -a toc
-o
$@
$*.adoc
179 chapter-
%-plain.html
: %.adoc
${PVE_COMMON_DOC_SOURCES}
180 asciidoc
-s
-a wiki
${ADOC_STDARG} -o
$@
$*.adoc
182 pve-storage-
%-plain.html
: pve-storage-
%.adoc
${PVE_COMMON_DOC_SOURCES}
183 asciidoc
-s
-a wiki
-a
'leveloffset=-1' ${ADOC_STDARG} -o
$@ pve-storage-
$*.adoc
185 %.1.html
: %.adoc
%.1-synopsis.adoc
${PVE_COMMON_DOC_SOURCES}
186 asciidoc
${ADOC_MAN1_HTML_ARGS} -o
$@
$*.adoc
188 pmxcfs
.8.html
: pmxcfs.adoc pmxcfs
.8-cli.adoc
${PVE_COMMON_DOC_SOURCES}
189 asciidoc
${ADOC_MAN8_HTML_ARGS} -o
$@ pmxcfs.adoc
191 %.8.html
: %.adoc
%.8-synopsis.adoc
${PVE_COMMON_DOC_SOURCES}
192 asciidoc
${ADOC_MAN8_HTML_ARGS} -o
$@
$*.adoc
194 %.5.html
: %.adoc
%.5-opts.adoc
${PVE_COMMON_DOC_SOURCES}
195 asciidoc
${ADOC_MAN5_HTML_ARGS} -o
$@
$*.adoc
197 %.5-plain.html
: %.adoc
%.5-opts.adoc
${PVE_COMMON_DOC_SOURCES}
198 asciidoc
-s
${ADOC_MAN5_HTML_ARGS} -o
$@
$*.adoc
202 $(BROWSER
) index.html
&
204 index.html
: index.adoc
${API_VIEWER_SOURCES} ${INDEX_INCLUDES}
205 asciidoc
-a
"date=$(shell date)" -a
"revnumber=${DOCRELEASE}" index.adoc
207 pve-admin-guide.html
: ${PVE_ADMIN_GUIDE_SOURCES}
208 asciidoc
-a
"revnumber=${DOCRELEASE}" -a
"date=$(shell date)" pve-admin-guide.adoc
210 pve-admin-guide.chunked
: ${PVE_ADMIN_GUIDE_SOURCES}
211 rm -rf pve-admin-guide.chunked
212 a2x
-a docinfo
-a docinfo1
-a icons
-f chunked pve-admin-guide.adoc
214 pve-admin-guide.pdf
: ${PVE_ADMIN_GUIDE_SOURCES} docinfo.xml pve-admin-guide-docinfo.xml
215 grep
">Release ${DOCRELEASE}<" pve-admin-guide-docinfo.xml ||
(echo
"wrong release in pve-admin-guide-docinfo.xml" && false
);
216 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
218 pve-admin-guide.epub
: ${PVE_ADMIN_GUIDE_SOURCES}
219 a2x
-f epub pve-admin-guide.adoc
221 api-viewer
/apidata.js
: extractapi.pl
224 api-viewer
/apidoc.js
: api-viewer
/apidata.js api-viewer
/PVEAPI.js
225 cat api-viewer
/apidata.js api-viewer
/PVEAPI.js
>$@
228 dinstall
: ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB}
229 dpkg
-i
${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB}
233 rm -f
${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB};
234 make
${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB};
236 ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB}: index.html
${INDEX_INCLUDES} ${WIKI_IMPORTS} ${API_VIEWER_SOURCES} ${GEN_DEB_SOURCES}
239 rsync
-a debian
/ build
/debian
240 echo
"git clone git://git.proxmox.com/git/pve-docs.git\\ngit checkout ${GITVERSION}" > build
/debian
/SOURCE
241 # install files for pve-doc-generator package
242 mkdir
-p build
/usr
/share
/${GEN_PACKAGE}
243 mkdir
-p build
/usr
/share
/doc
/${GEN_PACKAGE}
244 install -m
0644 ${GEN_DEB_SOURCES} build
/usr
/share
/${GEN_PACKAGE}
245 install -m
0755 ${GEN_SCRIPTS} build
/usr
/share
/${GEN_PACKAGE}
246 # install files for pvedocs package
247 mkdir
-p build
/usr
/share
/${DOC_PACKAGE}
248 mkdir
-p build
/usr
/share
/doc
/${DOC_PACKAGE}
249 install -m
0644 index.html
${INDEX_INCLUDES} build
/usr
/share
/${DOC_PACKAGE}
250 install -m
0644 ${WIKI_IMPORTS} build
/usr
/share
/${DOC_PACKAGE}
251 # install api doc viewer
252 mkdir build
/usr
/share
/${DOC_PACKAGE}/api-viewer
253 install -m
0644 ${API_VIEWER_SOURCES} build
/usr
/share
/${DOC_PACKAGE}/api-viewer
254 # build Debian packages
255 cd build
; dpkg-buildpackage
-rfakeroot
-b
-us
-uc
258 lintian
${MEDIAWIKI_DEB}
261 upload
: ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB}
262 tar cf
- ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB} | ssh repoman@repo.proxmox.com upload
266 rm -f
*.5-opts.adoc
*.1-synopsis.adoc
*.8-synopsis.adoc
267 rm -f api-viewer
/apidata.js
268 rm -f pve-firewall-macros.adoc pct-network-opts.adoc pct-mountpoint-opts.adoc
272 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
273 find .
-name
'*~' -exec
rm {} ';'