Skip to content

Commit

Permalink
doc: Replace html documentation with redirect to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
cmouse committed Nov 29, 2024
1 parent 28ca71c commit abcba28
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 38 deletions.
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,11 @@ src/**/test-*
!src/**/test-*.h
!src/**/test-*.inc

doc/venv
doc/documentation*
doc/html

doc/man/*.1
doc/man/*.7
doc/stamp-man
doc/stamp-html
doc/index.html

doc/example-config/README
doc/example-config/dovecot.conf
Expand Down
11 changes: 1 addition & 10 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -232,16 +232,6 @@ DOVECOT_WANT_SYSTEMD
dovecot_moduledir="$libdir/dovecot"
DC_DOVECOT_MODULEDIR

AC_ARG_WITH(docs,
AS_HELP_STRING([--with-docs], [Install documentation (default)]),
if test x$withval = xno; then
want_docs=no
else
want_docs=yes
fi,
want_docs=yes)
AM_CONDITIONAL(INSTALL_DOCS, test "$want_docs" = "yes")

dnl always enable all of the passbs and userdbs that don't require extra libs
want_passwd=yes
want_passwd_file=yes
Expand Down Expand Up @@ -819,6 +809,7 @@ AC_CONFIG_FILES([
Makefile
doc/Makefile
doc/man/Makefile
doc/index.html
doc/example-config/Makefile
doc/example-config/conf.d/Makefile
src/Makefile
Expand Down
30 changes: 6 additions & 24 deletions doc/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
extra_dist_extra =

SUBDIRS = . example-config
SUBDIRS = . example-config man
DOCDIRS = example-config

docfiles = \
Expand All @@ -10,35 +8,21 @@ docfiles = \
solr-schema-7.7.0.xml \
solr-config-7.7.0.xml \
solr-config-9.xml \
solr-schema-9.xml
solr-schema-9.xml \
index.html

DOCS_URL=https://$(DOVECOT_ASSET_URL)/$(DOVECOT_ASSET_VERSION)/docs.txz
MAN_URL=https://$(DOVECOT_ASSET_URL)/$(DOVECOT_ASSET_VERSION)/core.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 =

if INSTALL_DOCS
SUBDIRS += man
DOCDIRS += html
endif

extra_dist_extra += html stamp-html stamp-man
BUILT_SOURCES = stamp-html stamp-man

stamp-html:
$(AM_V_at)$(WGET) -nv -O- $(DOCS_URL) | xz -d | $(am__untar) && \
touch stamp-html || rm -f stamp-html

stamp-man:
$(AM_V_at)$(WGET) -nv -O- $(MAN_URL) | xz -d | $(am__untar) && \
touch stamp-man || rm -f stamp-man

all-local: html

html-local: stamp-html stamp-man
all-local: stamp-man

install-data-local:
$(MKDIR_P) $(DESTDIR)$(docdir); \
Expand All @@ -55,10 +39,8 @@ doc_DATA = $(docfiles)

EXTRA_DIST = \
dovecot-initd.sh \
$(extra_dist_extra) \
stamp-man \
$(docfiles)

distclean-local:
-if test "$(extra_dist_extra)" != ""; then \
rm -rf $(extra_dist_extra); \
fi
-rm -f stamp-man
16 changes: 16 additions & 0 deletions doc/index.html.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="refresh" content="0;URL='https://@DOVECOT_ASSET_URL@/latest/'">
</head>

<body>
<h1>Dovecot Documentation</h1>
<p>
Redirecting to <a href="https://@DOVECOT_ASSET_URL@/latest/">https://@DOVECOT_ASSET_URL@/latest/</a>...
</p>
</body>
</html>

0 comments on commit abcba28

Please sign in to comment.