Check out from git, generate files and configure to tailor to your build environment, and build some tests:
:; mkdir -p nut && cd nut && \ git clone https://github.com/networkupstools/nut/ -b master . :; ./autogen.sh && \ ./configure --with-doc=all --with-all --with-cgi && \ make all && make check && make spellcheck
You can toggle some configure
options to check different dependency
variants, e.g. --with-ssl=nss
vs. --with-ssl=openssl
For reproducible runs of various pre-sets of configuration during
development, take a look at ci_build.sh
script and different BUILD_TYPE
(and other) environment variable settings that it supports. A minimal run
with it is just to call the script, e.g.:
:; mkdir -p nut && cd nut && \ git clone https://github.com/networkupstools/nut/ -b fightwarn . :; ./ci_build.sh
To build older releases, such as "vanilla" NUT 2.7.4 and older, you may need to address some nuances:
python
in PATH
points to a python-2.x implementation
(master
branch is fixed to work with python 2 and 3)
bash
is your user and maybe system shell (or ensure the
generated configure
script gets interpreted by it)
For intensive rebuilds, ccache
is recommended.