release=$1
[ -n "$release" ]
+redo-ifchange module-name streebog256
+mod_name=`cat module-name`
git clone . $tmp/gogost-$release
cd $tmp/gogost-$release
-git checkout $release
-git submodule update --init
-
-mkdir -p src/cypherpunks.ru/gogost/vendor
-cat > $tmp/includes <<EOF
-golang.org/x/crypto/AUTHORS
-golang.org/x/crypto/CONTRIBUTORS
-golang.org/x/crypto/LICENSE
-golang.org/x/crypto/PATENTS
-golang.org/x/crypto/README
-golang.org/x/crypto/pbkdf2
+git checkout v$release
+
+crypto_mod_path=$(sed -n 's#^require \(golang.org/x/crypto\) \(.*\)$#\1@\2#p' go.mod)
+mkdir -p src/$mod_name
+mv \
+ gost28147 \
+ gost3410 \
+ gost34112012256 \
+ gost34112012512 \
+ gost341194 \
+ gost3412128 \
+ gost341264 \
+ gost3413 \
+ mgm \
+ prfplus \
+ cmd internal gogost.go go.mod go.sum src/$mod_name
+
+rm module-name.do clean.do
+echo $mod_name > module-name
+find . -name "*.do" -exec perl -i -npe "s/^go/GOPATH=\`pwd\` go/" {} \;
+
+mkdir -p src/golang.org/x/crypto
+( cd $GOPATH/pkg/mod/$crypto_mod_path ; \
+ tar cf - AUTHORS CONTRIBUTORS LICENSE PATENTS README.md pbkdf2 hkdf ) |
+ tar xfC - src/golang.org/x/crypto
+
+cat > download.texi <<EOF
+You can obtain releases source code prepared tarballs on
+@url{http://gogost.cypherpunks.ru/}.
EOF
-tar cfCI - src $tmp/includes | tar xfC - src/cypherpunks.ru/gogost/vendor
+
+texi=$(mktemp)
+cat > $texi <<EOF
+\input texinfo
+@documentencoding UTF-8
+@settitle INSTALL
+@include install.texi
+@bye
+EOF
+makeinfo --plaintext -o INSTALL $texi
+rm $texi
+
+cat > $texi <<EOF
+\input texinfo
+@documentencoding UTF-8
+@settitle NEWS
+@include news.texi
+@bye
+EOF
+makeinfo --plaintext -o NEWS $texi
+
+cat > $texi <<EOF
+\input texinfo
+@documentencoding UTF-8
+@settitle FAQ
+@include faq.texi
+@bye
+EOF
+makeinfo --plaintext -o FAQ $texi
+
find . -name .git -type d | xargs rm -fr
-rm -fr www* makedist* TODO src/golang.org $tmp/includes
+rm -f *.texi www.do style.css makedist.sh TODO .gitignore
+
+find . -type d -exec chmod 755 {} \;
+find . -type f -exec chmod 644 {} \;
cd ..
-tar cvf gogost-"$release".tar gogost-"$release"
+tar cvf gogost-"$release".tar --uid=0 --gid=0 --numeric-owner gogost-"$release"
xz -9 gogost-"$release".tar
gpg --detach-sign --sign --local-user 82343436696FC85A gogost-"$release".tar.xz
tarball=gogost-"$release".tar.xz
-size=$(( $(wc -c < $tarball) / 1024 ))
+size=$(( $(stat -f %z $tarball) / 1024 ))
hash=$(gpg --print-md SHA256 < $tarball)
hashsb=$($HOME/work/gogost/streebog256 < $tarball)
+release_date=$(date "+%Y-%m-%d")
cat <<EOF
An entry for documentation:
-@item $release @tab $size KiB
+@item @ref{Release $release, $release} @tab $release_date @tab $size KiB
@tab @url{gogost-${release}.tar.xz, link} @url{gogost-${release}.tar.xz.sig, sign}
@tab @code{$hash}
@tab @code{$hashsb}
------------------------ >8 ------------------------
GoGOST'es home page is: http://gogost.cypherpunks.ru/
-Also available as I2P service:
-http://a5zmymxbjreuvbftgzmu64vcw2ssa3s44c2dn2jryxee6utn34qa.b32.i2p/
Source code and its signature for that version can be found here:
------------------------ >8 ------------------------
Домашняя страница GoGOST: http://gogost.cypherpunks.ru/
-Также доступная как I2P сервис:
-http://a5zmymxbjreuvbftgzmu64vcw2ssa3s44c2dn2jryxee6utn34qa.b32.i2p/
Исходный код и его подпись для этой версии могут быть найдены здесь: