aboutsummaryrefslogtreecommitdiffstats
path: root/doc/build.md
blob: 6c812dccdce95eedcb85962e4a19636abff96a4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
% Build instructions
% [Guilhem Moulin](mailto:guilhem@fripost.org)

On Debian 10 (codename *Buster*) and later, installing [`interimap`(1)]
is a single command away:

    $ sudo apt install interimap

This document is for those who are running other systems, and/or who
wish to install from [source](https://git.guilhem.org/interimap).


Dependencies
============

[`interimap`(1)](interimap.1.html) depends on Perl ≥5.20 and the
following Perl modules:

  * [`Compress::Raw::Zlib`](https://perldoc.perl.org/Compress/Raw/Zlib.html) (*core module*)
  * [`Config::Tiny`](https://metacpan.org/pod/Config::Tiny)
  * [`DBI`](https://metacpan.org/pod/DBI)
  * [`DBD::SQLite`](https://metacpan.org/pod/DBD::SQLite)
  * [`Errno`](https://perldoc.perl.org/Errno.html) (*core module*)
  * [`Getopt::Long`](https://perldoc.perl.org/Getopt/Long.html) (*core module*)
  * [`MIME::Base64`](https://perldoc.perl.org/MIME/Base64.html) (*core module*) — if authentication is required
  * [`List::Util`](https://perldoc.perl.org/List/Util.html) (*core module*)
  * [`Net::SSLeay`](https://metacpan.org/pod/Net::SSLeay)1.86_06
  * [`POSIX`](https://perldoc.perl.org/POSIX.html) (*core module*)
  * [`Socket`](https://perldoc.perl.org/Socket.html) (*core module*)
  * [`Time::HiRes`](https://perldoc.perl.org/Time/HiRes.html) (*core module*) — if `logfile` is set

On Debian GNU/Linux systems, the dependencies can be installed with the
following command:

    $ sudo apt install libconfig-tiny-perl libdbd-sqlite3-perl libnet-ssleay-perl

Additional packages are required in order to run the test suite:

    $ sudo apt install dovecot-imapd dovecot-lmtpd openssl procps sqlite3 xxd
<!-- -->
    $ make check

(Note also that the test suite needs to bind to TCP ports 10024, 10143
and 10993 on the loopback interface.)

Generate documentation
======================

Yet another set of packages is needed to generate the documentation:

    $ sudo apt install jq pandoc

Run `` `make manual` `` (or just `` `make` ``) in order to generate the
manuals.  You'll find them at `build/doc/*.[1-9]`.  Then use for
instance `` `man -l build/doc/interimap.1` `` to read your local copy of
the [`interimap`(1)] manual.

The HTML documentation can be built with `` `make html` ``.  By default
HTML files are generated at `build/doc/*.html`, and a local CSS file is
used — namely `/usr/share/javascript/bootstrap4/css/bootstrap.css`,
shipped the by [`libjs-bootstrap`](https://tracker.debian.org/libjs-bootstrap)
package.  But this is configurable: use for instance

    $ make html builddir="$XDG_RUNTIME_DIR/interimap" \
		CSS="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/css/bootstrap.min.css"

to generate the HTML documentation under `$XDG_RUNTIME_DIR/interimap/doc`
using a remote CSS file.

The `doc` target generates all documentation, manuals as well as HTML
pages.


Build custom Debian packages
============================

Debian GNU/Linux users can also use [`gbp`(1)] from
[`git-buildpackage`](https://tracker.debian.org/pkg/git-buildpackage) in
order to build their own packages:

    $ git checkout debian/latest
    $ gbp buildpackage

Alternatively, for the development version:

    $ git checkout debian/latest
    $ git merge master
    $ gbp buildpackage --git-force-create --git-upstream-tree=BRANCH


[`interimap`(1)]: interimap.1.html
[`gbp`(1)]: https://manpages.debian.org/git-buildpackage/gbp.1.en.html