X-Git-Url: https://git.proxmox.com/?p=pve-docs.git;a=blobdiff_plain;f=Makefile;h=c6bfcfe5001ad39bfb12785958a50746396cc548;hp=7222e7d2c7d746e5936cb998c109e35dad0f9a12;hb=72470ed634b2d3358cfad29b1faada5affa6bb28;hpb=0a3c58e0af5672c66d3acfb1f0c88443c9072aed diff --git a/Makefile b/Makefile index 7222e7d..c6bfcfe 100644 --- a/Makefile +++ b/Makefile @@ -4,9 +4,10 @@ include ./pve-doc-generator.mk GEN_PACKAGE=pve-doc-generator DOC_PACKAGE=pve-docs +MEDIAWIKI_PACKAGE=pve-docs-mediawiki # also update debian/changelog -PKGREL=7 +PKGREL=2 GITVERSION:=$(shell cat .git/refs/heads/master) @@ -14,6 +15,7 @@ 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 CHAPTER_LIST= \ sysadmin \ @@ -96,11 +98,17 @@ GEN_SCRIPTS= \ gen-pve-firewall-rules-opts.pl \ gen-pve-firewall-vm-opts.pl +SYSADMIN_PARTS= \ + getting-help \ + pve-network \ + pve-package-repos \ + pve-installation \ + system-software-updates \ + local-lvm \ + local-zfs + SYSADMIN_SOURCES= \ - getting-help.adoc \ - pve-package-repos.adoc \ - pve-installation.adoc \ - system-software-updates.adoc \ + $(addsuffix .adoc, ${SYSADMIN_PARTS}) \ sysadmin.adoc API_VIEWER_SOURCES= \ @@ -142,9 +150,10 @@ PVE_ADMIN_GUIDE_SOURCES= \ GFDL.adoc \ attributes.txt -WIKI_IMPORTS= \ - $(addsuffix -plain.html, $(addprefix chapter-, ${CHAPTER_LIST}))\ - $(addsuffix .5-plain.html, ${CONFIG_LIST}) \ +WIKI_IMPORTS= \ + $(addsuffix -plain.html, $(addprefix sysadmin-, ${SYSADMIN_PARTS})) \ + $(addsuffix -plain.html, $(addprefix chapter-, ${CHAPTER_LIST})) \ + $(addsuffix .5-plain.html, ${CONFIG_LIST}) \ $(addsuffix -plain.html, $(addprefix pve-storage-, ${STORAGE_TYPES})) INDEX_INCLUDES= \ @@ -168,6 +177,11 @@ all: index.html %-nwdiag.svg: %.nwdiag nwdiag -T svg $*.nwdiag -o $@; +sysadmin-%-plain.html: %.adoc + asciidoc -s -a wiki -a 'leveloffset=-1' ${ADOC_STDARG} -o $@ $*.adoc + +chapter-sysadmin.html chapter-sysadmin-plain.html: ${SYSADMIN_SOURCES} + chapter-%.html: %.adoc ${PVE_COMMON_DOC_SOURCES} asciidoc ${ADOC_STDARG} -a toc -o $@ $*.adoc @@ -192,6 +206,9 @@ pmxcfs.8.html: pmxcfs.adoc pmxcfs.8-cli.adoc ${PVE_COMMON_DOC_SOURCES} %.5-plain.html: %.adoc %.5-opts.adoc ${PVE_COMMON_DOC_SOURCES} asciidoc -s ${ADOC_MAN5_HTML_ARGS} -o $@ $*.adoc +README.html: README.adoc + asciidoc ${ADOC_STDARG} -o $@ $< + .PHONY: index index: index.html $(BROWSER) index.html & @@ -207,8 +224,10 @@ pve-admin-guide.chunked: ${PVE_ADMIN_GUIDE_SOURCES} a2x -a docinfo -a docinfo1 -a icons -f chunked pve-admin-guide.adoc pve-admin-guide.pdf: ${PVE_ADMIN_GUIDE_SOURCES} docinfo.xml pve-admin-guide-docinfo.xml + inkscape -z -D --export-pdf=logo.pdf images/proxmox-logo.svg grep ">Release ${DOCRELEASE}<" pve-admin-guide-docinfo.xml || (echo "wrong release in pve-admin-guide-docinfo.xml" && false); - a2x -a docinfo -a docinfo1 -f pdf -L --dblatex-opts "-P latex.output.revhistory=0" --dblatex-opts "-P latex.class.options=12pt" --dblatex-opts "-P doc.section.depth=2 -P toc.section.depth=2" pve-admin-guide.adoc + a2x -a docinfo -a docinfo1 -f pdf -L --dblatex-opts "-P latex.output.revhistory=0" --dblatex-opts "-P latex.class.options=12pt" --dblatex-opts "-P doc.section.depth=2 -P toc.section.depth=2" --dblatex-opts "-P doc.publisher.show=0 -s asciidoc-dblatex-custom.sty" pve-admin-guide.adoc + rm logo.pdf pve-admin-guide.epub: ${PVE_ADMIN_GUIDE_SOURCES} a2x -f epub pve-admin-guide.adoc @@ -220,16 +239,15 @@ api-viewer/apidoc.js: api-viewer/apidata.js api-viewer/PVEAPI.js cat api-viewer/apidata.js api-viewer/PVEAPI.js >$@ .PHONY: dinstall -dinstall: ${GEN_DEB} ${DOC_DEB} - dpkg -i ${GEN_DEB} ${DOC_DEB} +dinstall: ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB} + dpkg -i ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB} .PHONY: deb deb: - rm -f ${GEN_DEB} ${DOC_DEB}; - make ${GEN_DEB}; - make ${DOC_DEB}; + rm -f ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB}; + make ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB}; -${GEN_DEB} ${DOC_DEB}: index.html ${INDEX_INCLUDES} ${WIKI_IMPORTS} ${API_VIEWER_SOURCES} ${GEN_DEB_SOURCES} +${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB}: index.html ${INDEX_INCLUDES} ${WIKI_IMPORTS} ${API_VIEWER_SOURCES} ${GEN_DEB_SOURCES} rm -rf build mkdir build rsync -a debian/ build/debian @@ -247,21 +265,15 @@ ${GEN_DEB} ${DOC_DEB}: index.html ${INDEX_INCLUDES} ${WIKI_IMPORTS} ${API_VIEWER # install api doc viewer mkdir build/usr/share/${DOC_PACKAGE}/api-viewer install -m 0644 ${API_VIEWER_SOURCES} build/usr/share/${DOC_PACKAGE}/api-viewer - # build debain package + # build Debian packages cd build; dpkg-buildpackage -rfakeroot -b -us -uc lintian ${GEN_DEB} lintian ${DOC_DEB} + lintian ${MEDIAWIKI_DEB} .PHONY: upload -upload: ${GEN_DEB} ${DOC_DEB} - umount /pve/${DOCRELEASE}; mount /pve/${DOCRELEASE} -o rw - mkdir -p /pve/${DOCRELEASE}/extra - rm -f /pve/${DOCRELEASE}/extra/${GEN_PACKAGE}_*.deb - rm -f /pve/${DOCRELEASE}/extra/${DOC_PACKAGE}_*.deb - rm -f /pve/${DOCRELEASE}/extra/Packages* - cp ${GEN_DEB} ${DOC_DEB} /pve/${DOCRELEASE}/extra - cd /pve/${DOCRELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz - umount /pve/${DOCRELEASE}; mount /pve/${DOCRELEASE} -o ro +upload: ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB} + tar cf - ${GEN_DEB} ${DOC_DEB} ${MEDIAWIKI_DEB} | ssh repoman@repo.proxmox.com upload .PHONY: update update: clean @@ -271,5 +283,5 @@ update: clean make all clean: - rm -rf *.tmp.xml *.html *.pdf *.epub *.tmp *.1 *.5 *.8 *.deb *.changes build api-viewer/apidoc.js chapter-*.html chapter-*-plain.html chapter-*.html pve-admin-guide.chunked + rm -rf logo.pdf *.tmp.xml *.html *.pdf *.epub *.tmp *.1 *.5 *.8 *.deb *.changes build api-viewer/apidoc.js chapter-*.html chapter-*-plain.html chapter-*.html pve-admin-guide.chunked find . -name '*~' -exec rm {} ';'