X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=Makefile;h=b373066d3aa1da7f8bd0974dabc513be3d7061fa;hb=ee687744008dc98fc28b889a3f0c5b0a4a4d171c;hp=1bea57cffea842ab01da6607e09429c93eb8a5a5;hpb=856993e4166495537f42e0b9c3a51c966227feab;p=pve-docs.git diff --git a/Makefile b/Makefile index 1bea57c..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=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}") @@ -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 @@ -152,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)