]> Cypherpunks.ru repositories - gogost.git/blobdiff - makedist.sh
Do not alter ukm in gost3410.KEK*
[gogost.git] / makedist.sh
index 2fbbc3516ae579f23aeba22f71e858060a16058e..c8f0d760a254f5ac7cd4c7a4885f1775b9958aaf 100755 (executable)
@@ -5,11 +5,13 @@ tmp=$(mktemp -d)
 release=$1
 [ -n "$release" ]
 
+redo-ifchange streebog256
 git clone . $tmp/gogost-$release
 cd $tmp/gogost-$release
-git checkout $release
+git checkout v$release
+redo module-name VERSION
+mod_name=`cat module-name`
 
-mod_name=$(sed -n 's/^module //p' go.mod)
 crypto_mod_path=$(sed -n 's#^require \(golang.org/x/crypto\) \(.*\)$#\1@\2#p' go.mod)
 mkdir -p src/$mod_name
 mv \
@@ -22,18 +24,76 @@ mv \
     gost341264 \
     gost3413 \
     mgm \
-    internal gogost.go go.mod go.sum src/$mod_name
+    prfplus \
+    cmd internal gogost.go go.mod go.sum src/$mod_name
+
+echo $mod_name > module-name
+find . -name "*.do" -exec perl -i -npe "s/^go/GOPATH=\`pwd\` go/" {} \;
+mkdir contrib
+cp ~/work/redo/minimal/do contrib/do
 
 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
 
-find . -name .git -type d | xargs rm -fr
-rm -f www* news.texi style.css makedist* TODO
+cat > download.texi <<EOF
+You can obtain releases source code prepared tarballs on
+@url{http://www.gogost.cypherpunks.ru/}.
+EOF
+
+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
+mkinfo --output INSTALL $texi
+
+cat > $texi <<EOF
+\input texinfo
+@documentencoding UTF-8
+@settitle NEWS
+@include news.texi
+@bye
+EOF
+mkinfo --output NEWS $texi
+
+cat > $texi <<EOF
+\input texinfo
+@documentencoding UTF-8
+@settitle FAQ
+@include faq.texi
+@bye
+EOF
+mkinfo --output FAQ $texi
 
-find . -type d -exec chmod 700 {} \;
-find . -type f -exec chmod 600 {} \;
+find . -name .git -type d | xargs rm -fr
+rm -fr .redo
+rm -f \
+    $texi \
+    *.texi \
+    .gitignore \
+    clean.do \
+    makedist.sh \
+    module-name.do \
+    style.css \
+    TODO \
+    VERSION.do \
+    www.do
+
+find . -type d -exec chmod 755 {} \;
+find . -type f -exec chmod 644 {} \;
+chmod 755 contrib/do
 
 cd ..
 tar cvf gogost-"$release".tar --uid=0 --gid=0 --numeric-owner gogost-"$release"
@@ -69,12 +129,12 @@ The main improvements for that release are:
 
 ------------------------ >8 ------------------------
 
-GoGOST'es home page is: http://gogost.cypherpunks.ru/
+GoGOST'es home page is: http://www.gogost.cypherpunks.ru/
 
 Source code and its signature for that version can be found here:
 
-    http://gogost.cypherpunks.ru/gogost-${release}.tar.xz ($size KiB)
-    http://gogost.cypherpunks.ru/gogost-${release}.tar.xz.sig
+    http://www.gogost.cypherpunks.ru/gogost-${release}.tar.xz ($size KiB)
+    http://www.gogost.cypherpunks.ru/gogost-${release}.tar.xz.sig
 
 Streebog-256 hash: $hashsb
 SHA256 hash: $hash
@@ -101,12 +161,12 @@ GoGOST это свободное программное обеспечение 
 
 ------------------------ >8 ------------------------
 
-Домашняя страница GoGOST: http://gogost.cypherpunks.ru/
+Домашняя страница GoGOST: http://www.gogost.cypherpunks.ru/
 
 Исходный код и его подпись для этой версии могут быть найдены здесь:
 
-    http://gogost.cypherpunks.ru/gogost-${release}.tar.xz ($size KiB)
-    http://gogost.cypherpunks.ru/gogost-${release}.tar.xz.sig
+    http://www.gogost.cypherpunks.ru/gogost-${release}.tar.xz ($size KiB)
+    http://www.gogost.cypherpunks.ru/gogost-${release}.tar.xz.sig
 
 Streebog-256 хэш: $hashsb
 SHA256 хэш: $hash
@@ -119,3 +179,4 @@ https://lists.cypherpunks.ru/mailman/listinfo/gost
 EOF
 
 mv $tmp/$tarball $tmp/"$tarball".sig $cur/gogost.html/
+rm -fr $tmp