diff --git a/HISTORY b/HISTORY index 84011813..8a006006 100644 --- a/HISTORY +++ b/HISTORY @@ -4,6 +4,7 @@ repmgr: improve "--dry-run" behaviour for "standby promote" and "standby switchover" (Ian) repmgrd: monitor standbys attached to primary (Ian) + general: documentation converted to DocBook XML format (Ian) 4.3.1 2019-??-?? repmgr: ensure BDR2-specific functionality cannot be used on diff --git a/doc/Makefile b/doc/Makefile index 866ef62a..b8d07e22 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -18,6 +18,10 @@ ifndef XSLTPROC XSLTPROC = $(missing) xsltproc endif +ifndef FOP +FOP = $(missing) fop +endif + override XSLTPROCFLAGS += --stringparam repmgr.version '$(REPMGR_VERSION)' GENERATED_SGML = version.sgml @@ -53,6 +57,32 @@ zip: html zip -r repmgr-docs-$(REPMGR_VERSION).zip repmgr-docs-$(REPMGR_VERSION) rm -rf repmgr-docs-$(REPMGR_VERSION) +## +## Print +## + +repmgr.pdf: + $(error Invalid target; use repmgr-A4.pdf or repmgr-US.pdf as targets) + +# Standard paper size + +repmgr-A4.fo: stylesheet-fo.xsl repmgr.sgml $(ALLSGML) + $(XMLLINT) $(XMLINCLUDE) --noout --valid $(word 2,$^) + $(XSLTPROC) $(XMLINCLUDE) $(XSLTPROCFLAGS) --stringparam paper.type A4 -o $@ $(wordlist 1,2,$^) + +repmgr-A4.pdf: repmgr-A4.fo + $(FOP) -fo $< -pdf $@ + +# North American paper size + +repmgr-US.fo: stylesheet-fo.xsl repmgr.sgml $(ALLSGML) + $(XMLLINT) $(XMLINCLUDE) --noout --valid $(word 2,$^) + $(XSLTPROC) $(XMLINCLUDE) $(XSLTPROCFLAGS) --stringparam paper.type USletter -o $@ $(wordlist 1,2,$^) + +repmgr-US.pdf: repmgr-US.fo + $(FOP) -fo $< -pdf $@ + + install: html @$(MKDIR_P) $(DESTDIR)$(docdir)/$(docmoduledir)/repmgr @$(INSTALL_DATA) $(wildcard html/*.html) $(wildcard html/*.css) $(DESTDIR)$(docdir)/$(docmoduledir)/repmgr diff --git a/doc/appendix-release-notes.sgml b/doc/appendix-release-notes.sgml index 3cb8e459..61cb4548 100644 --- a/doc/appendix-release-notes.sgml +++ b/doc/appendix-release-notes.sgml @@ -88,7 +88,8 @@ as currently used by the main PostgreSQL project. This means it can now be built against any &repmgr; version (previously it was not possible to build the documentation against - PostgreSQL 10 or later). + PostgreSQL 10 or later), and makes it easier to provide the documentation + in other formats such as PDF. For further details see: diff --git a/doc/install-requirements.sgml b/doc/install-requirements.sgml index f554fdc4..bf7a765a 100644 --- a/doc/install-requirements.sgml +++ b/doc/install-requirements.sgml @@ -93,7 +93,7 @@ &repmgr; compatibility matrix - + diff --git a/doc/install-source.sgml b/doc/install-source.sgml index 2e7c8773..2bc80ffa 100644 --- a/doc/install-source.sgml +++ b/doc/install-source.sgml @@ -244,7 +244,18 @@ deb-src http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main - PostgreSQL documentation then execute: + PostgreSQL documentation. + + + + + In &repmgr; 4.3 and earlier, the documentation can only be built against + PostgreSQL 9.6 or earlier. + + + + + To build the documentation as HTML, execute: cd doc/ && make @@ -260,12 +271,14 @@ deb-src http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main - - - In &repmgr; 4.3 and earlier, the documentation can only be built against - PostgreSQL 9.6 or earlier. - - + + To build the documentation as a PDF file, after configuring and building + the main &repmgr; source as described above, execute: + + cd doc/ && make repmgr-A4.pdf + + + diff --git a/doc/repmgr.sgml b/doc/repmgr.sgml index 13206def..43763016 100644 --- a/doc/repmgr.sgml +++ b/doc/repmgr.sgml @@ -51,7 +51,7 @@ &repmgr; is fully supported by 2ndQuadrant's 24/7 Production Support. 2ndQuadrant, a Major Sponsor of the PostgreSQL project, continues to develop and maintain &repmgr;. - Other companies as well as individual developers are welcome to participate in the efforts. + Other organisations as well as individual developers are welcome to participate in the efforts.