Prev |  | Next

### 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

Base system location for configuration files. By default this path is `<prefix>/etc`.

From time immemorial until NUT v2.8.5, this was the option to change in order to define a dedicated directory for NUT configuration files. Setting this to `/etc/nut` or `/etc/ups` might be useful in older builds. Now the `--with-confdir*` options are preferable.

    --with-confdir-suffix=DIRNAME

Provides a partial location where NUT’s configuration files are stored, relative to `<sysconfdir>`. By default this path is empty if either `<sysconfdir>` was modified (assuming legacy build configuration was re-used for current NUT), or if `<prefix>` was NOT modified (then the value of `/usr/local/ups/etc` makes sense to directly hold NUT configuration files). Otherwise it defaults to `<PACKAGE_NAME>` which is `nut` (unless some distribution hacks the `configure` script to their liking).

Surrounding slashes would be removed and a trailing one added, to normalize the paths and avoid double-slashes etc.

See also `--enable-inplace-runtime`.

    --with-confdir=PATH

Changes the location where NUT’s configuration files are stored. By default this path is `<sysconfdir>/<confdir_suffix>` which on most systems resolves to `/etc/nut`.

See also `--enable-inplace-runtime`.

The `NUT_CONFPATH` environment variable overrides this at run time.

    --with-confdir-examples=PATH

Changes the location where NUT’s configuration file examples are stored. By default this path is `<confdir>`, but some distributions prefer to store examples under `<docdir>` or somewhere else, requiring `<sysconfdir>` to be used only by actual live system configuration.

    --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`, but it may be quite reasonable to install them into a sub-directory of your `libexec` location or similar (e.g. `/usr/libexec/nut/drv`): on one hand, to avoid potential conflicts with unrelated programs that happen to have same names, and on another — to keep these NUT programs which should not normally be executed by neither unprivileged users nor systems administrators, out of default `PATH` settings.

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 for the currently built project is installed. By GNU Autotools default, this is `<prefix>/share` (same as the system-wide "data root" which we also consult for third-party data such as Augeas lens delivery locations), i.e. `/usr/local/ups/share`.

+ Typically this is reconfigured to a `--datadir='${datarootdir}/nut'` value.

+

### Note

This long-established practice with NUT packaging differs from current recommendations of GNU Automake/Autoconf ecosystem listed at https://www.gnu.org/prep/standards/html_node/Directory-Variables.html :

    The definition of `datadir` is the same for all packages,
    so you should install your data in a subdirectory thereof.
    Most packages install their data under `$(datadir)/package-name/`.

+ At the moment, this directory only holds two files by default — the optional `cmdvartab` and `driver.list`, but may hold additional data on certain systems (e.g. FreeBSD quirks, Solaris SMF or init methods, sometimes documentation).

    --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-systemdsystempresetdir=PATH

Where to install Linux systemd unit presets (lists of services enabled or disabled by default). Useless and harmless on other OSes, including Linux distributions without systemd, just adding a little noise to the configure script output.

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

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

Use `--with-systemdsystempresetdir=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
    --with-systemdsysusersdir=PATH

Where to install Linux systemd configuration for tmpfiles and sysusers handling (the automatically created locations for user/group, 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.

Prev | Up | Next
| Home |