gocheese.info
gocheese.html
module-name
+VERSION
--- /dev/null
+redo-ifchange gocheese.go
+perl -ne 'print "$1\n" if /Version.*"(.*)"$/' < gocheese.go
--- /dev/null
+rm -f gocheese module-name VERSION
redo-ifchange *.go module-name
-${GO:=go} build -o $3 -ldflags "-X main.Version=`cat VERSION`" `cat module-name`
+${GO:=go} build -o $3 `cat module-name`
)
const (
+ Version = "2.4.1"
HTMLBegin = `<!DOCTYPE html>
<html>
<head>
version = flag.Bool("version", false, "Print version information")
warranty = flag.Bool("warranty", false, "Print warranty information")
- Version string = "UNKNOWN"
killed bool
pypiURLParsed *url.URL
)
-redo-ifchange *.texi
-${MAKEINFO:=makeinfo} -o $3 gocheese.texi
+redo-ifchange *.texi VERSION
+${MAKEINFO:-makeinfo} \
+ -D "VERSION `cat VERSION`" \
+ --set-customization-variable CLOSE_QUOTE_SYMBOL=\" \
+ --set-customization-variable OPEN_QUOTE_SYMBOL=\" \
+ --output $3 gocheese.texi
@node Install
@unnumbered Install
-@set VERSION 2.4.0
-
Preferable way is to download tarball with the signature from
website and, for example, run tests with benchmarks:
$ gpg --verify gocheese-@value{VERSION}.tar.xz.sig gocheese-@value{VERSION}.tar.xz
$ xz -d < gocheese-@value{VERSION}.tar.xz | tar xf -
$ cd gocheese-@value{VERSION}
-$ redo all test
+$ redo test all
@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
+least minimalistic POSIX shell @command{contrib/do} (just replace
+@command{redo} with @command{contrib/do} in the example above) included
+in tarball.
@include download.texi
tmp=$(mktemp -d)
release=$1
[ -n "$release" ]
-MAKEINFO=${MAKEINFO:=makeinfo}
git clone . $tmp/gocheese-$release
cd $tmp/gocheese-$release
git checkout v$release
-redo-ifchange module-name
+redo-ifchange module-name VERSION
mod_name=`cat module-name`
+
+cat > download.texi <<EOF
+You can obtain releases source code prepared tarballs on
+@url{http://www.gocheese.cypherpunks.ru/}.
+EOF
+redo gocheese.info
+
crypto_mod_path=$(sed -n 's#^require \(golang.org/x/crypto\) \(.*\)$#\1@\2#p' go.mod)
mkdir -p src/$mod_name
mv *.go go.mod go.sum src/$mod_name
rm -fr src/golang.org $tmp/includes
mv $tmp/golang.org src
-cat > download.texi <<EOF
-You can obtain releases source code prepared tarballs on
-@url{http://www.gocheese.cypherpunks.ru/}.
-EOF
-redo gocheese.info
+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
@bye
EOF
perl -i -p -e "s/.verbatiminclude PUBKEY.asc/Look in PUBKEY.asc file./" install.texi
-$MAKEINFO --plaintext -o INSTALL $texi
+mkinfo --output INSTALL $texi
rm $texi
-rm -rf .redo .git .gitignore style.css makedist.sh www.do module-name.do
-echo 'GOPATH=`pwd` ${GO:=go} build -o $3 -ldflags "-X main.Version=`cat VERSION`" `cat module-name`' > gocheese.do
+rm -rf .redo .git .gitignore style.css makedist.sh www.do module-name.do VERSION.do
+echo 'GOPATH=`pwd` ${GO:=go} build -o $3 `cat module-name`' > gocheese.do
echo 'GOPATH=`pwd` ${GO:=go} test `cat module-name`/... >&2' > test.do
+cp ~/work/redo/minimal/do contrib/do
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
-chmod +x pyshop2packages.sh
+chmod 755 contrib/pyshop2packages.sh contrib/do
cd ..
tar cvf gocheese-"$release".tar --uid=0 --gid=0 --numeric-owner gocheese-"$release"
-rm -f gocheese.html/*.html
+redo-ifchange *.texi VERSION
+html=gocheese.html
+rm -f $html/*.html
${MAKEINFO:=makeinfo} --html \
+ -D "VERSION `cat VERSION`" \
--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 gocheese.html gocheese.texi
-find gocheese.html -type d -exec chmod 755 {} \;
-find gocheese.html -type f -exec chmod 644 {} \;
+ -o $html gocheese.texi
+find $html -type d -exec chmod 755 {} \;
+find $html -type f -exec chmod 644 {} \;