]> Cypherpunks.ru repositories - nncp.git/blob - doc/building.texi
Add various documentation indices
[nncp.git] / doc / building.texi
1 @node Build-instructions
2 @cindex building
3 @section Build instructions
4
5 Make sure that Go is installed. For example to install it from packages:
6
7 @table @asis
8 @item FreeBSD
9     @verb{|pkg install go|}
10 @item Debian, Ubuntu
11     @verb{|apt install golang|}
12 @end table
13
14 @example
15 $ [fetch|wget] http://www.nncpgo.org/download/nncp-@value{VERSION}.tar.xz
16 $ [fetch|wget] http://www.nncpgo.org/download/nncp-@value{VERSION}.tar.xz.sig
17 $ gpg --verify nncp-@value{VERSION}.tar.xz.sig nncp-@value{VERSION}.tar.xz
18 $ xz --decompress --stdout nncp-@value{VERSION}.tar.xz | tar xf -
19 $ cd nncp-@value{VERSION}
20 $ redo all
21 @end example
22
23 @pindex info
24 After that you should get various @command{bin/nncp-*} binaries and
25 @command{bin/hjson-cli} command (only for your convenience, not
26 necessary installation). For example, documentation for
27 @command{nncp-bundle} command can be get with
28 @command{info doc/nncp.info -n nncp-bundle}.
29
30 @pindex redo
31 @pindex apenwarr/redo
32 @pindex apenwarr/do
33 @pindex redo-c
34 @pindex baredo
35 @pindex goredo
36 It uses @url{http://cr.yp.to/redo.html, redo} build system for that
37 examples. You can use one of its various implementations, or at least
38 minimalistic POSIX shell @command{contrib/do} (just replace
39 @command{redo} with @command{contrib/do} in the example above) included
40 in tarball. Following ones are tested to work with:
41 @url{http://www.goredo.cypherpunks.ru/, goredo} (NNCP's author creation),
42 @url{https://redo.readthedocs.io/, apenwarr/redo} (@code{contrib/do} is
43 from that project), @url{https://github.com/leahneukirchen/redo-c, redo-c},
44 @url{https://github.com/gotroyb127/baredo, baredo}.
45
46 @vindex PREFIX
47 @vindex DESTDIR
48 @vindex GO
49 @vindex MAKEINFO
50 @vindex PLANTUML
51 @vindex PREFIX
52 @vindex SENDMAIL
53 @vindex CFGPATH
54 @vindex SPOOLPATH
55 @vindex LOGPATH
56 @vindex BINDIR
57 @vindex INFODIR
58 @vindex DOCDIR
59 @file{config} file contains some environment variables that are
60 respected during installation:
61 @env{$PREFIX},
62 @env{$DESTDIR},
63 @env{$GO},
64 @env{$MAKEINFO},
65 @env{$PLANTUML},
66 @env{$PREFIX},
67 @env{$SENDMAIL},
68 @env{$CFGPATH},
69 @env{$SPOOLPATH},
70 @env{$LOGPATH},
71 @env{$BINDIR},
72 @env{$INFODIR},
73 @env{$DOCDIR}.
74
75 There is @command{install} target for binaries and info-documentation
76 installation:
77
78 @example
79 # PREFIX=/usr/local redo install
80 @end example
81
82 @vindex nofsnotify
83 @cindex kqueue
84 @cindex epoll
85 @vindex GO_CFLAGS
86 NNCP depends on @code{github.com/fsnotify/fsnotify} library, that is
87 solely relies on OS-specific mechanisms. There is possibility that you
88 have either broken or unsupported ones. You can still build NNCP with
89 @code{-tags nofsnotify} build option, to skip @code{fsnotify} library
90 usage at all:
91
92 @example
93 $ GO_CFLAGS="-tags nofsnotify" redo ...
94 @end example
95
96 @vindex noyggdrasil
97 You can also disable Yggdrasil support with @code{-tags noyggdrasil}.