]> Cypherpunks.ru repositories - goredo.git/blobdiff - makedist.sh
Various documentation changes
[goredo.git] / makedist.sh
index b2a1d0f205b4947a3743934f5d4d0a13e93e95a8..0e9ec01762ef05516dbdde9c73f8fb85ca4d9953 100755 (executable)
@@ -13,17 +13,17 @@ redo-ifchange module-name VERSION
 mod_name=`cat module-name`
 
 ########################################################################
+cd doc
 cat > download.texi <<EOF
 You can obtain releases source code prepared tarballs on
 @url{http://www.goredo.cypherpunks.ru/}.
 EOF
-redo goredo.info
 
 mkinfo() {
     ${MAKEINFO:-makeinfo} --plaintext \
         --set-customization-variable CLOSE_QUOTE_SYMBOL=\" \
         --set-customization-variable OPEN_QUOTE_SYMBOL=\" \
-        -D "VERSION `cat VERSION`" $@
+        -D "VERSION `cat ../VERSION`" $@
 }
 
 texi=$(mktemp)
@@ -46,10 +46,22 @@ cat > $texi <<EOF
 @include install.texi
 @bye
 EOF
-perl -i -p -e "s/.verbatiminclude PUBKEY.asc/Look in PUBKEY.asc file./" install.texi
+perl -i -p -e "s/.verbatiminclude .*PUBKEY.asc/Look in PUBKEY.asc file./" install.texi
 mkinfo --output INSTALL $texi
 
+cat > $texi <<EOF
+\input texinfo
+@documentencoding UTF-8
+@settitle THANKS
+`cat doc/thanks.texi`
+@bye
+EOF
+mkinfo --output THANKS $texi
+
 rm $texi
+redo goredo.info
+mv goredo.info INSTALL NEWS THANKS ..
+cd ..
 
 ########################################################################
 
@@ -59,9 +71,9 @@ mv *.go go.* src/$mod_name
 mods="
 go.cypherpunks.ru/recfile
 go.cypherpunks.ru/tai64n
-golang.org/x/crypto
 golang.org/x/sys
 golang.org/x/term
+lukechampine.com/blake3
 "
 
 for mod in $mods; do
@@ -72,18 +84,17 @@ for mod in $mods; do
     chmod -R +w src/$mod
 done
 
+for mod in github.com/klauspost/cpuid; do
+    mod_path=$(sed -n "s#^\($mod\) \(.*\) h1:.*\$#\1@\2#p" src/$mod_name/go.sum | sed /go.mod/d | sort -n -r | sed -n 1p)
+    [ -n "$mod_path" ]
+    mkdir -p src/$mod
+    ( cd $GOPATH/pkg/mod/$mod_path ; tar cf - --exclude ".git*" * ) | tar xfC - src/$mod
+    chmod -R +w src/$mod
+done
+
 cat > $tmp/includes <<EOF
-golang.org/x/crypto/AUTHORS
-golang.org/x/crypto/blake2b
-golang.org/x/crypto/CONTRIBUTORS
-golang.org/x/crypto/go.mod
-golang.org/x/crypto/go.sum
-golang.org/x/crypto/LICENSE
-golang.org/x/crypto/PATENTS
-golang.org/x/crypto/README.md
 golang.org/x/sys/AUTHORS
 golang.org/x/sys/CONTRIBUTORS
-golang.org/x/sys/cpu
 golang.org/x/sys/go.mod
 golang.org/x/sys/internal/unsafeheader
 golang.org/x/sys/LICENSE
@@ -96,9 +107,12 @@ tar cfCI - src $tmp/includes | tar xfC - $tmp
 rm -fr src/golang.org $tmp/includes
 mv $tmp/golang.org src
 
+rm -r src/golang.org/x/sys/unix/linux
+rm -r src/github.com/klauspost/cpuid/private src/github.com/klauspost/cpuid/testdata
+
 ########################################################################
 
-rm -rf *.texi .redo .git .gitignore makedist.sh goredo.info.do module-name* VERSION.do
+rm -rf *.texi .redo .git .gitignore doc makedist.sh module-name* VERSION.do
 find . -type d -exec chmod 755 {} \;
 find . -type f -exec chmod 644 {} \;
 
@@ -115,11 +129,11 @@ release_date=$(date "+%Y-%m-%d")
 cat <<EOF
 An entry for documentation:
 @item @ref{Release $release, $release} @tab $release_date @tab $size KiB
-@tab @url{goredo-${release}.tar.zst, link} @url{goredo-${release}.tar.zst.sig, sign}
+@tab @url{download/goredo-${release}.tar.zst, link} @url{download/goredo-${release}.tar.zst.sig, sign}
 @tab @code{$hash}
 EOF
 
-mv $tmp/$tarball $tmp/"$tarball".sig $cur/goredo.html/download
+mv $tmp/$tarball $tmp/"$tarball".sig $cur/doc/goredo.html/download
 
 cat <<EOF
 Subject: goredo $release release announcement