cd $tmp/gocheese-$release
git checkout v$release
-mod_name=$(sed -n 's/^module //p' go.mod)
+redo-ifchange module-name VERSION
+mod_name=`cat module-name`
+
+cat > download.texi <<EOF
+You can obtain releases source code prepared tarballs on
+@url{http://www.gocheese.cypherpunks.ru/}.
+EOF
+redo gocheese.info
+
crypto_mod_path=$(sed -n 's#^require \(golang.org/x/crypto\) \(.*\)$#\1@\2#p' go.mod)
mkdir -p src/$mod_name
mv *.go go.mod go.sum src/$mod_name
rm -fr src/golang.org $tmp/includes
mv $tmp/golang.org src
-cat > download.texi <<EOF
-@node Download
-@unnumbered Download
-You can obtain releases source code prepared tarballs on
-@url{http://gocheese.cypherpunks.ru/}.
+mkinfo() {
+ ${MAKEINFO:=makeinfo} --plaintext \
+ --set-customization-variable CLOSE_QUOTE_SYMBOL=\" \
+ --set-customization-variable OPEN_QUOTE_SYMBOL=\" \
+ -D "VERSION `cat VERSION`" $@
+}
+
+texi=$(mktemp)
+cat > $texi <<EOF
+\input texinfo
+@documentencoding UTF-8
+@settitle INSTALL
+@include install.texi
+@bye
EOF
-make gocheese.info
+perl -i -p -e "s/.verbatiminclude PUBKEY.asc/Look in PUBKEY.asc file./" install.texi
+mkinfo --output INSTALL $texi
+rm $texi
-rm -rf .git .gitignore style.css makedist* www.mk
+rm -rf .redo .git .gitignore style.css makedist.sh www.do module-name.do VERSION.do
+echo 'GOPATH=`pwd` ${GO:=go} build -o $3 `cat module-name`' > gocheese.do
+echo 'GOPATH=`pwd` ${GO:=go} test `cat module-name`/... >&2' > test.do
+cp ~/work/redo/minimal/do contrib/do
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
-chmod +x pyshop2packages.sh
+chmod 755 contrib/pyshop2packages.sh contrib/do
cd ..
tar cvf gocheese-"$release".tar --uid=0 --gid=0 --numeric-owner gocheese-"$release"
cat <<EOF
An entry for documentation:
-@item @ref{Release $release, $release} @tab $release_date @tab $size KiB
+@item $release @tab $release_date @tab $size KiB
@tab @url{gocheese-${release}.tar.xz, link} @url{gocheese-${release}.tar.xz.sig, sign}
@tab @code{$hash}
EOF