--- /dev/null
+module-name
+++ /dev/null
-GOPATH != pwd
-VERSION != cat VERSION
-
-MOD = go.cypherpunks.ru/gogost/v4
-LDFLAGS = -X $(MOD).Version=$(VERSION)
-
-all: streebog256 streebog512
-
-streebog256:
- GOPATH=$(GOPATH) go build -ldflags "$(LDFLAGS)" $(MOD)/cmd/streebog256
-
-streebog512:
- GOPATH=$(GOPATH) go build -ldflags "$(LDFLAGS)" $(MOD)/cmd/streebog512
-
-bench:
- GOPATH=$(GOPATH) go test -benchmem -bench . $(MOD)/...
--- /dev/null
+redo-ifchange streebog256 streebog512
--- /dev/null
+redo-ifchange module-name
+exec >&2
+go test -benchmem -bench . `cat module-name`/...
--- /dev/null
+rm -f module-name streebog256 streebog512
--- /dev/null
+redo-ifchange module-name
+MOD=`cat module-name`
+go build -o $3 -ldflags "-X ${MOD}.Version=`cat VERSION`" ${MOD}/cmd/$1
$ [fetch|wget] http://gogost.cypherpunks.ru/gogost-@value{VERSION}.tar.xz.sig
$ gpg --verify gogost-@value{VERSION}.tar.xz.sig gogost-@value{VERSION}.tar.xz
$ xz --decompress --stdout gogost-@value{VERSION}.tar.xz | tar xf -
-$ make -C gogost-@value{VERSION} all bench
-$ echo hello world | gogost-@value{VERSION}/streebog256
+$ cd gogost-@value{VERSION}
+$ redo bench
+$ redo all
+$ echo hello world | ./streebog256
f72018189a5cfb803dbe1f2149cf554c40093d8e7f81c21e08ac5bcd09d9934d
@end example
+It uses @url{http://cr.yp.to/redo.html, redo} build system for that
+examples. You can use either dozen of various implementations, or at
+least minimalistic POSIX shell @code{apenwarr/do}:
+
+@example
+$ [fetch|wget] https://github.com/apenwarr/redo/raw/master/minimal/do
+$ mv do redo ; chmod +x redo
+@end example
+
@include download.texi
And then you can include its source code in your project for example
$ go get go.cypherpunks.ru/gogost/cmd/streebog256
@end example
-@code{go.cypherpunks.ru} uses @url{https://www.cacert.org/, CACert.org}
-certificate authority, that is not included by default in some operating
-system distributions and probably you have to install it in your system,
-because @command{go get} uses HTTPS connections. If you have issues
-using either @code{sum.golang.org} or @code{proxy.golang.org}, then you
-can disable their usage with @env{GOPRIVATE=go.cypherpunks.ru/gogost}
-environment variable.
+@code{go.cypherpunks.ru} uses @url{http://ca.cypherpunks.ru/, ca.cypherpunks.ru}
+certificate authority. If you have issues using either
+@code{sum.golang.org} or @code{proxy.golang.org}, then you can disable
+their usage with @env{GOPRIVATE=go.cypherpunks.ru/gogost} environment
+variable.
Also you can use @code{replace} feature inside your @file{go.mod}, like:
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 \
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 ) |
cat > download.texi <<EOF
You can obtain releases source code prepared tarballs on
-@url{http://gocheese.cypherpunks.ru/}.
+@url{http://gogost.cypherpunks.ru/}.
EOF
texi=$(mktemp)
makeinfo --plaintext -o FAQ $texi
find . -name .git -type d | xargs rm -fr
-rm -f *.texi www.mk style.css makedist.sh TODO
+rm -f *.texi www.do style.css makedist.sh TODO .gitignore
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
--- /dev/null
+redo-ifchange go.mod
+sed -n 's/^module //p' < go.mod
--- /dev/null
+rm -f gogost.html/*.html
+${MAKEINFO:-makeinfo} --html \
+ --set-customization-variable EXTRA_HEAD='<link rev="made" href="mailto:webmaster@cypherpunks.ru">' \
+ --set-customization-variable CSS_LINES="`cat style.css`" \
+ --set-customization-variable SHOW_TITLE=0 \
+ --set-customization-variable USE_ACCESSKEY=0 \
+ --set-customization-variable DATE_IN_HEADER=1 \
+ --set-customization-variable TOP_NODE_UP_URL=index.html \
+ --set-customization-variable CLOSE_QUOTE_SYMBOL=\" \
+ --set-customization-variable OPEN_QUOTE_SYMBOL=\" \
+ -o gogost.html www.texi
+++ /dev/null
-MAKEINFO ?= makeinfo
-
-CSS != cat style.css
-
-all: gogost.html
-
-gogost.html: *.texi
- rm -f gogost.html/*.html
- $(MAKEINFO) --html \
- --set-customization-variable EXTRA_HEAD='<link rev="made" href="mailto:webmaster@cypherpunks.ru">' \
- --set-customization-variable CSS_LINES='$(CSS)' \
- --set-customization-variable SHOW_TITLE=0 \
- --set-customization-variable USE_ACCESSKEY=0 \
- --set-customization-variable DATE_IN_HEADER=1 \
- --set-customization-variable TOP_NODE_UP_URL=index.html \
- --set-customization-variable CLOSE_QUOTE_SYMBOL=\" \
- --set-customization-variable OPEN_QUOTE_SYMBOL=\" \
- -o gogost.html www.texi