1@node Build-instructions
2@section Build instructions
3
4Make sure that Go is installed. For example to install it from packages:
5
6@table @asis
7@item FreeBSD
8    @verb{|pkg install go|}
9@item Debian, Ubuntu
10    @verb{|apt install golang|}
11@end table
12
13@example
14$ [fetch|wget] http://www.nncpgo.org/download/nncp-@value{VERSION}.tar.xz
15$ [fetch|wget] http://www.nncpgo.org/download/nncp-@value{VERSION}.tar.xz.sig
16$ gpg --verify nncp-@value{VERSION}.tar.xz.sig nncp-@value{VERSION}.tar.xz
17$ xz --decompress --stdout nncp-@value{VERSION}.tar.xz | tar xf -
18$ cd nncp-@value{VERSION}
19$ redo all
20@end example
21
22After that you should get various @command{bin/nncp-*} binaries and
23@command{bin/hjson-cli} command (only for your convenience, not
24necessary installation). For example, documentation for
25@command{nncp-bundle} command can be get with
26@command{info doc/nncp.info -n nncp-bundle}.
27
28It uses @url{http://cr.yp.to/redo.html, redo} build system for that
29examples. You can use one of its various implementations, or at least
30minimalistic POSIX shell @command{contrib/do} (just replace
31@command{redo} with @command{contrib/do} in the example above) included
32in tarball. Following ones are tested to work with:
33@url{http://www.goredo.cypherpunks.ru/, goredo} (NNCP's author creation),
34@url{https://redo.readthedocs.io/, apenwarr/redo} (@code{contrib/do} is
35from that project), @url{https://github.com/leahneukirchen/redo-c, redo-c}.
36
37There is @command{install} target respecting @env{$DESTDIR}. It will
38install binaries and info-documentation:
39
40@example
41# PREFIX=/usr/local redo install
42@end example
43
44NNCP depends on @code{github.com/fsnotify/fsnotify} library, that is
45solely relies on OS-specific mechanisms. There is possibility that you
46have either broken or unsupported ones. You can still build NNCP with
47@code{-tags nofsnotify} build option, to skip @code{fsnotify} library
48usage at all.
49