MEDIAWIKI_PACKAGE=pve-docs-mediawiki
# also update debian/changelog
-PKGREL=3
+PKGREL=12
GITVERSION:=$(shell cat .git/refs/heads/master)
GEN_DEB=${GEN_PACKAGE}_${DOCRELEASE}-${PKGREL}_${ARCH}.deb
DOC_DEB=${DOC_PACKAGE}_${DOCRELEASE}-${PKGREL}_all.deb
MEDIAWIKI_DEB=${MEDIAWIKI_PACKAGE}_${DOCRELEASE}-${PKGREL}_all.deb
-DOC_BUILDDEPS := pve-doc-generator, dblatex, source-highlight, inkscape, imagemagick
+DOC_BUILDDEPS := asciidoc-dblatex, source-highlight, librsvg2-bin
all: index.html
a2x -a docinfo -a docinfo1 -a icons -f chunked pve-admin-guide.adoc
PVE_DOCBOOK_CONF=-b $(shell pwd)/asciidoc/pve-docbook -f asciidoc/asciidoc-pve.conf
+PVE_DBLATEX_OPTS='-p ./asciidoc/pve-dblatex.xsl -s asciidoc/dblatex-custom.sty -c asciidoc/dblatex-export.conf'
pve-admin-guide-docinfo.xml: pve-admin-guide-docinfo.xml.in
sed -e 's/@RELEASE@/${DOCRELEASE}/' <$< >$@
pve-admin-guide.pdf: ${PVE_ADMIN_GUIDE_ADOCDEPENDS} docinfo.xml pve-admin-guide-docinfo.xml
- inkscape -z -D --export-pdf=proxmox-logo.pdf images/proxmox-logo.svg
- inkscape -z -D --export-pdf=proxmox-ci-header.pdf images/proxmox-ci-header.svg
+ rsvg-convert -f pdf -o proxmox-logo.pdf images/proxmox-logo.svg
+ rsvg-convert -f pdf -o proxmox-ci-header.pdf images/proxmox-ci-header.svg
grep ">Release ${DOCRELEASE}<" pve-admin-guide-docinfo.xml || (echo "wrong release in pve-admin-guide-docinfo.xml" && false);
- a2x -a docinfo -a docinfo1 -f pdf -L --asciidoc-opts="${PVE_DOCBOOK_CONF}" --dblatex-opts "-p ./asciidoc/pve-dblatex.xsl -s asciidoc/dblatex-custom.sty" pve-admin-guide.adoc
+ a2x -a docinfo -a docinfo1 -f pdf -L --asciidoc-opts="${PVE_DOCBOOK_CONF}" --dblatex-opts ${PVE_DBLATEX_OPTS} pve-admin-guide.adoc
rm proxmox-logo.pdf proxmox-ci-header.pdf
pve-admin-guide.epub: ${PVE_ADMIN_GUIDE_ADOCDEPENDS}
doc-deb: $(DOC_DEB)
$(DOC_DEB): index.html $(WIKI_IMPORTS) $(API_VIEWER_SOURCES) verify-images
$(call prepare_build,$(DOC_PACKAGE))
- sed -i -e '/^Build-Depends/{s/$$/$(DOC_BUILDDEPS)/}' build-$(DOC_PACKAGE)/debian/control
+ sed -i -e '/^Build-Depends/{s/$$/, $(DOC_BUILDDEPS)/}' build-$(DOC_PACKAGE)/debian/control
# install files for pvedocs package
install -dm755 build-$(DOC_PACKAGE)/usr/share/${DOC_PACKAGE}
install -dm755 build-$(DOC_PACKAGE)/usr/share/doc/${DOC_PACKAGE}
.PHONY: upload
upload: ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB}
- tar cf - ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB} | ssh repoman@repo.proxmox.com upload
+ tar cf - ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pve --dist stretch
.PHONY: update
-update: clean
+update: clean clean-static | update-static
+ make all
+
+.PHONY: update-static
+update-static: clean-static | $(filter %-synopsis.adoc %-opts.adoc, ${PVE_ADMIN_GUIDE_ADOCDEPENDS}) pve-firewall-macros.adoc api-viewer/apidata.js
+
+.PHONY: clean-static
+clean-static:
find . -regex '.*-\(opts\|synopsis\)\.adoc' -not -name pmxcfs.8-synopsis.adoc -exec rm -f \{\} \;
rm -f api-viewer/apidata.js
rm -f pve-firewall-macros.adoc pct-network-opts.adoc pct-mountpoint-opts.adoc
- make all
-clean:
+clean:
rm -rf *.html *.pdf *.epub *.tmp *.1 *.5 *.8
rm -f *.deb *.changes *.buildinfo
- rm -f 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
- rm -rf .pve-doc-depends
+ rm -f 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
+ rm -rf .pve-doc-depends
rm -f pve-doc-generator.mk chapter-index-table.adoc man1-index-table.adoc man5-index-table.adoc man8-index-table.adoc pve-admin-guide-docinfo.xml
rm -rf build-*