X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=Makefile;h=ca56e964f93520d264039d7285d519a03822ba9b;hb=eaefe614232992de1a528cd08e8f9dbe3c2aead8;hp=9578078ba87826f28435b73e4959f85de32775fb;hpb=cb41b5d9e50f748c51d8da93a37d88dca0f7bd9b;p=pve-docs.git diff --git a/Makefile b/Makefile index 9578078..ca56e96 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=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}") @@ -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 @@ -94,7 +95,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 @@ -127,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 @@ -151,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) @@ -216,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: