+perl -i -ne 'print unless /include pedro/' doc/index.texi doc/about.ru.texi
+perl -p -i -e 's/^(.verbatiminclude) .*$/$1 PUBKEY.asc/g' doc/integrity.texi
+mv doc/.well-known/openpgpkey/hu/i4cdqgcarfjdjnba6y4jnf498asg8c6p.asc PUBKEY.asc
+ln -s ../PUBKEY.asc doc
+redo doc
+
+########################################################################
+# Supplementary files autogeneration
+########################################################################
+texi=$(TMPDIR=doc mktemp)
+
+mkinfo() {
+ ${MAKEINFO:-makeinfo} --plaintext \
+ --set-customization-variable CLOSE_QUOTE_SYMBOL=\" \
+ --set-customization-variable OPEN_QUOTE_SYMBOL=\" \
+ -D "VERSION `cat VERSION`" $@
+}
+
+cat > $texi <<EOF
+\input texinfo
+@documentencoding UTF-8
+@settitle NEWS
+@node News
+@unnumbered News
+`sed -n '5,$p' < doc/news.texi`
+@bye
+EOF
+mkinfo --output NEWS $texi
+
+cat > $texi <<EOF
+\input texinfo
+@documentencoding UTF-8
+@settitle NEWS.RU
+@node Новости
+@unnumbered Новости
+`sed -n '3,$p' < doc/news.ru.texi | sed 's/^@subsection/@section/'`
+@bye
+EOF
+mkinfo --output NEWS.RU $texi
+
+cat > $texi <<EOF
+\input texinfo
+@documentencoding UTF-8
+@settitle INSTALL
+@include install.texi
+@bye
+EOF
+mkinfo --output INSTALL $texi
+
+cat > $texi <<EOF
+\input texinfo
+@documentencoding UTF-8
+@settitle THANKS
+`cat doc/thanks.texi`
+@bye
+EOF
+mkinfo --output THANKS $texi