maddy

Fork https://github.com/foxcpp/maddy

git clone git://git.lin.moe/go/maddy.git

 1# Building from source
 2
 3## System dependencies
 4
 5You need C toolchain, Go toolchain and Make:
 6
 7On Debian-based system this should work:
 8```
 9apt-get install golang-1.23 gcc libc6-dev make
10```
11
12Additionally, if you want manual pages, you should also have scdoc installed.
13Figuring out the appropriate way to get scdoc is left as an exercise for
14reader (for Ubuntu 22.04 LTS it is in repositories).
15
16## Recent Go toolchain
17
18maddy depends on a rather recent Go toolchain version that may not be
19available in some distributions (*cough* Debian *cough*).
20
21`go` command in Go 1.21 or newer will automatically download up-to-date
22toolchain to build maddy. It is necessary to run commands below only
23if you have `go` command version older than 1.21.
24
25```
26wget "https://go.dev/dl/go1.23.5.linux-amd64.tar.gz"
27tar xf "go1.23.5.linux-amd64.tar.gz"
28export GOROOT="$PWD/go"
29export PATH="$PWD/go/bin:$PATH"
30```
31
32## Step-by-step
33
341. Clone repository
35```
36$ git clone https://github.com/foxcpp/maddy.git
37$ cd maddy
38```
39
402. Select the appropriate version to build:
41```
42$ git checkout v0.8.0      # a specific release
43$ git checkout master      # next bugfix release
44$ git checkout dev         # next feature release
45```
46
473. Build & install it
48```
49$ ./build.sh
50$ sudo ./build.sh install
51```
52
534. Finish setup as described in [Setting up](../setting-up) (starting from System configuration).
54
55