Installation
************

Possibly NNCP package already exists for your distribution:

   • FreeBSD ports (https://www.freshports.org/net/nncp/)
   • DragonFly BSD ports
     (https://github.com/DragonFlyBSD/DPorts/tree/master/net/nncp)
   • Void Linux
     (https://github.com/void-linux/void-packages/blob/master/srcpkgs/nncp/template)
   • Debian packages
     (https://qa.debian.org/developer.php?login=jgoerzen@complete.org)
     (pending inclusion, maintainer’s page)
   • NixOS packages (https://github.com/NixOS/nixpkgs/pull/75772)
     (pending inclusion, maintainer’s page)

   NNCP should run on any POSIX-compatible operating system.

   NNCP is written on Go (https://golang.org/) programming language and
you have to install Go compiler 1.10+ version.  ‘Make’ (BSD and GNU
versions are fine) is recommended for convenient building.  Texinfo
(https://www.gnu.org/software/texinfo/) is used for building
documentation (although tarballs already include it).

   In general you must get *note the tarball: Tarballs, check its *note
integrity and authenticity: Integrity. and run ‘make’.  Look for general
and platform-specific *note build instructions: Build-instructions.

Prepared tarballs
=================

You can obtain releases source code prepared tarballs on
<http://www.nncpgo.org/>.
Tarballs integrity check
========================

You *have to* check downloaded archives integrity and verify their
signature to be sure that you have got trusted, untampered software.
For integrity and authentication of downloaded binaries GNU Privacy
Guard (https://www.gnupg.org/) is used.  You must download signature
(‘.sig’) provided with the tarball.

   For the very first time you need to import signing public key.  It is
provided below, but it is better to check alternative resources with it.

pub   rsa2048/0x2B25868E75A1A953 2017-01-10
      92C2 F0AE FE73 208E 46BF  F3DE 2B25 868E 75A1 A953
uid   NNCP releases <releases at nncpgo dot org>

   •      $ gpg --auto-key-locate dane --locate-keys releases at nncpgo dot org
          $ gpg --auto-key-locate wkd --locate-keys releases at nncpgo dot org

   • -----BEGIN PGP PUBLIC KEY BLOCK-----
     
     mQENBFh0lv0BCADmquHdyjr1Mr8VHRNxzipHxmgbdK3CGJL1yzb1ntj7zbJl5UnQ
     71cxQ968pYPOBYqsA3oqtURAXzVL6qPGajHM+OXKB5OOjmt7vbd3xP5sBCWOjlrq
     S7yWx5ffuXf++tCGiXGkG7q+4zmXJUBuaot0fQ5ebBVLzVVIMv2C4hArZFZtK+YZ
     GkrIU+S49joe4qeUdCIQ1KpEB2m774QFxG05fMMys9L60wkL6ZgAy0GadkvCI5jD
     Xj5nRxa0fn+T/pcOWCpy7ka4rCR0rKCCNB8ARvpDnknTu2S9cxnWy1uOMv8JQpTb
     nY27vprdkH9aykdPl/7uHL/X1hutFxE8FOAjABEBAAG0I05OQ1AgcmVsZWFzZXMg
     PHJlbGVhc2VzQG5uY3Bnby5vcmc+iQFXBBMBCABBFiEEksLwrv5zII5Gv/PeKyWG
     jnWhqVMFAlh0lv0CGwMMCwoJDQgMBwsDBAECBxUKCQgLAwIFFgIBAwACHgECF4AA
     CgkQKyWGjnWhqVOaBggAqWywYtUddljHpiR/SK8uiYjSl8/F4QemM+tsu66GW56Y
     ZB7VFOxNFcpEfSnWwH61cJ5lCuRRgyjJcIOptzbKbO+nvYQEtXznjQYoJMLnPqAa
     2UPI5Seaijx8sXQWzYRq2Vzl9KUDBlhB2y4jZD4CFC1V29NRbWuPUajZn8UiZzFT
     IUR/gjvtYQozF0jN8Sevs+oGAN1tqK5kYo8YXEeL+3NCVUJkqFmBtFVxrxzty4cE
     ozgKpXzt9bi10a1hthKluWcZD6Zc4InqQhAGXb2JB2a5wRTs8CkJtHadwBOD3JEt
     HjfhBAoZMYmhOBeHt87AG5OjFNRIOJ2rRacnRDA3E4h1BBARCAAdFiEEz2Domlkj
     HnbiY2QirhqBCeSYV+8FAlh0lxYACgkQrhqBCeSYV+9i1QD/bdLAY67nf5giI/wQ
     i6K7v6PTPFwG6TtG6jj68Cy13RgA/iMuKw7niLwyPWRKzWcMIG1YhVyCNCgKQvFL
     vdr6yKbN
     =R8E0
     -----END PGP PUBLIC KEY BLOCK-----

   Then you could verify tarballs signature:

     $ gpg --verify nncp-5.3.2.tar.xz.sig nncp-5.3.2.tar.xz
Build instructions
==================

Make sure that Go is installed.  For example to install it from
packages:

FreeBSD
     pkg install go
Debian, Ubuntu
     apt install golang

     $ [fetch|wget] http://www.nncpgo.org/download/nncp-5.3.2.tar.xz
     $ [fetch|wget] http://www.nncpgo.org/download/nncp-5.3.2.tar.xz.sig
     $ gpg --verify nncp-5.3.2.tar.xz.sig nncp-5.3.2.tar.xz
     $ xz --decompress --stdout nncp-5.3.2.tar.xz | tar xf -
     $ make -C nncp-5.3.2 all

   There is ‘install’ make-target respecting ‘DESTDIR’.  It will install
binaries and info-documentation:

     # make -C nncp-5.3.2 install PREFIX=/usr/local
Development source code
=======================

Development source code contains the latest version of the code.  It may
be buggy.  It does not contain compiled documentation and dependent
libraries source code.  Because of that, it is recommended for porters
to use *note tarballs: Tarballs. instead.

     $ git clone git://git.cypherpunks.ru/nncp.git
     $ cd nncp
     $ git checkout develop

   Also there is mirror of dependent libraries for safety if their
native repositories will be unavailable (they are seldom updated):

Software/library                     Mirror
--------------------------------------------------------------------------
‘github.com/davecgh/go-xdr’          <git://git.cypherpunks.ru/go-xdr.git>
‘github.com/dustin/go-humanize’      <git://git.cypherpunks.ru/go-humanize.git>
‘github.com/flynn/noise’             <git://git.cypherpunks.ru/noise.git>
‘github.com/google/go-cmp’           <git://git.cypherpunks.ru/go-cmp.git>
‘github.com/gorhill/cronexpr’        <git://git.cypherpunks.ru/cronexpr.git>
‘github.com/hjson/hjson-go’          <git://git.cypherpunks.ru/hjson-go.git>
‘github.com/klauspost/compress’      <git://git.cypherpunks.ru/compress.git>
‘golang.org/x/crypto’                <git://git.cypherpunks.ru/crypto.git>
‘golang.org/x/net’                   <git://git.cypherpunks.ru/net.git>
‘golang.org/x/sys’                   <git://git.cypherpunks.ru/sys.git>
‘gopkg.in/check.v1’                  <git://git.cypherpunks.ru/check.git>
