--- /dev/null
+# Sphinx
+FROM ubuntu:bionic as pdns-docs
+RUN apt-get update && apt-get -y dist-upgrade && apt-get -y --no-install-recommends install \
+ ghostscript \
+ git \
+ latexmk \
+ make \
+ python-minimal \
+ python2.7 \
+ texlive \
+ texlive-font-utils \
+ texlive-fonts-extra \
+ texlive-latex-extra \
+ virtualenv
+
+RUN mkdir -p /pdns /dist /sdist
+
+ADD builder/helpers/ /pdns/builder/helpers/
+
+@IF [ ! -z "$M_authoritative$M_all" ]
+ADD docs/ /pdns/docs
+@ENDIF
+
+@IF [ ! -z "$M_recursor$M_all" ]
+ADD pdns/recursordist/docs/ /pdns/pdns/recursordist/docs
+@ENDIF
+
+@IF [ ! -z "$M_dnsdist$M_all" ]
+ADD pdns/dnsdistdist/docs/ /pdns/pdns/dnsdistdist/docs
+@ENDIF
+
+ARG BUILDER_VERSION
+ARG PIP_INDEX_URL
+ARG PIP_TRUSTED_HOST
+
+@IF [ ! -z "$M_authoritative$M_all" ]
+WORKDIR /pdns/docs
+RUN rm -rf .venv _build
+RUN make -f Makefile.sphinx html || (cat /tmp/sphinx-err*; exit 1)
+RUN make -f Makefile.sphinx latexpdf || (cat /tmp/sphinx-err*; exit 1)
+RUN mkdir -p /dist/auth
+RUN cp -R _build/html _build/latex/PowerDNS*.pdf /dist/auth
+@ENDIF
+
+@IF [ ! -z "$M_recursor$M_all" ]
+WORKDIR /pdns/pdns/recursordist/docs
+RUN rm -rf .venv _build
+RUN make -f Makefile.sphinx html || (cat /tmp/sphinx-err*; exit 1)
+RUN make -f Makefile.sphinx latexpdf || (cat /tmp/sphinx-err*; exit 1)
+RUN mkdir -p /dist/rec
+RUN cp -R _build/html _build/latex/PowerDNS*.pdf /dist/rec
+@ENDIF
+
+@IF [ ! -z "$M_dnsdist$M_all" ]
+WORKDIR /pdns/pdns/dnsdistdist/docs
+RUN rm -rf .venv _build
+RUN make -f Makefile.sphinx html || (cat /tmp/sphinx-err*; exit 1)
+RUN make -f Makefile.sphinx latexpdf || (cat /tmp/sphinx-err*; exit 1)
+RUN mkdir -p /dist/dnsdist
+RUN cp -R _build/html _build/latex/dnsdist*.pdf /dist/dnsdist
+@ENDIF
--- /dev/null
+# Minimal makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS =
+SPHINXBUILD = .venv/bin/sphinx-build
+SPHINXPROJ = PowerDNSAuthoritativeServer
+SOURCEDIR = .
+BUILDDIR = _build
+
+# Put it first so that "make" without argument is like "make help".
+help: .venv
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+
+.PHONY: help Makefile.sphinx
+
+# Catch-all target: route all unknown targets to Sphinx using the new
+# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
+%: Makefile.sphinx .venv
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+
+.venv:
+ virtualenv .venv
+ .venv/bin/pip install -U pip setuptools setuptools-git
+ .venv/bin/pip install -r requirements.txt
+
+
# You can set these variables from the command line.
SPHINXOPTS =
-SPHINXBUILD = sphinx-build
+SPHINXBUILD = .venv/bin/sphinx-build
SPHINXPROJ = dnsdist
SOURCEDIR = .
BUILDDIR = _build
# Put it first so that "make" without argument is like "make help".
-help:
+help: .venv
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
-upload: html latexpdf
- rsync -r $(BUILDDIR)/html/* mango.plexis.eu:/srv/www/dump.plexis.eu/pdns/dnsdist-docs/html
- rsync $(BUILDDIR)/latex/dnsdist.pdf mango.plexis.eu:/srv/www/dump.plexis.eu/pdns/dnsdist-docs
-
-
-.PHONY: help Makefile
+.PHONY: help Makefile.sphinx
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
-%: Makefile
+%: Makefile.sphinx .venv
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+
+.venv:
+ virtualenv .venv
+ .venv/bin/pip install -U pip setuptools setuptools-git
+ .venv/bin/pip install -r requirements.txt
+
+
--- /dev/null
+# Minimal makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS =
+SPHINXBUILD = .venv/bin/sphinx-build
+SPHINXPROJ = PowerDNSRecursor
+SOURCEDIR = .
+BUILDDIR = _build
+
+# Put it first so that "make" without argument is like "make help".
+help: .venv
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+
+.PHONY: help Makefile.sphinx
+
+# Catch-all target: route all unknown targets to Sphinx using the new
+# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
+%: Makefile.sphinx .venv
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+
+.venv:
+ virtualenv .venv
+ .venv/bin/pip install -U pip setuptools setuptools-git
+ .venv/bin/pip install -r requirements.txt
+
+