X-Git-Url: https://git.proxmox.com/?p=pve-docs.git;a=blobdiff_plain;f=Makefile;h=b373066d3aa1da7f8bd0974dabc513be3d7061fa;hp=4f8e0d4cea0206dd661265027ff2a5bed96071b7;hb=f11fb629b7ecdcff4a3f7ec8287241bc290afa5b;hpb=4bd9bffc98bba811d7fe8229b249bbebdb98eb11 diff --git a/Makefile b/Makefile index 4f8e0d4..b373066 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,6 @@ +include /usr/share/dpkg/pkg-info.mk + +# overwriting below ensures that we can build without full PVE installed DGDIR=. ASCIIDOC_PVE=./asciidoc-pve @@ -5,16 +8,13 @@ GEN_PACKAGE=pve-doc-generator DOC_PACKAGE=pve-docs MEDIAWIKI_PACKAGE=pve-docs-mediawiki -# also update debian/changelog -PKGREL=9 - GITVERSION:=$(shell git rev-parse HEAD) ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH) -GEN_DEB=${GEN_PACKAGE}_${DOCRELEASE}-${PKGREL}_${ARCH}.deb -DOC_DEB=${DOC_PACKAGE}_${DOCRELEASE}-${PKGREL}_all.deb -MEDIAWIKI_DEB=${MEDIAWIKI_PACKAGE}_${DOCRELEASE}-${PKGREL}_all.deb +GEN_DEB=${GEN_PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_${ARCH}.deb +DOC_DEB=${DOC_PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb +MEDIAWIKI_DEB=${MEDIAWIKI_PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb export SOURCE_DATE_EPOCH ?= $(shell dpkg-parsechangelog -STimestamp) SOURCE_DATE_HUMAN := $(shell date -d "@${SOURCE_DATE_EPOCH}") @@ -33,6 +33,7 @@ ADOC_SOURCES_GUESS=$(filter-out %-synopsis.adoc %-opts.adoc %-table.adoc, $(wild pve-doc-generator.mk: .pve-doc-depends pve-doc-generator.mk.in cat pve-doc-generator.mk.in .pve-doc-depends > $@.tmp + sed -i "s/@RELEASE@$$/${DEB_VERSION_UPSTREAM}/" $@.tmp mv $@.tmp $@ -include ./pve-doc-generator.mk @@ -41,6 +42,7 @@ GEN_DEB_SOURCES= \ pve-doc-generator.mk \ ${MANUAL_SOURCES} \ pmxcfs.8-synopsis.adoc \ + qmeventd.8-synopsis.adoc \ docinfo.xml GEN_SCRIPTS= \ @@ -126,8 +128,9 @@ pve-admin-guide.chunked: ${PVE_ADMIN_GUIDE_ADOCDEPENDS} 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 @@ -150,7 +153,7 @@ api-viewer/apidoc.js: api-viewer/apidata.js api-viewer/PVEAPI.js .PHONY: dinstall dinstall: ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB} - dpkg -i ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB} + dpkg -i ${GEN_DEB} ${DOC_DEB} # ${MEDIAWIKI_DEB} .PHONY: deb deb: $(DOC_DEB) @@ -185,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 @@ -213,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: @@ -228,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 @@ -238,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