X-Git-Url: https://git.proxmox.com/?p=pve-docs.git;a=blobdiff_plain;f=Makefile;h=87926bd82dd0af395f39c7f1f329acdf25f41001;hp=ee2150a88976706f33839f5e7f0fe90cdd4bd4a4;hb=459308313d45bc7889792dc08c100375100e5a25;hpb=ad2bfc41aeda3dab3f2d1a0191cb3097c4e627e1 diff --git a/Makefile b/Makefile index ee2150a..87926bd 100644 --- a/Makefile +++ b/Makefile @@ -4,18 +4,21 @@ include ./pve-doc-generator.mk GEN_PACKAGE=pve-doc-generator DOC_PACKAGE=pve-docs +MEDIAWIKI_PACKAGE=pve-docs-mediawiki # also update debian/changelog -GEN_PKGREL=1 -# also update doc-debian/changelog -DOC_PKGREL=2 +PKGREL=5 GITVERSION:=$(shell cat .git/refs/heads/master) -GEN_DEB=${GEN_PACKAGE}_${DOCRELEASE}-${GEN_PKGREL}_amd64.deb -DOC_DEB=${DOC_PACKAGE}_${DOCRELEASE}-${DOC_PKGREL}_all.deb +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= \ + pve-installation \ sysadmin \ pvecm \ pmxcfs \ @@ -51,7 +54,8 @@ COMMAND_LIST= \ pvesm \ pveum \ vzdump \ - ha-manager + ha-manager \ + pveperf SERVICE_LIST= \ pve-firewall \ @@ -76,6 +80,7 @@ GEN_DEB_SOURCES= \ pve-storage-iscsi.adoc \ pve-storage-iscsidirect.adoc \ pve-storage-lvm.adoc \ + pve-storage-lvmthin.adoc \ pve-storage-nfs.adoc \ pve-storage-rbd.adoc \ pve-storage-zfspool.adoc \ @@ -86,6 +91,8 @@ GEN_DEB_SOURCES= \ GEN_SCRIPTS= \ gen-datacenter.cfg.5-opts.pl \ gen-pct.conf.5-opts.pl \ + gen-pct-network-opts.pl \ + gen-pct-mountpoint-opts.pl \ gen-qm.conf.5-opts.pl \ gen-vzdump.conf.5-opts.pl \ gen-pve-firewall-cluster-opts.pl \ @@ -94,11 +101,21 @@ GEN_SCRIPTS= \ gen-pve-firewall-rules-opts.pl \ gen-pve-firewall-vm-opts.pl +INSTALLATION_SOURCES= \ + pve-usbstick.adoc \ + pve-system-requirements.adoc \ + pve-installation.adoc + +SYSADMIN_PARTS= \ + pve-network \ + pve-package-repos \ + system-software-updates \ + pve-disk-health-monitoring \ + 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= \ @@ -112,6 +129,8 @@ PVE_ADMIN_GUIDE_SOURCES= \ ${SYSADMIN_SOURCES} \ pve-admin-guide.adoc \ pve-intro.adoc \ + getting-help.adoc \ + ${INSTALLATION_SOURCES} \ pmxcfs.adoc \ pmxcfs.8-cli.adoc \ pve-faq.adoc \ @@ -133,6 +152,7 @@ PVE_ADMIN_GUIDE_SOURCES= \ ${PVEAM_MAN1_SOURCES} \ ${PVESUBSCRIPTION_MAN1_SOURCES} \ ${PVECEPH_MAN1_SOURCES} \ + ${PVEPERF_MAN1_SOURCES} \ pve-bibliography.adoc \ $(addsuffix .adoc, ${COMMAND_LIST}) \ $(addsuffix .adoc, ${SERVICE_LIST}) \ @@ -140,9 +160,26 @@ PVE_ADMIN_GUIDE_SOURCES= \ GFDL.adoc \ attributes.txt -WIKI_IMPORTS= \ - $(addsuffix -plain.html, $(addprefix chapter-, ${CHAPTER_LIST}))\ - $(addsuffix .5-plain.html, ${CONFIG_LIST}) \ +link-refs.json: scan-adoc-refs ${PVE_ADMIN_GUIDE_SOURCES} + ./scan-adoc-refs ${PVE_ADMIN_GUIDE_SOURCES} >link-refs.json + +asciidoc-pve: asciidoc-pve.in link-refs.json + cat asciidoc-pve.in link-refs.json >asciidoc-pve.tmp + sed -e s/@RELEASE@/${DOCRELEASE}/ -i asciidoc-pve.tmp + chmod +x asciidoc-pve.tmp + mv asciidoc-pve.tmp asciidoc-pve + +test: asciidoc-pve + ./asciidoc-pve compile-wiki-section pve-package-repos.adoc + #./asciidoc-pve compile-wiki-chapter ha-manager.adoc + +WIKI_IMPORTS= \ + section-pve-usbstick-plain.html \ + section-getting-help-plain.html \ + section-pve-system-requirements-plain.html \ + $(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= \ @@ -166,14 +203,22 @@ all: index.html %-nwdiag.svg: %.nwdiag nwdiag -T svg $*.nwdiag -o $@; +sysadmin-%-plain.html: asciidoc-pve %.adoc + ./asciidoc-pve compile-wiki-section -o $@ $*.adoc + +section-%-plain.html: asciidoc-pve %.adoc + ./asciidoc-pve compile-wiki-section -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 chapter-%-plain.html: %.adoc ${PVE_COMMON_DOC_SOURCES} - asciidoc -s -a wiki ${ADOC_STDARG} -o $@ $*.adoc + ./asciidoc-pve compile-wiki-chapter -o $@ $*.adoc pve-storage-%-plain.html: pve-storage-%.adoc ${PVE_COMMON_DOC_SOURCES} - asciidoc -s -a wiki -a 'leveloffset=-1' ${ADOC_STDARG} -o $@ pve-storage-$*.adoc + ./asciidoc-pve compile-wiki-section -o $@ pve-storage-$*.adoc %.1.html: %.adoc %.1-synopsis.adoc ${PVE_COMMON_DOC_SOURCES} asciidoc ${ADOC_MAN1_HTML_ARGS} -o $@ $*.adoc @@ -190,6 +235,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 & @@ -198,15 +246,18 @@ index.html: index.adoc ${API_VIEWER_SOURCES} ${INDEX_INCLUDES} asciidoc -a "date=$(shell date)" -a "revnumber=${DOCRELEASE}" index.adoc pve-admin-guide.html: ${PVE_ADMIN_GUIDE_SOURCES} - asciidoc -a "revnumber=${DOCRELEASE}" -a "date=$(shell date)" pve-admin-guide.adoc + asciidoc -a pvelogo -a "revnumber=${DOCRELEASE}" -a "date=$(shell date)" pve-admin-guide.adoc pve-admin-guide.chunked: ${PVE_ADMIN_GUIDE_SOURCES} rm -rf pve-admin-guide.chunked 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=proxmox-logo.pdf images/proxmox-logo.svg + inkscape -z -D --export-pdf=proxmox-ci-header.pdf images/proxmox-ci-header.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 proxmox-logo.pdf proxmox-ci-header.pdf pve-admin-guide.epub: ${PVE_ADMIN_GUIDE_SOURCES} a2x -f epub pve-admin-guide.adoc @@ -218,61 +269,49 @@ 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}; -${DOC_DEB}: index.html ${INDEX_INCLUDES} ${WIKI_IMPORTS} ${API_VIEWER_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 doc-debian/ build/debian + rsync -a debian/ build/debian + echo "git clone git://git.proxmox.com/git/pve-docs.git\\ngit checkout ${GITVERSION}" > build/debian/SOURCE + # install files for pve-doc-generator package + mkdir -p build/usr/share/${GEN_PACKAGE} + mkdir -p build/usr/share/doc/${GEN_PACKAGE} + install -m 0644 ${GEN_DEB_SOURCES} build/usr/share/${GEN_PACKAGE} + install -m 0755 ${GEN_SCRIPTS} build/usr/share/${GEN_PACKAGE} + # install files for pvedocs package mkdir -p build/usr/share/${DOC_PACKAGE} mkdir -p build/usr/share/doc/${DOC_PACKAGE} - echo "git clone git://git.proxmox.com/git/pve-docs.git\\ngit checkout ${GITVERSION}" > build/usr/share/doc/${DOC_PACKAGE}/SOURCE - # install doc files install -m 0644 index.html ${INDEX_INCLUDES} build/usr/share/${DOC_PACKAGE} install -m 0644 ${WIKI_IMPORTS} build/usr/share/${DOC_PACKAGE} # 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 - cd build; dpkg-buildpackage -rfakeroot -b -us -uc - lintian ${DOC_DEB} - -${GEN_DEB}: ${GEN_DEB_SOURCES} - rm -rf build - mkdir build - rsync -a debian/ build/debian - mkdir -p build/usr/share/${GEN_PACKAGE} - mkdir -p build/usr/share/doc/${GEN_PACKAGE} - echo "git clone git://git.proxmox.com/git/pve-docs.git\\ngit checkout ${GITVERSION}" > build/usr/share/doc/${GEN_PACKAGE}/SOURCE - install -m 0644 ${GEN_DEB_SOURCES} build/usr/share/${GEN_PACKAGE} - install -m 0755 ${GEN_SCRIPTS} build/usr/share/${GEN_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 rm -f *.5-opts.adoc *.1-synopsis.adoc *.8-synopsis.adoc rm -f api-viewer/apidata.js - rm -f pve-firewall-macros.adoc + rm -f pve-firewall-macros.adoc pct-network-opts.adoc pct-mountpoint-opts.adoc make all -clean: - rm -rf *.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 +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 asciidoc-pve link-refs.json .asciidoc-pve-tmp_* find . -name '*~' -exec rm {} ';'