]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
doc: Use html and man pages from doc.dovecot.org
authorAki Tuomi <aki.tuomi@open-xchange.com>
Thu, 17 Nov 2022 19:53:01 +0000 (21:53 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Fri, 18 Nov 2022 06:53:22 +0000 (06:53 +0000)
configure.ac
doc/Makefile.am
doc/man/Makefile.am
m4/check_python_venv.m4 [deleted file]

index 19b620f48667f59ecf0c6ba4327a1f3568d05e36..d83e44d14cb752e37875568f4bfa6b3bd7a828a3 100644 (file)
@@ -221,8 +221,6 @@ DOVECOT_WANT_SYSTEMD
 dovecot_moduledir="$libdir/dovecot"
 DC_DOVECOT_MODULEDIR
 
-DOVECOT_CHECK_PYTHON_VENV
-
 AC_ARG_WITH(docs,
 AS_HELP_STRING([--with-docs], [Install documentation (default)]),
        if test x$withval = xno; then
@@ -243,7 +241,8 @@ AC_PROG_CPP
 AC_PROG_CXX # lucene plugin needs this
 AC_CHECK_TOOL([FLEX],[flex],[:])
 AC_CHECK_TOOL([BISON],[bison],[:])
-AC_PATH_TOOL([WGET], [wget], [missing])
+AM_MISSING_PROG([WGET], [wget])
+
 AS_IF([test "$BISON" = ":" && test ! -e "$srcdir/src/lib/event-filter-parser.h"],
   AC_MSG_ERROR([Bison is required when building from git])
 ])
index 2a57e552a0c85c9f9482c198c4612646bcd80ad3..85ec538ea048f7b86513c29b9774c757c95a70e0 100644 (file)
@@ -11,92 +11,47 @@ docfiles = \
        solr-schema-7.7.0.xml \
        solr-config-7.7.0.xml
 
+DOCS_URL=https://doc.dovecot.org/assets/3.0/docs.txz
+MAN_URL=https://doc.dovecot.org/assets/3.0/man.txz
+
 AM_V_Q = $(am__v_Q_$(V))
 am__v_Q_ = $(am__v_Q_$(AM_DEFAULT_VERBOSITY))
 am__v_Q_0 = -q
 am__v_Q_1 =
 
+AM_V_DL_DOCS = $(am__v_DL_DOCS_$(V))
+am__v_DL_DOCS_ = $(am__v_DL_DOCS_$(AM_DEFAULT_VERBOSITY))
+am__v_DL_DOCS_0 = @echo "  DL     " $(DOCS_URL);
+am__v_DL_DOCS_1 =
+
+AM_V_DL_MAN = $(am__v_DL_MAN_$(V))
+am__v_DL_MAN_ = $(am__v_DL_MAN_$(AM_DEFAULT_VERBOSITY))
+am__v_DL_MAN_0 = @echo "  DL     " $(MAN_URL);
+am__v_DL_MAN_1 =
+
 if INSTALL_DOCS
 SUBDIRS += man
 DOCDIRS += html
+endif
 
-if HAVE_VENV
-BUILT_SOURCES = html mans
-extra_dist_extra += html man
-documentation_sources = $(top_srcdir)/doc/documentation-main
-
-.PHONY: mans prep-mans
-
-# extracting the documentation tarball from github yields the
-# "documentation-main" directory
-documentation-main:
-       $(AM_V_GEN)$(WGET) $(AM_V_Q) -O - \
-         https://github.com/dovecot/documentation/archive/refs/heads/main.tar.gz | \
-         gunzip | $(am__untar)
-
-$(documentation_sources)/requirements.txt: documentation-main
-
-venv: $(documentation_sources)/requirements.txt
-       $(AM_V_GEN)$(PYTHON) -m venv venv && \
-         venv/bin/pip $(AM_V_Q) install wheel && \
-         venv/bin/pip $(AM_V_Q) install -r "$(documentation_sources)/requirements.txt"
-
-prep-mans: venv
-       -$(AM_V_at)$(MAKE) -C $(documentation_sources)/source/man \
-         V=$(V) pkgsysconfdir=$(sysconfdir) \
-         rundir=$(rundir) \
-         pkglibexecdir=$(pkglibexecdir) \
-         AM_DEFAULT_VERBOSITY=$(AM_DEFAULT_VERBOSITY)
-
-man/dovecot.1:
-       $(MAKE) prep-mans
+extra_dist_extra += html
 
-mans: man/dovecot.1
-       $(AM_V_GEN)test -f man/dovecot.1 || venv/bin/python -msphinx $(AM_V_Q) \
-         -b man $(documentation_sources)/source man
+html-dl:
+       $(AM_V_DL_DOCS)$(WGET) $(AM_V_Q) -O- $(DOCS_URL) | xz -d | $(am__untar)
 
-html: man/dovecot.1
-       $(AM_V_GEN)test -f html/index.html || venv/bin/python -msphinx $(AM_V_Q) \
-           -b html $(documentation_sources)/source html
+man-dl:
+       $(AM_V_DL_MAN)$(WGET) $(AM_V_Q) -O- $(MAN_URL) | xz -d | $(am__untar)
 
-else # if HAVE_VENV
+all-local: html
 
-html:
-       if [ ! -e html/index.html ]; then \
-         echo "Building html documentation needs python installed"; \
+html-local:
+       $(AM_V_at)if [ ! -e html/index.html ]; then \
+               $(MAKE) html-dl; \
        fi
-
-mans:
-       if [ ! -e man/dovecot.1 ]; then \
-         echo "Building manpages needs python installed"; \
+       $(AM_V_at)if [ ! -e man/dovecot.1 ]; then \
+               $(MAKE) man-dl; \
        fi
 
-endif # if HAVE_VENV
-
-# explicit hook for make dist
-# remove all the build artifacts before packaging
-# NB: this is ran too late to build anything here.
-dist-hook:
-       -rm -rf $(distdir)/html/.buildinfo
-       -rm -rf $(distdir)/html/.doctrees
-       -rm -rf $(distdir)/html/_sources
-       -rm -rf $(distdir)/html/objects.inv
-       -rm -rf $(distdir)/man/.doctrees
-
-clean-local:
-       -rm -rf venv
-       -rm -rf $(documentation_sources)
-
-rebuild:
-       -rm -rf html
-       $(MAKE) -C man $@
-
-distclean-local: clean-local rebuild
-
-maintainer-clean: distclean-local
-
-endif # if INSTALL_DOCS
-
 install-data-local:
        $(MKDIR_P) $(DESTDIR)$(docdir); \
        for dir in $(DOCDIRS); do \
index 7d656c28ce496bc93d1de57edc5d6f48d7cb84f8..bb2a7052caa98d282ac4bfa65d3a55606d1b23a8 100644 (file)
@@ -6,15 +6,12 @@ static_mans = \
        doveadm-reload.1 \
        doveadm-stop.1
 
-dist_man1_MANS = $(wildcard *.1)
+dist_man1_MANS := $(wildcard *.1)
+dist_man7_MANS := $(wildcard *.7)
 
-dist_man7_MANS = $(wildcard *.7)
-
-rebuild:
+distclean-local:
        for page in *.1 *.7; do \
          if ! echo "$(static_mans)" | grep -qF "$$page"; then \
            rm -f $$page; \
          fi \
        done
-
-distclean-local: rebuild
diff --git a/m4/check_python_venv.m4 b/m4/check_python_venv.m4
deleted file mode 100644 (file)
index d9b5291..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-dnl Define DOVECOT_CHECK_PYTHON_VENV function to be used in configure.ac
-dnl Provide HAVE_VENV if we can access a virtual python environment,
-dnl which might be necessary to build the documentation if so desired.
-
-AC_DEFUN([DOVECOT_CHECK_PYTHON_VENV], [
-  AM_PATH_PYTHON([3.6],,[:])
-  AS_IF([test "${PYTHON}" != ":"], [
-    AX_PYTHON_MODULE([venv],[])
-  ])
-  AM_CONDITIONAL([HAVE_VENV], [test "x${HAVE_PYMOD_VENV}" = "xyes"])
-])