H.6. Installation directories

--prefix=PATH

This is a fairly standard option with GNU autoconf, and it sets the base path for most of the other install directories. The default is /usr/local/ups, which puts everything but the state sockets in one easy place, and does not conflict with usual distribution packaging.

If you like having things to be at more of a "system" level, setting the prefix to /usr/local or even /usr might be better.

--exec_prefix=PATH

This sets the base path for architecture dependent files. By default, it is the same as <prefix>.

--sysconfdir=PATH

Changes the location where NUT’s configuration files are stored. By default this path is <prefix>/etc. Setting this to /etc/nut or /etc/ups might be useful. See also --enable-inplace-runtime.

The NUT_CONFPATH environment variable overrides this at run time.

--sbindir=PATH
--bindir=PATH

Where executable files will be installed. Files that are normally executed by root (upsd, upsmon, upssched) go to <sbindir>, all others to <bindir>. The defaults are <exec_prefix>/sbin and <exec_prefix>/bin respectively.

See also --with-drvpath below.

--with-drvpath=PATH

The UPS drivers will be installed to this path. By default they install to <exec_prefix>/bin, i.e. /usr/local/ups/bin.

You would want a location that remains mounted when most of the system is prepared to turn off, so some distributions package NUT drivers into /lib/nut or similar. See config-notes.txt detailing how to set up system shutdown.

The driverpath global directive in the ups.conf file overrides this at run time.

--datadir=PATH

Change the data directory, i.e., where architecture independent read-only data is installed. By default this is <prefix>/share, i.e. /usr/local/ups/share. At the moment, this directory only holds two files — the optional cmdvartab and driver.list.

--mandir=PATH

Sets the base directories for the man pages. The default is <prefix>/man, i.e. /usr/local/ups/man.

--includedir=PATH

Sets the path for include files to be installed when --with-dev is selected. For example, upsclient.h is installed here. The default is <prefix>/include.

--libdir=PATH

Sets the installation path for libraries. Depending on the build configuration, this can include the libupsclient, libnutclient, libnutclientsub, libnutscan and their pkg-config metadata (see --with-pkgconfig-dir option). The default is <exec_prefix>/lib.

--libexecdir=PATH

Sets the installation path for "executable libraries" — helper scripts or programs that are not intended for direct and regular use by people, and rather are implementation details of services. Depending on the build configuration, this can include the nut-driver-enumerator.sh, sockdebug, and others. The default is <exec_prefix>/libexec.

Package distributions may want to use this option to customize this path to include the package name, e.g. set it to <exec_prefix>/libexec/nut.

--with-pkgconfig-dir=PATH

Where to install pkg-config *.pc files. This option only has an effect if --with-dev is selected, and causes a pkg-config file to be installed in the named location. The default is <exec_prefix>/pkgconfig.

Use --without-pkgconfig-dir to disable this feature altogether.

--with-cgipath=PATH

The CGI programs will be installed to this path. By default, they install to <exec_prefix>/cgi-bin, which is usually /usr/local/ups/cgi-bin.

Note

If you set the prefix to something like /usr, you should set the cgipath to something else, because /usr/cgi-bin is pretty ugly and non-standard.

The CGI programs are not built or installed by default. Use ./configure --with-cgi to request that they are built and installed.

--with-htmlpath=PATH

HTML files will be installed to this path. By default, this is <prefix>/html. Note that HTML files are only installed if --with-cgi is selected.

--with-hotplug-dir=PATH

Where to install Linux 2.4 hotplugging rules. The default is to use /etc/hotplug, if that directory exists, and to not install it otherwise. Note that this installation directory is not a subdirectory of <prefix> by default. When installing NUT as a non-root user, you may have to override this option.

Use --without-hotplug-dir to disable this feature altogether.

--with-udev-dir=PATH

Where to install Linux 2.6 hotplugging rules, for kernels that have the "udev" mechanism. The default is to use /etc/udev, if that directory exists, and to not install it otherwise. Note that this installation directory is not a subdirectory of <prefix> by default. When installing NUT as a non-root user, you may have to override this option.

Use --without-udev-dir to disable this feature altogether.

--with-systemdsystemunitdir=PATH

Where to install Linux systemd unit definitions. Useless and harmless on other OSes, including Linux distributions without systemd, just adding a little noise to configure script output.

Use --with-systemdsystemunitdir=auto (default) to detect the settings using pkg-config if possible.

Use --with-systemdsystemunitdir(=yes) to require detection of these settings with pkg-config, or fail configuration if not possible.

Use --with-systemdsystemunitdir=no to disable this feature altogether.

--with-systemdshutdowndir=PATH

Where to install Linux systemd unit definitions for shutdown handling. Useless and harmless on other OSes, including Linux distributions without systemd, just adding a little noise to configure script output.

Use --with-systemdshutdowndir to detect the settings using pkg-config.

Use --with-systemdshutdowndir=no to disable this feature altogether.

--with-systemdtmpfilesdir=PATH

Where to install Linux systemd configuration for tmpfiles handling (the automatically created locations for PID, state and similar run-time files). Useless and harmless on other OSes, including Linux distributions without systemd, just adding a little noise to configure script output.

Use --with-systemdtmpfilesdir to detect the settings using pkg-config.

Use --with-systemdtmpfilesdir=no to disable this feature altogether.

--with-libsystemd=(auto|yes|no)
--with-libsystemd-includes=CFLAGS
--with-libsystemd-libs=LDFLAGS

If the build system provides libsystemd headers, NUT binaries can be built with tighter integration to this service management framework. In this case NUT daemons (upsd, upsmon, upslog and drivers) would report their life-cycle milestones (READY, RELOADING, STOPPING) and support the watchdog reports (if enabled in their respective units by end-user — not done by default since the numbers depends on monitoring system performance). Default: "auto" (integration enabled if detected).

--with-augeas-lenses-dir=PATH

Where to install Augeas configuration-management lenses.

Only useful and valid if you use Augeas to parse and modify configuration files. The default is to use /usr/share/augeas/lenses, if that directory exists, and to not install it otherwise.