+include /usr/share/dpkg/pkg-info.mk
+
DGDIR=.
ASCIIDOC_PMG=./asciidoc-pmg
DOC_PACKAGE=pmg-docs
# also update debian/changelog
-PKGREL=7
+PKGREL=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
-
+GEN_DEB=${GEN_PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_${ARCH}.deb
+DOC_DEB=${DOC_PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
export SOURCE_DATE_EPOCH ?= $(shell dpkg-parsechangelog -STimestamp)
SOURCE_DATE_HUMAN := $(shell date -d "@${SOURCE_DATE_EPOCH}")
pmg-doc-generator.mk: .pmg-doc-depends pmg-doc-generator.mk.in
cat pmg-doc-generator.mk.in .pmg-doc-depends > $@.tmp
+ sed -i "s/@RELEASE@$$/${DEB_VERSION_UPSTREAM}/" $@.tmp
mv $@.tmp $@
-include ./pmg-doc-generator.mk
gen-pmg.conf.5-opts.pl \
gen-user.conf.5-opts.pl
+API_VIEWER_FILES= \
+ api-viewer/apidata.js \
+ api-viewer/PMGAPI.js \
+ /usr/share/javascript/proxmox-widget-toolkit-dev/APIViewer.js
+
API_VIEWER_SOURCES= \
api-viewer/index.html \
api-viewer/apidoc.js
api-viewer/apidata.js: extractapi.pl
./extractapi.pl >$@
-api-viewer/apidoc.js: api-viewer/apidata.js api-viewer/PMGAPI.js
- cat api-viewer/apidata.js api-viewer/PMGAPI.js >$@
+api-viewer/apidoc.js: ${API_VIEWER_FILES}
+ cat ${API_VIEWER_FILES} >$@.tmp
+ mv $@.tmp $@
.PHONY: dinstall
dinstall: ${GEN_DEB} ${DOC_DEB}