]> git.proxmox.com Git - pve-docs.git/blobdiff - Makefile
qm: pct: mention move-disk for storage and reassign
[pve-docs.git] / Makefile
index 4399d37c5a765037138508109e3ad395762f1cce..df339c2ef472261c33c97a5ccd38c8722ffd4649 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,5 @@
+include /usr/share/dpkg/pkg-info.mk
+
 # overwriting below ensures that we can build without full PVE installed
 DGDIR=.
 ASCIIDOC_PVE=./asciidoc-pve
@@ -6,16 +8,13 @@ GEN_PACKAGE=pve-doc-generator
 DOC_PACKAGE=pve-docs
 MEDIAWIKI_PACKAGE=pve-docs-mediawiki
 
-# also update debian/changelog
-PKGREL=2
-
 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}")
@@ -34,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
@@ -53,6 +53,7 @@ GEN_SCRIPTS=                                  \
        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        \
@@ -62,6 +63,11 @@ GEN_SCRIPTS=                                 \
        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
@@ -95,7 +101,7 @@ README.html: README.adoc
 
 .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
@@ -148,12 +154,13 @@ pve-admin-guide.epub: ${PVE_ADMIN_GUIDE_ADOCDEPENDS}
 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)
@@ -218,7 +225,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 buster
+       tar cf - ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pve --dist bullseye
 
 .PHONY: update
 update: