]> Cypherpunks.ru repositories - gocheese.git/blobdiff - makedist.sh
Use Metalink
[gocheese.git] / makedist.sh
index 6eb38a71863ea0d32a8db36074e5d2fe957157d2..d8ce491b84954e8789ad04623f60703a6292b514 100755 (executable)
@@ -13,17 +13,20 @@ redo-ifchange VERSION
 
 go mod vendor
 
-cat > download.texi <<EOF
+cat > doc/download.texi <<EOF
 You can obtain releases source code prepared tarballs on
 @url{http://www.gocheese.cypherpunks.ru/}.
 EOF
-redo gocheese.info
+redo doc/gocheese.info
 
+cd doc
 mkinfo() {
     ${MAKEINFO:=makeinfo} --plaintext \
+        --set-customization-variable SECTION_NAME_IN_TITLE=1 \
+        --set-customization-variable TREE_TRANSFORMATIONS=complete_tree_nodes_menus \
         --set-customization-variable CLOSE_QUOTE_SYMBOL=\" \
         --set-customization-variable OPEN_QUOTE_SYMBOL=\" \
-        -D "VERSION `cat VERSION`" $@
+        -D "VERSION `cat ../VERSION`" $@
 }
 
 texi=$(mktemp)
@@ -34,11 +37,13 @@ cat > $texi <<EOF
 @include install.texi
 @bye
 EOF
-perl -i -p -e "s/.verbatiminclude PUBKEY.asc/Look in PUBKEY.asc file./" install.texi
-mkinfo --output INSTALL $texi
+perl -i -p -e "s/.verbatiminclude ...PUBKEY.asc/Look in PUBKEY.asc file./" install.texi
+mkinfo --output ../INSTALL $texi
 rm $texi
+cd ..
 
-rm -rf .redo .git .gitignore style.css makedist.sh www.do VERSION.do
+rm -rf .git .gitignore doc/.gitignore doc/style.css makedist.sh doc/www.do VERSION.do
+redo-cleanup full
 perl -i -npe "s/go} build/go} build -mod=vendor/" gocheese.do
 perl -i -npe "s/go} test/go} test -mod=vendor/" test.do
 cp ~/work/redo/minimal/do contrib/do
@@ -50,9 +55,13 @@ chmod +x contrib/pyshop2packages.sh contrib/do
 cd ..
 tar cvf gocheese-"$release".tar --uid=0 --gid=0 --numeric-owner gocheese-"$release"
 zstd -19 -v gocheese-"$release".tar
-gpg --detach-sign --sign --local-user CD5CD01F55343D88 gocheese-"$release".tar.zst
-
 tarball=gocheese-"$release".tar.zst
+gpg --detach-sign --sign --local-user CD5CD01F55343D88 $tarball
+gpg --enarmor < "$tarball".sig |
+    sed "/^Comment:/d ; s/ARMORED FILE/SIGNATURE/" > "$tarball".asc
+meta4-create -file "$tarball" -mtime "$tarball" -sig "$tarball".asc \
+    http://www.gocheese.cypherpunks.ru/download/"$tarball" > "$tarball".meta4
+
 size=$(( $(stat -f %z $tarball) / 1024 ))
 hash=$(gpg --print-md SHA256 < $tarball)
 release_date=$(date "+%Y-%m-%d")
@@ -60,8 +69,11 @@ release_date=$(date "+%Y-%m-%d")
 cat <<EOF
 An entry for documentation:
 @item $release @tab $release_date @tab $size KiB
-@tab @url{gocheese-${release}.tar.zst, link} @url{gocheese-${release}.tar.zst.sig, sign}
+@tab
+    @url{download/gocheese-${release}.tar.zst.meta4, meta4}
+    @url{download/gocheese-${release}.tar.zst, link}
+    @url{download/gocheese-${release}.tar.zst.sig, sig}
 @tab @code{$hash}
 EOF
 
-mv $tmp/$tarball $tmp/"$tarball".sig $cur/gocheese.html/
+mv $tmp/$tarball $tmp/"$tarball".sig $tmp/"$tarball".meta4 $cur/doc/gocheese.html/download