Skip to content

Commit 14a3b40

Browse files
committed
docs/man/apc_modbus.txt: update comments for libmodbus+rtu_usb builds - with a static library suggestion [networkupstools#2063]
Signed-off-by: Jim Klimov <[email protected]>
1 parent 61edcb4 commit 14a3b40

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

docs/man/apc_modbus.txt

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,24 @@ cd libmodbus
104104
./autogen.sh
105105
./configure --with-libusb --prefix=/path/to/prefix
106106
make install
107+
------
108+
109+
[NOTE]
110+
======
111+
* you may need to `make && sudo make install` if you want to place this library
112+
files' variant into a system path (like `--prefix=/usr/local/ups` to match
113+
NUT defaults -- this activity would need privilege elevation via `sudo`),
114+
and not into your home directory or some `/tmp` location.
115+
* conversely, you may want to
116+
`./configure --with-libusb --enable-static --disable-shared --prefix=/path/to/prefix`
117+
and only build and install a static `libmodbus.a` (can well be installed into
118+
`/tmp` or similarly short-lived location), so that the customized Modbus+USB
119+
logic gets built directly into `apc_modbus` binary program and there would be
120+
no potential run-time conflict with a dynamic library file available elsewhere
121+
in the system.
122+
======
107123

124+
------
108125
cd ~/
109126
git clone https://github.com/networkupstools/nut
110127
cd nut
@@ -115,9 +132,12 @@ cd nut
115132
make
116133
------
117134

118-
NOTE: Other `configure` options may be needed for proper behavior, such as
135+
[NOTE]
136+
======
137+
* Other NUT `configure` options may be needed for proper behavior, such as
119138
`--prefix`, `--with-sysconfdir`, `--with-user` and `--with-group` to match
120139
your packaged or otherwise preceding NUT installation.
140+
======
121141

122142
The `./configure --enable-inplace-runtime` may be a good start to inherit
123143
build configuration from an existing NUT deployment, as further detailed at

0 commit comments

Comments
 (0)