+include /usr/share/dpkg/pkg-info.mk
+
+# overwriting below ensures that we can build without full PVE installed
DGDIR=.
ASCIIDOC_PVE=./asciidoc-pve
DOC_PACKAGE=pve-docs
MEDIAWIKI_PACKAGE=pve-docs-mediawiki
-# also update debian/changelog
-PKGREL=0+1
-
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}")
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
gen-pct-network-opts.pl \
gen-pct-mountpoint-opts.pl \
gen-qm.conf.5-opts.pl \
+ gen-cpu-models.conf.5-opts.pl \
gen-qm-cloud-init-opts.pl \
gen-vzdump.conf.5-opts.pl \
gen-pve-firewall-cluster-opts.pl \
gen-pve-firewall-vm-opts.pl \
gen-output-format-opts.pl
+API_VIEWER_FILES= \
+ api-viewer/apidata.js \
+ api-viewer/PVEAPI.js \
+ /usr/share/javascript/proxmox-widget-toolkit-dev/APIViewer.js
+
API_VIEWER_SOURCES= \
api-viewer/index.html \
api-viewer/apidoc.js
.PHONY: index
index: index.html
- $(BROWSER) index.html &
+ test -z "$${PVE_DOC_INSTANTVIEW}" || $(BROWSER) index.html &
chapter-index-table.adoc: asciidoc-pve
./asciidoc-pve chapter-table >$@.tmp
api-viewer/apidata.js: extractapi.pl
./extractapi.pl >$@
-api-viewer/apidoc.js: api-viewer/apidata.js api-viewer/PVEAPI.js
- cat api-viewer/apidata.js api-viewer/PVEAPI.js >$@
+api-viewer/apidoc.js: ${API_VIEWER_FILES}
+ cat ${API_VIEWER_FILES} >$@.tmp
+ mv $@.tmp $@
.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)
.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 bullseye
.PHONY: update
update: