]> Cypherpunks.ru repositories - nncp.git/commitdiff
Move to redo build system
authorSergey Matveev <stargrave@stargrave.org>
Sun, 27 Sep 2020 14:09:31 +0000 (17:09 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Sun, 27 Sep 2020 15:56:58 +0000 (18:56 +0300)
35 files changed:
.gitignore [new file with mode: 0644]
Makefile
VERSION [deleted file]
VERSION.do [new file with mode: 0644]
all.do [new file with mode: 0644]
bin/.gitignore [new file with mode: 0644]
bin/all.do [new file with mode: 0644]
bin/clean.do [new file with mode: 0644]
bin/cmd.list [new file with mode: 0644]
bin/default.do [new file with mode: 0644]
clean.do [new file with mode: 0644]
config [new file with mode: 0644]
doc.do [new file with mode: 0644]
doc/.gitignore
doc/Makefile [deleted file]
doc/all.do [new file with mode: 0644]
doc/building.texi
doc/default.plantuml.txt.do [new file with mode: 0644]
doc/install.texi
doc/news.ru.texi
doc/news.texi
doc/nncp.html.do [new file with mode: 0644]
doc/nncp.info.do [new file with mode: 0644]
doc/sp.plantuml [new file with mode: 0644]
doc/sp.texi
doc/sp.txt [deleted file]
gopath.do [new file with mode: 0644]
install-strip.do [new file with mode: 0644]
install.do [new file with mode: 0644]
makedist.sh
module-name.do [new file with mode: 0644]
ports/nncp/Makefile
src/nncp.go
test.do [new file with mode: 0644]
uninstall.do [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..b7ee15f
--- /dev/null
@@ -0,0 +1,3 @@
+gopath
+module-name
+VERSION
index fd65c2511333673266d6a21fc4f2cba16be61d5c..1ae4fe84f5182a176da55887b3c41fc4916f91a8 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,80 +1,19 @@
-GOPATH != pwd
-VERSION != cat VERSION
+REDO ?= contrib/do -c
 
-GO ?= go
-PREFIX ?= /usr/local
+warning:
+       @echo WARNING: this is not real Makefile. Just proxying commands to redo command
 
-SENDMAIL ?= /usr/sbin/sendmail
-CFGPATH ?= $(PREFIX)/etc/nncp.hjson
-SPOOLPATH ?= /var/spool/nncp
-LOGPATH ?= /var/spool/nncp/log
+all: warning
+       $(REDO) $@
 
-BINDIR = $(DESTDIR)$(PREFIX)/bin
-INFODIR = $(DESTDIR)$(PREFIX)/info
-DOCDIR = $(DESTDIR)$(PREFIX)/share/doc/nncp
+clean: warning
+       $(REDO) $@
 
-MOD = go.cypherpunks.ru/nncp/v5
+install: warning
+       $(REDO) $@
 
-LDFLAGS = \
-       -X $(MOD).Version=$(VERSION) \
-       -X $(MOD).DefaultCfgPath=$(CFGPATH) \
-       -X $(MOD).DefaultSendmailPath=$(SENDMAIL) \
-       -X $(MOD).DefaultSpoolPath=$(SPOOLPATH) \
-       -X $(MOD).DefaultLogPath=$(LOGPATH)
+install-strip: warning
+       $(REDO) $@
 
-ALL = \
-       $(BIN)/nncp-bundle \
-       $(BIN)/nncp-call \
-       $(BIN)/nncp-caller \
-       $(BIN)/nncp-cfgenc \
-       $(BIN)/nncp-cfgmin \
-       $(BIN)/nncp-cfgnew \
-       $(BIN)/nncp-check \
-       $(BIN)/nncp-daemon \
-       $(BIN)/nncp-exec \
-       $(BIN)/nncp-file \
-       $(BIN)/nncp-freq \
-       $(BIN)/nncp-log \
-       $(BIN)/nncp-pkt \
-       $(BIN)/nncp-reass \
-       $(BIN)/nncp-rm \
-       $(BIN)/nncp-stat \
-       $(BIN)/nncp-toss \
-       $(BIN)/nncp-xfer
-
-SRC := $(PWD)/src
-BIN := $(PWD)/bin
-
-all: $(ALL)
-
-$(ALL):
-       mkdir -p $(BIN)
-       cd $(SRC) ; GOPATH=$(GOPATH) $(GO) build \
-               -o $(BIN)/$$(basename $@) \
-               -ldflags "$(LDFLAGS)" \
-               $(MOD)/cmd/$$(basename $@)
-
-test:
-       cd $(SRC) ; GOPATH=$(GOPATH) $(GO) test -failfast $(MOD)/...
-
-clean:
-       rm -rf $(BIN)
-
-.PHONY: doc
-
-doc:
-       $(MAKE) -C doc
-
-install: all doc
-       mkdir -p $(BINDIR)
-       cp -f $(ALL) $(BINDIR)
-       for e in $(ALL) ; do chmod 755 $(BINDIR)/$$(basename $$e) ; done
-       mkdir -p $(INFODIR)
-       cp -f doc/nncp.info $(INFODIR)
-       chmod 644 $(INFODIR)/nncp.info
-       mkdir -p $(DOCDIR)
-       cp -f -L AUTHORS NEWS NEWS.RU README README.RU THANKS $(DOCDIR)
-       chmod 644 $(DOCDIR)/*
-
-install-strip: install
-       for e in $(ALL) ; do strip $(BINDIR)/$$(basename $$e) ; done
+uninstall: warning
+       $(REDO) $@
diff --git a/VERSION b/VERSION
deleted file mode 100644 (file)
index 74664af..0000000
--- a/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-5.3.3
diff --git a/VERSION.do b/VERSION.do
new file mode 100644 (file)
index 0000000..488da2c
--- /dev/null
@@ -0,0 +1,2 @@
+redo-ifchange src/nncp.go
+perl -ne 'print "$1\n" if /Version.* = "(.*)"$/' < src/nncp.go
diff --git a/all.do b/all.do
new file mode 100644 (file)
index 0000000..8c7fdb1
--- /dev/null
+++ b/all.do
@@ -0,0 +1 @@
+redo-ifchange bin/all
diff --git a/bin/.gitignore b/bin/.gitignore
new file mode 100644 (file)
index 0000000..a507544
--- /dev/null
@@ -0,0 +1 @@
+nncp-*
diff --git a/bin/all.do b/bin/all.do
new file mode 100644 (file)
index 0000000..5519b54
--- /dev/null
@@ -0,0 +1,2 @@
+redo-ifchange cmd.list
+redo-ifchange `cat cmd.list`
diff --git a/bin/clean.do b/bin/clean.do
new file mode 100644 (file)
index 0000000..7dbb858
--- /dev/null
@@ -0,0 +1 @@
+rm -f `cat cmd.list`
diff --git a/bin/cmd.list b/bin/cmd.list
new file mode 100644 (file)
index 0000000..6c4cf72
--- /dev/null
@@ -0,0 +1,18 @@
+nncp-bundle
+nncp-call
+nncp-caller
+nncp-cfgenc
+nncp-cfgmin
+nncp-cfgnew
+nncp-check
+nncp-daemon
+nncp-exec
+nncp-file
+nncp-freq
+nncp-log
+nncp-pkt
+nncp-reass
+nncp-rm
+nncp-stat
+nncp-toss
+nncp-xfer
diff --git a/bin/default.do b/bin/default.do
new file mode 100644 (file)
index 0000000..8ec11e7
--- /dev/null
@@ -0,0 +1,12 @@
+cd ..
+redo-ifchange config gopath module-name
+. ./config
+. ./gopath
+mod=`cat module-name`
+redo-ifchange src/*.go src/cmd/$1/*.go
+GO_LDFLAGS="$GO_LDFLAGS -X $mod.DefaultCfgPath=$CFGPATH"
+GO_LDFLAGS="$GO_LDFLAGS -X $mod.DefaultSpoolPath=$SENDMAIL"
+GO_LDFLAGS="$GO_LDFLAGS -X $mod.DefaultSpoolPath=$SPOOLPATH"
+GO_LDFLAGS="$GO_LDFLAGS -X $mod.DefaultLogPath=$LOGPATH"
+cd src
+GOPATH=$GOPATH ${GO:-go} build -o ../bin/$3 -ldflags "$GO_LDFLAGS" $mod/cmd/$1
diff --git a/clean.do b/clean.do
new file mode 100644 (file)
index 0000000..9c9f7cd
--- /dev/null
+++ b/clean.do
@@ -0,0 +1,2 @@
+redo bin/clean
+rm gopath module-name VERSION
diff --git a/config b/config
new file mode 100644 (file)
index 0000000..92406c5
--- /dev/null
+++ b/config
@@ -0,0 +1,14 @@
+GO=${GO:-go}
+MAKEINFO=${MAKEINFO:-makeinfo}
+PLANTUML=${PLANTUML:-plantuml}
+
+PREFIX=${PREFIX:-/usr/local}
+
+SENDMAIL=${SENDMAIL:-/usr/sbin/sendmail}
+CFGPATH=${CFGPATH:-$PREFIX/etc/nncp.hjson}
+SPOOLPATH=${SPOOLPATH:-/var/spool/nncp}
+LOGPATH=${LOGPATH:-/var/spool/nncp/log}
+
+BINDIR=${DESTDIR}${PREFIX}/bin
+INFODIR=${DESTDIR}${PREFIX}/info
+DOCDIR=${DESTDIR}${PREFIX}/share/doc/nncp
diff --git a/doc.do b/doc.do
new file mode 100644 (file)
index 0000000..e8a354a
--- /dev/null
+++ b/doc.do
@@ -0,0 +1 @@
+redo-ifchange doc/all
index a53111bb2957cffb7aa68c6bd4eb9d0add8c384b..932e42bf6b8f8b9f0c501a2a96391107ed06b91b 100644 (file)
@@ -1,3 +1,3 @@
 nncp.info
 nncp.html
-sp.utxt
+sp.plantuml.txt
diff --git a/doc/Makefile b/doc/Makefile
deleted file mode 100644 (file)
index 326fc9f..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-MAKEINFO ?= makeinfo
-
-all: nncp.info nncp.html
-
-sp.utxt: sp.txt
-       plantuml -tutxt sp.txt
-
-nncp.info: *.texi sp.utxt pedro.txt
-       $(MAKEINFO) -o nncp.info index.texi
-
-CSS != cat style.css
-
-nncp.html: *.texi sp.utxt pedro.txt
-       rm -f nncp.html/*.html
-       $(MAKEINFO) --html \
-               --set-customization-variable EXTRA_HEAD='<link rev="made" href="mailto:webmaster@nncpgo.org">' \
-               --set-customization-variable CSS_LINES='$(CSS)' \
-               --set-customization-variable SHOW_TITLE=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 nncp.html index.texi
-       cp -r .well-known nncp.html/
diff --git a/doc/all.do b/doc/all.do
new file mode 100644 (file)
index 0000000..3ec13ad
--- /dev/null
@@ -0,0 +1 @@
+redo-ifchange nncp.info nncp.html
index cb4d4393e1f88f0c13a95248c6d05ad50e3b3d7d..2a2bfc1db4448cdf0b42bfc6ecce898c2a074451 100644 (file)
@@ -15,12 +15,19 @@ $ [fetch|wget] http://www.nncpgo.org/download/nncp-@value{VERSION}.tar.xz
 $ [fetch|wget] http://www.nncpgo.org/download/nncp-@value{VERSION}.tar.xz.sig
 $ gpg --verify nncp-@value{VERSION}.tar.xz.sig nncp-@value{VERSION}.tar.xz
 $ xz --decompress --stdout nncp-@value{VERSION}.tar.xz | tar xf -
-$ make -C nncp-@value{VERSION} all
+$ cd nncp-@value{VERSION}
+$ redo 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 @command{contrib/do} (just replace
+@command{redo} with @command{contrib/do} in the example above) included
+in tarball.
+
 There is @command{install} make-target respecting @env{DESTDIR}. It will
 install binaries and info-documentation:
 
 @example
-# make -C nncp-@value{VERSION} install PREFIX=/usr/local
+# PREFIX=/usr/local redo install
 @end example
diff --git a/doc/default.plantuml.txt.do b/doc/default.plantuml.txt.do
new file mode 100644 (file)
index 0000000..cb5bf3e
--- /dev/null
@@ -0,0 +1,5 @@
+src=${1%.txt}
+redo-ifchange $src ../config
+. ../config
+$PLANTUML -tutxt -pipe < $src
+
index afab4c2e3c521faff2f6f250296c554c05b89cb5..2da6378ce5a1dab1233a51594e47764b1fa20784 100644 (file)
@@ -1,8 +1,6 @@
 @node Installation
 @unnumbered Installation
 
-@set VERSION 5.3.3
-
 Possibly NNCP package already exists for your distribution:
 
 @itemize
index 5abadc475030b4c1b05dbd8ee49d0c80deb5f326..f423162b649f771e603b08bff59c4b321d5068ec 100644 (file)
@@ -1,6 +1,20 @@
 @node Новости
 @section Новости
 
+@node Релиз 5.4.0
+@subsection Релиз 5.4.0
+@itemize
+
+@item
+Обновлены зависимые библиотеки.
+
+@item
+Система сборки переведена с Makefile-ов на @url{http://cr.yp.to/redo.html, redo}.
+Это не должно повлиять на мейнтейнеров пакетов, так как минимальная
+реализация @command{redo} включена в tarball.
+
+@end itemize
+
 @node Релиз 5.3.3
 @subsection Релиз 5.3.3
 @itemize
index 244331cb3ad46a2a622d36f771fc844b6efa5acc..9d0046344981c9104f263af1dea5c412b27de176 100644 (file)
@@ -3,6 +3,20 @@
 
 See also this page @ref{Новости, on russian}.
 
+@node Release 5.4.0
+@section Release 5.4.0
+@itemize
+
+@item
+Updated dependencies.
+
+@item
+Build system is moved from Makefiles to @url{http://cr.yp.to/redo.html, redo}.
+This should not influence package maintainers, because minimal @command{redo}
+implementation is included in tarball.
+
+@end itemize
+
 @node Release 5.3.3
 @section Release 5.3.3
 @itemize
diff --git a/doc/nncp.html.do b/doc/nncp.html.do
new file mode 100644 (file)
index 0000000..3295cdd
--- /dev/null
@@ -0,0 +1,7 @@
+rm -fr nncp.html
+MAKEINFO_OPTS="$MAKEINFO_OPTS --html"
+MAKEINFO_OPTS="$MAKEINFO_OPTS --set-customization-variable SHOW_TITLE=0"
+MAKEINFO_OPTS="$MAKEINFO_OPTS --set-customization-variable DATE_IN_HEADER=1"
+MAKEINFO_OPTS="$MAKEINFO_OPTS --set-customization-variable TOP_NODE_UP_URL=index.html"
+MAKEINFO_OPTS="$MAKEINFO_OPTS" . nncp.info.do
+cp -r .well-known $3
diff --git a/doc/nncp.info.do b/doc/nncp.info.do
new file mode 100644 (file)
index 0000000..6b0c858
--- /dev/null
@@ -0,0 +1,9 @@
+redo-ifchange ../config ../VERSION *.texi sp.plantuml.txt pedro.txt
+. ../config
+${MAKEINFO:-makeinfo} \
+    -D "VERSION `cat ../VERSION`" \
+    $MAKEINFO_OPTS \
+    --set-customization-variable CLOSE_QUOTE_SYMBOL=\" \
+    --set-customization-variable OPEN_QUOTE_SYMBOL=\" \
+    --set-customization-variable CSS_LINES="`cat style.css`" \
+    --output $3 index.texi
diff --git a/doc/sp.plantuml b/doc/sp.plantuml
new file mode 100644 (file)
index 0000000..89440ba
--- /dev/null
@@ -0,0 +1,34 @@
+     ┌─────────┐                       ┌─────────┐     
+     │Initiator│                       │Responder│     
+     └────┬────┘                       └────┬────┘     
+          │                                 │          
+          │         ╔═════════════╗         │          
+══════════╪═════════╣ preparation ╠═════════╪══════════
+          │         ╚═════════════╝         │          
+          │                                 │          
+          │              [s]                │          
+          │<────────────────────────────────│          
+          │                                 │          
+          │                                 │          
+          │         ╔═════════════╗         │          
+══════════╪═════════╣ interactive ╠═════════╪══════════
+          │         ╚═════════════╝         │          
+          │                                 │          
+          │[e, es, s, ss], INFO..., HALT... │          
+          │────────────────────────────────>│          
+          │                                 │          
+          │ [e, ee, se], INFO..., HALT...   │          
+          │<────────────────────────────────│          
+          │                                 │          
+          │   INFO..., FREQ..., DONE...     │          
+          │────────────────────────────────>│          
+          │                                 │          
+          │   INFO..., FREQ..., DONE...     │          
+          │<────────────────────────────────│          
+          │                                 │          
+          │FILE..., INFO..., DONE..., PING  │          
+          │────────────────────────────────>│          
+          │                                 │          
+          │FILE..., INFO..., DONE..., PING  │          
+          │<────────────────────────────────│          
+          │                                 │          
index ef00f63404bc3b80221d3e62a2e4b9ec40f4289d..8169e99d151747a20094cbacd45700de0775f46d 100644 (file)
@@ -154,7 +154,7 @@ just an unsigned integer telling what body structure follows.
 
 Typical peer's behaviour is following:
 
-@verbatiminclude sp.utxt
+@verbatiminclude sp.plantuml.txt
 
 @enumerate
 @item Perform @emph{Noise-IK} handshake:
diff --git a/doc/sp.txt b/doc/sp.txt
deleted file mode 100644 (file)
index b86ee68..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-@startuml
-hide footbox
-participant Initiator
-participant Responder
-
-== preparation ==
-
-Initiator <- Responder : [s]
-
-== interactive ==
-
-Initiator -> Responder : [e, es, s, ss], INFO..., HALT...
-Initiator <- Responder : [e, ee, se], INFO..., HALT...
-Initiator -> Responder : INFO..., FREQ..., DONE...
-Initiator <- Responder : INFO..., FREQ..., DONE...
-Initiator -> Responder : FILE..., INFO..., DONE..., PING
-Initiator <- Responder : FILE..., INFO..., DONE..., PING
-
-@enduml
diff --git a/gopath.do b/gopath.do
new file mode 100644 (file)
index 0000000..141e16d
--- /dev/null
+++ b/gopath.do
@@ -0,0 +1 @@
+echo GOPATH=${GOPATH:-`pwd`}
diff --git a/install-strip.do b/install-strip.do
new file mode 100644 (file)
index 0000000..63b442e
--- /dev/null
@@ -0,0 +1,5 @@
+redo-ifchange config install
+. ./config
+for cmd in `cat bin/cmd.list` ; do
+    strip $BINDIR/$cmd
+done
diff --git a/install.do b/install.do
new file mode 100644 (file)
index 0000000..95c71cb
--- /dev/null
@@ -0,0 +1,16 @@
+redo-ifchange config bin/all doc/nncp.info
+. ./config
+
+mkdir -p $BINDIR
+for cmd in `cat bin/cmd.list` ; do
+    cp -f bin/$cmd $BINDIR
+    chmod 755 $BINDIR/$cmd
+done
+
+mkdir -p $INFODIR
+cp -f doc/nncp.info $INFODIR
+chmod 644 $INFODIR/nncp.info
+
+mkdir -p $DOCDIR
+cp -f -L AUTHORS NEWS NEWS.RU README README.RU THANKS $DOCDIR
+chmod 644 $DOCDIR/*
index 21368a2a555f1b32965e1372bd4c06209a1c320f..bf21b01584b6abde66af349392f63c13e8ddc813 100755 (executable)
@@ -8,9 +8,10 @@ release=$1
 git clone . $tmp/nncp-$release
 cd $tmp/nncp-$release
 git checkout v$release
+redo module-name VERSION
+mod_name=`cat module-name`
 rm -fr .git
 
-mod_name=$(sed -n 's/^module //p' src/go.mod)
 mv src src.orig
 mkdir -p src/$mod_name
 mv src.orig/* src/$mod_name
@@ -67,6 +68,7 @@ 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
 golang.org/x/sys/PATENTS
 golang.org/x/sys/README.md
@@ -99,7 +101,14 @@ rm -r src/github.com/flynn/noise/vector*
 rm src/github.com/hjson/hjson-go/build_release.sh
 rm src/github.com/gorhill/cronexpr/APLv2
 rm -fr ports
-rm makedist.sh
+find . -name .gitignore -delete
+rm makedist.sh module-name.do VERSION.do
+
+mkdir contrib
+cp ~/work/redo/minimal/do contrib/do
+echo echo GOPATH=\`pwd\` > gopath.do
+
+perl -p -i -e "s#src/#src/$mod_name/#g" bin/default.do
 
 cat > doc/download.texi <<EOF
 @node Tarballs
@@ -111,13 +120,20 @@ perl -i -ne 'print unless /include pedro/' doc/index.texi doc/about.ru.texi
 perl -p -i -e 's/^(.verbatiminclude) .*$/$1 PUBKEY.asc/g' doc/integrity.texi
 mv doc/.well-known/openpgpkey/hu/i4cdqgcarfjdjnba6y4jnf498asg8c6p.asc PUBKEY.asc
 ln -s ../PUBKEY.asc doc
-make -C doc
+redo doc
 
 ########################################################################
 # Supplementary files autogeneration
 ########################################################################
 texi=$(TMPDIR=doc mktemp)
 
+mkinfo() {
+    ${MAKEINFO:-makeinfo} --plaintext \
+        --set-customization-variable CLOSE_QUOTE_SYMBOL=\" \
+        --set-customization-variable OPEN_QUOTE_SYMBOL=\" \
+        -D "VERSION `cat VERSION`" $@
+}
+
 cat > $texi <<EOF
 \input texinfo
 @documentencoding UTF-8
@@ -127,7 +143,7 @@ cat > $texi <<EOF
 `sed -n '5,$p' < doc/news.texi`
 @bye
 EOF
-makeinfo --plaintext -o NEWS $texi
+mkinfo --output NEWS $texi
 
 cat > $texi <<EOF
 \input texinfo
@@ -138,7 +154,7 @@ cat > $texi <<EOF
 `sed -n '3,$p' < doc/news.ru.texi | sed 's/^@subsection/@section/'`
 @bye
 EOF
-makeinfo --plaintext -o NEWS.RU $texi
+mkinfo --output NEWS.RU $texi
 
 cat > $texi <<EOF
 \input texinfo
@@ -147,7 +163,7 @@ cat > $texi <<EOF
 @include install.texi
 @bye
 EOF
-makeinfo --plaintext -o INSTALL $texi
+mkinfo --output INSTALL $texi
 
 cat > $texi <<EOF
 \input texinfo
@@ -156,25 +172,26 @@ cat > $texi <<EOF
 `cat doc/thanks.texi`
 @bye
 EOF
-makeinfo --plaintext -o THANKS $texi
+mkinfo --output THANKS $texi
 
 rm -f $texi
+rm -r doc/.well-known doc/nncp.html/.well-known
 
 ########################################################################
 
-rm -r doc/.gitignore doc/.well-known doc/nncp.html/.well-known
-
+rm -r .redo
 find . -type d -exec chmod 755 {} \;
 find . -type f -exec chmod 644 {} \;
 find . -type f -name "*.sh" -exec chmod 755 {} \;
+chmod 755 contrib/do
 
 cd ..
 tar cvf nncp-"$release".tar --uid=0 --gid=0 --numeric-owner nncp-"$release"
 xz -9v nncp-"$release".tar
 gpg --detach-sign --sign --local-user releases@nncpgo.org nncp-"$release".tar.xz
-mv -v $tmp/nncp-"$release".tar.xz $tmp/nncp-"$release".tar.xz.sig $cur/doc/nncp.html/download
+mv -v $tmp/nncp-"$release".tar.xz $tmp/nncp-"$release".tar.xz.sig $cur/doc/download
 
-tarball=$cur/doc/nncp.html/download/nncp-"$release".tar.xz
+tarball=$cur/doc/download/nncp-"$release".tar.xz
 size=$(( $(stat -f %z $tarball) / 1024 ))
 hash=$(gpg --print-md SHA256 < $tarball)
 release_date=$(date "+%Y-%m-%d")
diff --git a/module-name.do b/module-name.do
new file mode 100644 (file)
index 0000000..4de5370
--- /dev/null
@@ -0,0 +1,2 @@
+redo-ifchange src/go.mod
+sed -n 's/^module //p' < src/go.mod
index 7f294dd3cd0fa7b2fdf1f4d664dc949f937a056a..792703f1aa2e34589d3a66c08af7c1b74e449c8e 100644 (file)
@@ -1,7 +1,7 @@
 # $FreeBSD: $
 
 PORTNAME=      nncp
-DISTVERSION=   5.3.3
+DISTVERSION=   5.4.0
 CATEGORIES=    net
 MASTER_SITES=  http://www.nncpgo.org/download/
 
index 22d75782c2e93a2e22db878b2e81b127c949fc00..d27ed0acdeade8796ed82e28d0eeb7c00f17970d 100644 (file)
@@ -38,7 +38,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.`
 )
 
 var (
-       Version string = "UNKNOWN"
+       Version string = "5.4.0"
 
        Base32Codec *base32.Encoding = base32.StdEncoding.WithPadding(base32.NoPadding)
 )
diff --git a/test.do b/test.do
new file mode 100644 (file)
index 0000000..7f3c01e
--- /dev/null
+++ b/test.do
@@ -0,0 +1,6 @@
+redo-ifchange config gopath module-name
+. ./config
+. ./gopath
+mod=`cat module-name`
+cd src
+GOPATH=$GOPATH ${GO:-go} test -failfast $mod/...
diff --git a/uninstall.do b/uninstall.do
new file mode 100644 (file)
index 0000000..fcec27c
--- /dev/null
@@ -0,0 +1,5 @@
+redo-ifchange config
+. ./config
+for cmd in `cat bin/cmd.list` ; do rm -f $BINDIR/$cmd ; done
+rm -f $INFODIR/nncp.info
+rm -fr $DOCDIR