2 ASCIIDOC_PVE
=.
/asciidoc-pve
4 include .
/pve-doc-generator.mk
6 GEN_PACKAGE
=pve-doc-generator
8 MEDIAWIKI_PACKAGE
=pve-docs-mediawiki
10 # also update debian/changelog
13 GITVERSION
:=$(shell cat .git
/refs
/heads
/master
)
15 ARCH
:=$(shell dpkg-architecture
-qDEB_BUILD_ARCH
)
17 GEN_DEB
=${GEN_PACKAGE}_
${DOCRELEASE}-${PKGREL}_
${ARCH}.deb
18 DOC_DEB
=${DOC_PACKAGE}_
${DOCRELEASE}-${PKGREL}_all.deb
19 MEDIAWIKI_DEB
=${MEDIAWIKI_PACKAGE}_
${DOCRELEASE}-${PKGREL}_all.deb
23 .pve-doc-depends link-refs.json
: $(wildcard *.adoc
) scan-adoc-refs
24 .
/scan-adoc-refs
*.adoc
--depends .pve-doc-depends
> link-refs.json
26 include .pve-doc-depends
29 pve-doc-generator.mk \
31 ${PVESM_ADOCSOURCES} \
36 gen-datacenter.cfg
.5-opts.pl \
37 gen-pct.conf
.5-opts.pl \
38 gen-pct-network-opts.pl \
39 gen-pct-mountpoint-opts.pl \
40 gen-qm.conf
.5-opts.pl \
41 gen-vzdump.conf
.5-opts.pl \
42 gen-pve-firewall-cluster-opts.pl \
43 gen-pve-firewall-host-opts.pl \
44 gen-pve-firewall-macros-adoc.pl \
45 gen-pve-firewall-rules-opts.pl \
46 gen-pve-firewall-vm-opts.pl
49 api-viewer
/index.html \
52 asciidoc-pve
: asciidoc-pve.in link-refs.json
53 cat asciidoc-pve.in link-refs.json
>asciidoc-pve.tmp
54 sed
-e s
/@RELEASE@
/${DOCRELEASE}/ -i asciidoc-pve.tmp
55 chmod
+x asciidoc-pve.tmp
56 mv asciidoc-pve.tmp asciidoc-pve
58 pve-docs-mediawiki-import
: pve-docs-mediawiki-import.in link-refs.json
59 cat pve-docs-mediawiki-import.in link-refs.json
> pve-docs-mediawiki-import.tmp
60 chmod
+x pve-docs-mediawiki-import.tmp
61 mv pve-docs-mediawiki-import.tmp pve-docs-mediawiki-import
65 pve-admin-guide.epub \
66 $(sort $(addsuffix .html
, ${MANUAL_PAGES}) ${CHAPTER_LIST})
68 ADOC_STDARG
= -a icons
-a data-uri
-a
"date=$(shell date)" -a
"revnumber=${DOCRELEASE}"
73 %-nwdiag.svg
: %.nwdiag
74 nwdiag
-T svg
$*.nwdiag
-o
$@
;
76 %-plain.html
: asciidoc-pve
%.adoc
77 .
/asciidoc-pve compile-wiki
-o
$@
$*.adoc
79 chapter-
%.html
: %.adoc asciidoc-pve
${PVE_COMMON_DOC_SOURCES}
80 .
/asciidoc-pve compile-chapter
-o
$@
$*.adoc
82 %.1.html
: %.adoc
%.1-synopsis.adoc asciidoc-pve
${PVE_COMMON_DOC_SOURCES}
83 .
/asciidoc-pve compile-man-html
-o
$@
$*.adoc
85 pmxcfs
.8.html
: pmxcfs.adoc pmxcfs
.8-cli.adoc asciidoc-pve
${PVE_COMMON_DOC_SOURCES}
86 .
/asciidoc-pve compile-man-html
-o
$@ pmxcfs.adoc
88 %.8.html
: %.adoc
%.8-synopsis.adoc asciidoc-pve
${PVE_COMMON_DOC_SOURCES}
89 .
/asciidoc-pve compile-man-html
-o
$@
$*.adoc
91 %.5.html
: %.adoc
%.5-opts.adoc asciidoc-pve
${PVE_COMMON_DOC_SOURCES}
92 .
/asciidoc-pve compile-man-html
-o
$@
$*.adoc
94 %.5-plain.html
: %.adoc
%.5-opts.adoc asciidoc-pve
${PVE_COMMON_DOC_SOURCES}
95 .
/asciidoc-pve compile-man-wiki
-o
$@
$*.adoc
97 README.html
: README.adoc
98 asciidoc
${ADOC_STDARG} -o
$@
$<
102 $(BROWSER
) index.html
&
104 index.html
: index.adoc
${API_VIEWER_SOURCES} ${INDEX_INCLUDES}
105 asciidoc
-a
"date=$(shell date)" -a
"revnumber=${DOCRELEASE}" index.adoc
107 pve-admin-guide.html
: ${PVE_ADMIN_GUIDE_ADOCDEPENDS}
108 asciidoc
-a pvelogo
-a
"revnumber=${DOCRELEASE}" -a
"date=$(shell date)" pve-admin-guide.adoc
110 pve-admin-guide.chunked
: ${PVE_ADMIN_GUIDE_ADOCDEPENDS}
111 rm -rf pve-admin-guide.chunked
112 a2x
-a docinfo
-a docinfo1
-a icons
-f chunked pve-admin-guide.adoc
114 pve-admin-guide.pdf
: ${PVE_ADMIN_GUIDE_ADOCDEPENDS} docinfo.xml pve-admin-guide-docinfo.xml
115 inkscape
-z
-D
--export-pdf
=proxmox-logo.pdf images
/proxmox-logo.svg
116 inkscape
-z
-D
--export-pdf
=proxmox-ci-header.pdf images
/proxmox-ci-header.svg
117 grep
">Release ${DOCRELEASE}<" pve-admin-guide-docinfo.xml ||
(echo
"wrong release in pve-admin-guide-docinfo.xml" && false
);
118 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
119 rm proxmox-logo.pdf proxmox-ci-header.pdf
121 pve-admin-guide.epub
: ${PVE_ADMIN_GUIDE_ADOCDEPENDS}
122 a2x
-f epub pve-admin-guide.adoc
124 api-viewer
/apidata.js
: extractapi.pl
127 api-viewer
/apidoc.js
: api-viewer
/apidata.js api-viewer
/PVEAPI.js
128 cat api-viewer
/apidata.js api-viewer
/PVEAPI.js
>$@
131 dinstall
: ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB}
132 dpkg
-i
${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB}
136 rm -f
${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB};
137 make
${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB};
139 ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB}: index.html
${INDEX_INCLUDES} ${WIKI_IMPORTS} ${API_VIEWER_SOURCES} ${GEN_DEB_SOURCES} asciidoc-pve pve-docs-mediawiki-import
142 rsync
-a debian
/ build
/debian
143 cp pve-docs-mediawiki-import build
/debian
/tree
/pve-docs-mediawiki
/pve-docs-mediawiki-import
144 echo
"git clone git://git.proxmox.com/git/pve-docs.git\\ngit checkout ${GITVERSION}" > build
/debian
/SOURCE
145 # install files for pve-doc-generator package
146 mkdir
-p build
/usr
/share
/${GEN_PACKAGE}
147 mkdir
-p build
/usr
/share
/doc
/${GEN_PACKAGE}
148 mkdir
-p build
/usr
/bin
149 install -m
0644 ${GEN_DEB_SOURCES} build
/usr
/share
/${GEN_PACKAGE}
150 install -m
0755 ${GEN_SCRIPTS} build
/usr
/share
/${GEN_PACKAGE}
151 install -m
0755 asciidoc-pve build
/usr
/bin
/
152 # install files for pvedocs package
153 mkdir
-p build
/usr
/share
/${DOC_PACKAGE}
154 mkdir
-p build
/usr
/share
/doc
/${DOC_PACKAGE}
155 install -m
0644 index.html
${INDEX_INCLUDES} build
/usr
/share
/${DOC_PACKAGE}
156 install -m
0644 ${WIKI_IMPORTS} build
/usr
/share
/${DOC_PACKAGE}
157 # install api doc viewer
158 mkdir build
/usr
/share
/${DOC_PACKAGE}/api-viewer
159 install -m
0644 ${API_VIEWER_SOURCES} build
/usr
/share
/${DOC_PACKAGE}/api-viewer
160 # build Debian packages
161 cd build
; dpkg-buildpackage
-rfakeroot
-b
-us
-uc
164 lintian
${MEDIAWIKI_DEB}
167 upload
: ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB}
168 tar cf
- ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB} | ssh repoman@repo.proxmox.com upload
172 rm -f
*.5-opts.adoc
*.1-synopsis.adoc
*.8-synopsis.adoc
173 rm -f api-viewer
/apidata.js
174 rm -f pve-firewall-macros.adoc pct-network-opts.adoc pct-mountpoint-opts.adoc
178 rm -rf
*.html
*.pdf
*.epub
*.tmp
*.1 *.5 *.8 *.deb
*.changes build api-viewer
/apidoc.js chapter-
*.html
*-plain.html chapter-
*.html pve-admin-guide.chunked asciidoc-pve link-refs.json .asciidoc-pve-tmp_
* pve-docs-mediawiki-import
179 find .
-name
'*~' -exec
rm {} ';'