]> Cypherpunks.ru repositories - nncp.git/blob - doc/building.texi
Merge branch 'develop'
[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.@{asc,sig@}
17 [verify signature]
18 $ xz -d < nncp-@value{VERSION}.tar.xz | tar xf -
19 $ cd nncp-@value{VERSION}
20 [optionally edit config]
21 $ bin/build
22 @end example
23
24 @pindex info
25 After that you should get various @command{bin/nncp-*} binaries and
26 @command{bin/hjson-cli} command (only for your convenience, not
27 necessary installation). For example, documentation for
28 @command{nncp-bundle} command can be get with
29 @command{info doc/nncp.info -n nncp-bundle}.
30
31 @vindex PREFIX
32 @vindex DESTDIR
33 @vindex GO
34 @vindex MAKEINFO
35 @vindex PLANTUML
36 @vindex PREFIX
37 @vindex SENDMAIL
38 @vindex CFGPATH
39 @vindex SPOOLPATH
40 @vindex LOGPATH
41 @vindex BINDIR
42 @vindex INFODIR
43 @vindex DOCDIR
44 @file{config} file contains some environment variables that are
45 respected during installation:
46 @env{$PREFIX},
47 @env{$DESTDIR},
48 @env{$GO},
49 @env{$MAKEINFO},
50 @env{$PLANTUML},
51 @env{$PREFIX},
52 @env{$SENDMAIL},
53 @env{$CFGPATH},
54 @env{$SPOOLPATH},
55 @env{$LOGPATH},
56 @env{$BINDIR},
57 @env{$INFODIR},
58 @env{$DOCDIR}.
59
60 There is @command{install} script for binaries and info-documentation
61 installation:
62
63 @example
64 # PREFIX=/usr/local ./install
65 @end example
66
67 @vindex nofsnotify
68 @cindex kqueue
69 @cindex epoll
70 @vindex GO_CFLAGS
71 NNCP depends on @code{github.com/fsnotify/fsnotify} library, that solely
72 relies on OS-specific mechanisms. There is possibility that you have
73 either broken or unsupported ones. You can still build NNCP with
74 @code{-tags nofsnotify} build option, to skip @code{fsnotify} library
75 usage at all:
76
77 @example
78 $ GO_CFLAGS="-tags nofsnotify" bin/build
79 @end example
80
81 @vindex noyggdrasil
82 You can also disable Yggdrasil support with @code{-tags noyggdrasil}.