-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
for i in ./images/screenshot/*.png; do ./png-verify.pl $$i; done
ADOC_SOURCES_GUESS=$(filter-out %-synopsis.adoc %-opts.adoc %-table.adoc, $(wildcard *.adoc))
for i in ./images/screenshot/*.png; do ./png-verify.pl $$i; done
ADOC_SOURCES_GUESS=$(filter-out %-synopsis.adoc %-opts.adoc %-table.adoc, $(wildcard *.adoc))
./scan-adoc-refs *.adoc --depends .pmg-doc-depends.tmp > link-refs.json.tmp
@cmp --quiet .pmg-doc-depends .pmg-doc-depends.tmp || mv .pmg-doc-depends.tmp .pmg-doc-depends
@cmp --quiet link-refs.json link-refs.json.tmp || mv link-refs.json.tmp link-refs.json
pmg-doc-generator.mk: .pmg-doc-depends pmg-doc-generator.mk.in
cat pmg-doc-generator.mk.in .pmg-doc-depends > $@.tmp
./scan-adoc-refs *.adoc --depends .pmg-doc-depends.tmp > link-refs.json.tmp
@cmp --quiet .pmg-doc-depends .pmg-doc-depends.tmp || mv .pmg-doc-depends.tmp .pmg-doc-depends
@cmp --quiet link-refs.json link-refs.json.tmp || mv link-refs.json.tmp link-refs.json
pmg-doc-generator.mk: .pmg-doc-depends pmg-doc-generator.mk.in
cat pmg-doc-generator.mk.in .pmg-doc-depends > $@.tmp
-index.html: index.adoc ${API_VIEWER_SOURCES} ${INDEX_INCLUDES}
- asciidoc ${ADOC_STDARG} -o $@ index.adoc
+index.html: index.adoc $(API_VIEWER_SOURCES) $(INDEX_INCLUDES)
+ asciidoc $(ADOC_STDARG) -o $@ index.adoc
-pmg-admin-guide.html: ${PMG_ADMIN_GUIDE_ADOCDEPENDS}
- asciidoc -a pmglogo ${ADOC_STDARG} -o $@ pmg-admin-guide.adoc
+pmg-admin-guide.html: $(PMG_ADMIN_GUIDE_ADOCDEPENDS)
+ asciidoc -a pmglogo $(ADOC_STDARG) -o $@ pmg-admin-guide.adoc
rsvg-convert -f pdf -o proxmox-logo.pdf images/proxmox-logo.svg
rsvg-convert -f pdf -o proxmox-ci-header.pdf images/proxmox-ci-header.svg
rsvg-convert -f pdf -o proxmox-logo.pdf images/proxmox-logo.svg
rsvg-convert -f pdf -o proxmox-ci-header.pdf images/proxmox-ci-header.svg
- grep ">Release ${DOCRELEASE}<" pmg-admin-guide-docinfo.xml || (echo "wrong release in pmg-admin-guide-docinfo.xml" && false);
- a2x -a docinfo -a docinfo1 -f pdf -L --asciidoc-opts="${PMG_DOCBOOK_CONF}" --dblatex-opts ${PMG_DBLATEX_OPTS} pmg-admin-guide.adoc
+ grep ">Release $(DOCRELEASE)<" pmg-admin-guide-docinfo.xml || (echo "wrong release in pmg-admin-guide-docinfo.xml" && false);
+ a2x -a docinfo -a docinfo1 -f pdf -L --asciidoc-opts="$(PMG_DOCBOOK_CONF)" --dblatex-opts $(PMG_DBLATEX_OPTS) pmg-admin-guide.adoc
-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 $@
+
+$(BUILDDIR):
+ rm -rf $@ $@.tmp
+ rsync -a * $@.tmp
+ echo "git clone git://git.proxmox.com/git/pmg-docs.git\\ngit checkout $(GITVERSION)" > $@.tmp/debian/SOURCE
+ mv $@.tmp $@
-${DOC_DEB}:
- rm -f ${GEN_DEB} ${DOC_DEB}
- rm -rf build
- rsync -a * build/
- echo "git clone git://git.proxmox.com/git/pmg-docs.git\\ngit checkout ${GITVERSION}" > build/debian/SOURCE
- cd build; dpkg-buildpackage -b -us -uc
+$(DOC_DEB): $(BUILDDIR)
+ cd $(BUILDDIR); dpkg-buildpackage -b -us -uc
- install -m 0644 ${GEN_DEB_SOURCES} $(DESTDIR)/usr/share/${GEN_PACKAGE}
- install -m 0755 ${GEN_SCRIPTS} $(DESTDIR)/usr/share/${GEN_PACKAGE}
+ install -m 0644 $(GEN_DEB_SOURCES) $(DESTDIR)/usr/share/$(GEN_PACKAGE)
+ install -m 0755 $(GEN_SCRIPTS) $(DESTDIR)/usr/share/$(GEN_PACKAGE)
- install -dm755 $(DESTDIR)/usr/share/${GEN_PACKAGE}/asciidoc/
- install -m 0644 asciidoc/asciidoc-pmg.conf $(DESTDIR)/usr/share/${GEN_PACKAGE}/asciidoc/
- install -m 0644 asciidoc/pmg-html.conf $(DESTDIR)/usr/share/${GEN_PACKAGE}/asciidoc/
+ install -dm755 $(DESTDIR)/usr/share/$(GEN_PACKAGE)/asciidoc/
+ install -m 0644 asciidoc/asciidoc-pmg.conf $(DESTDIR)/usr/share/$(GEN_PACKAGE)/asciidoc/
+ install -m 0644 asciidoc/pmg-html.conf $(DESTDIR)/usr/share/$(GEN_PACKAGE)/asciidoc/
- install -dm755 $(DESTDIR)/usr/share/${DOC_PACKAGE}
- install -dm755 $(DESTDIR)/usr/share/doc/${DOC_PACKAGE}
- install -m 0644 index.html ${INDEX_INCLUDES} $(DESTDIR)/usr/share/${DOC_PACKAGE}
+ install -dm755 $(DESTDIR)/usr/share/$(DOC_PACKAGE)
+ install -dm755 $(DESTDIR)/usr/share/doc/$(DOC_PACKAGE)
+ install -m 0644 index.html $(INDEX_INCLUDES) $(DESTDIR)/usr/share/$(DOC_PACKAGE)
- install -dm755 $(DESTDIR)/usr/share/${DOC_PACKAGE}/images/screenshot
- install -m 0644 images/screenshot/*.png $(DESTDIR)/usr/share/${DOC_PACKAGE}/images/screenshot
+ install -dm755 $(DESTDIR)/usr/share/$(DOC_PACKAGE)/images/screenshot
+ install -m 0644 images/screenshot/*.png $(DESTDIR)/usr/share/$(DOC_PACKAGE)/images/screenshot
- install -dm755 $(DESTDIR)/usr/share/${DOC_PACKAGE}/api-viewer
- install -m 0644 ${API_VIEWER_SOURCES} $(DESTDIR)/usr/share/${DOC_PACKAGE}/api-viewer
+ install -dm755 $(DESTDIR)/usr/share/$(DOC_PACKAGE)/api-viewer
+ install -m 0644 $(API_VIEWER_SOURCES) $(DESTDIR)/usr/share/$(DOC_PACKAGE)/api-viewer
-upload: ${GEN_DEB} ${DOC_DEB}
- tar cf - ${GEN_DEB} ${DOC_DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pmg --dist stretch
+upload: $(GEN_DEB) $(DOC_DEB)
+ tar cf - $(GEN_DEB) $(DOC_DEB) | ssh -X repoman@repo.proxmox.com -- upload --product pmg --dist bullseye
rm -f api-viewer/apidoc.js chapter-*.html *-plain.html chapter-*.html pmg-admin-guide.chunked asciidoc-pmg link-refs.json .asciidoc-pmg-tmp_* pmg-smtp-filter.8-synopsis.adoc pmgpolicy.8-synopsis.adoc pmgsh.1-synopsis.adoc
rm -rf .pmg-doc-depends
rm -f pmg-doc-generator.mk chapter-index-table.adoc man1-index-table.adoc man5-index-table.adoc man8-index-table.adoc pmg-admin-guide-docinfo.xml pmg-copyright.adoc
rm -f api-viewer/apidoc.js chapter-*.html *-plain.html chapter-*.html pmg-admin-guide.chunked asciidoc-pmg link-refs.json .asciidoc-pmg-tmp_* pmg-smtp-filter.8-synopsis.adoc pmgpolicy.8-synopsis.adoc pmgsh.1-synopsis.adoc
rm -rf .pmg-doc-depends
rm -f pmg-doc-generator.mk chapter-index-table.adoc man1-index-table.adoc man5-index-table.adoc man8-index-table.adoc pmg-admin-guide-docinfo.xml pmg-copyright.adoc