X-Git-Url: https://git.proxmox.com/?p=pve-docs.git;a=blobdiff_plain;f=Makefile;h=4399d37c5a765037138508109e3ad395762f1cce;hp=025093e41d0dd48129d2e85eea4bb0ff1de58bae;hb=3fe127c7d6ed72cd6b2173813e1dfa9592d91954;hpb=fa764571f6a0c5bfc62ee1cda6bffcfae40e9ec9 diff --git a/Makefile b/Makefile index 025093e..4399d37 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,4 @@ +# overwriting below ensures that we can build without full PVE installed DGDIR=. ASCIIDOC_PVE=./asciidoc-pve @@ -6,7 +7,7 @@ DOC_PACKAGE=pve-docs MEDIAWIKI_PACKAGE=pve-docs-mediawiki # also update debian/changelog -PKGREL=8 +PKGREL=2 GITVERSION:=$(shell git rev-parse HEAD) @@ -35,12 +36,13 @@ pve-doc-generator.mk: .pve-doc-depends pve-doc-generator.mk.in cat pve-doc-generator.mk.in .pve-doc-depends > $@.tmp mv $@.tmp $@ -include ./pve-doc-generator.mk +-include ./pve-doc-generator.mk GEN_DEB_SOURCES= \ pve-doc-generator.mk \ ${MANUAL_SOURCES} \ pmxcfs.8-synopsis.adoc \ + qmeventd.8-synopsis.adoc \ docinfo.xml GEN_SCRIPTS= \ @@ -118,14 +120,17 @@ pve-admin-guide.html: ${PVE_ADMIN_GUIDE_ADOCDEPENDS} asciidoc -a pvelogo ${ADOC_STDARG} -o $@ pve-admin-guide.adoc pve-admin-guide.chunked: ${PVE_ADMIN_GUIDE_ADOCDEPENDS} - rm -rf pve-admin-guide.chunked - a2x -a docinfo -a docinfo1 -a icons -f chunked pve-admin-guide.adoc + rm -rf $@.tmp $@ + mkdir $@.tmp + a2x -D $@.tmp -a docinfo -a docinfo1 -a icons -f chunked pve-admin-guide.adoc + mv $@.tmp/$@ $@ 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' +YEAR:=$(shell date '+%Y') pve-admin-guide-docinfo.xml: pve-admin-guide-docinfo.xml.in - sed -e 's/@RELEASE@/${DOCRELEASE}/' <$< >$@ + sed -e 's/@RELEASE@/${DOCRELEASE}/' -e 's/@YEAR@/${YEAR}/' <$< >$@ pve-admin-guide.pdf: ${PVE_ADMIN_GUIDE_ADOCDEPENDS} docinfo.xml pve-admin-guide-docinfo.xml rsvg-convert -f pdf -o proxmox-logo.pdf images/proxmox-logo.svg @@ -135,7 +140,10 @@ pve-admin-guide.pdf: ${PVE_ADMIN_GUIDE_ADOCDEPENDS} docinfo.xml pve-admin-guide- rm proxmox-logo.pdf proxmox-ci-header.pdf pve-admin-guide.epub: ${PVE_ADMIN_GUIDE_ADOCDEPENDS} - a2x -f epub --asciidoc-opts="${PVE_DOCBOOK_CONF}" pve-admin-guide.adoc + rm -rf $@.tmp $@ + mkdir $@.tmp + a2x -D $@.tmp -f epub --asciidoc-opts="${PVE_DOCBOOK_CONF}" pve-admin-guide.adoc + mv $@.tmp/$@ $@ api-viewer/apidata.js: extractapi.pl ./extractapi.pl >$@ @@ -180,12 +188,14 @@ gen-install: $(GEN_DEB_SOURCES) asciidoc-pve asciidoc/mediawiki.conf install -m 0644 asciidoc/pve-html.conf $(DESTDIR)/usr/share/${GEN_PACKAGE}/asciidoc/ .PHONY: doc-install -doc-install: index.html $(WIKI_IMPORTS) $(API_VIEWER_SOURCES) verify-images +doc-install: index.html $(WIKI_IMPORTS) $(API_VIEWER_SOURCES) verify-images examples install -dm755 $(DESTDIR)/usr/share/$(DOC_PACKAGE) install -dm755 $(DESTDIR)/usr/share/doc/$(DOC_PACKAGE) # install files for pvedocs package install -dm755 $(DESTDIR)/usr/share/${DOC_PACKAGE} install -dm755 $(DESTDIR)/usr/share/doc/${DOC_PACKAGE} + install -dm755 $(DESTDIR)/usr/share/${DOC_PACKAGE}/examples/ + install -m 755 examples/guest-example-hookscript.pl $(DESTDIR)/usr/share/${DOC_PACKAGE}/examples/ install -m 0644 index.html ${INDEX_INCLUDES} $(DESTDIR)/usr/share/${DOC_PACKAGE} install -m 0644 ${WIKI_IMPORTS} $(DESTDIR)/usr/share/${DOC_PACKAGE} # install images @@ -208,7 +218,7 @@ mediawiki-install: pve-docs-mediawiki-import .PHONY: upload upload: ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB} - tar cf - ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pve --dist stretch + tar cf - ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pve --dist buster .PHONY: update update: @@ -223,7 +233,7 @@ update-static: .PHONY: clean-static clean-static: - find . -regex '.*-\(opts\|synopsis\)\.adoc' -not -name pmxcfs.8-synopsis.adoc -exec rm -f \{\} \; + find . -regex '.*-\(opts\|synopsis\)\.adoc' -not -name pmxcfs.8-synopsis.adoc -not -name qmeventd.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 @@ -233,4 +243,4 @@ clean: 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-* + rm -rf build