]> Cypherpunks.ru repositories - gogost.git/blobdiff - makedist.sh
Download link for 4.2.4 release
[gogost.git] / makedist.sh
index 5aa690fe1c207499b0580639dc7823fe5a1cc598..5ca9e86a98caf29fd3a6a2118ee7f3a292ca0259 100755 (executable)
@@ -5,11 +5,12 @@ tmp=$(mktemp -d)
 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 v$release
 
-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 +23,57 @@ mv \
     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
+
+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 -f www* news.texi style.css makedist* TODO
+rm -f *.texi www.do style.css makedist.sh TODO .gitignore
 
-find . -type d -exec chmod 700 {} \;
-find . -type f -exec chmod 600 {} \;
+find . -type d -exec chmod 755 {} \;
+find . -type f -exec chmod 644 {} \;
 
 cd ..
 tar cvf gogost-"$release".tar --uid=0 --gid=0 --numeric-owner gogost-"$release"