git: d6f4ee06c5f6 - main - sysutils/nut*: Add MANPAGES option

From: Cy Schubert <cy_at_FreeBSD.org>
Date: Mon, 09 May 2022 18:11:23 UTC
The branch main has been updated by cy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d6f4ee06c5f668af7615300159d803462da965cd

commit d6f4ee06c5f668af7615300159d803462da965cd
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2022-05-04 04:18:28 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2022-05-09 17:49:28 +0000

    sysutils/nut*: Add MANPAGES option
    
    Provide a MANPAGES option to allow users wishing a leaner install to
    deselect them.
    
    PR:             263751
    Reported by:    Joerg Pulz <Joerg.Pulz@frm2.tum.de>
---
 sysutils/nut-devel/Makefile  |   7 +-
 sysutils/nut-devel/pkg-plist | 296 +++++++++++++++++++++----------------------
 sysutils/nut/Makefile        |   7 +-
 sysutils/nut/pkg-plist       | 296 +++++++++++++++++++++----------------------
 4 files changed, 306 insertions(+), 300 deletions(-)

diff --git a/sysutils/nut-devel/Makefile b/sysutils/nut-devel/Makefile
index b67f23a4dfd3..bbced16cca75 100644
--- a/sysutils/nut-devel/Makefile
+++ b/sysutils/nut-devel/Makefile
@@ -36,8 +36,8 @@ CGIDIR_REL?=	${CGIDIR:S,^${PREFIX}/,,}
 PLIST_SUB+=	CGIDIR="${CGIDIR_REL}"
 PLIST_SUB+=	CGIETCDIR="etc/nut/"
 
-OPTIONS_DEFAULT=SERIAL USB SNMP NEON SSL_OFF
-OPTIONS_DEFINE=	SERIAL USB SNMP NEON PDU CGI BASH AVAHI IPMIPSU FREEIPMI DOCS
+OPTIONS_DEFAULT=SERIAL USB SNMP NEON SSL_OFF MANPAGES
+OPTIONS_DEFINE=	SERIAL USB SNMP NEON PDU CGI BASH AVAHI IPMIPSU FREEIPMI DOCS MANPAGES
 OPTIONS_SINGLE=	SSL
 OPTIONS_SINGLE_SSL=	SSL_OFF OPENSSL NSS
 OPTIONS_SUB=	yes
@@ -81,6 +81,9 @@ LIB_DEPENDS+=	libltdl.so:devel/libltdl
 # XXX asciidoc.
 BUILD_DEPENDS=	asciidoc:textproc/asciidoc
 
+MANPAGES_CONFIGURE_ON=	--with-doc=man=auto
+MANPAGES_CONFIGURE_OFF=	--with-doc=no
+
 CGI_LIB_DEPENDS=	libgd.so:graphics/gd
 CGI_CONFIGURE_WITH=	cgi
 CGI_CONFIGURE_ON=	--with-cgipath=${CGIDIR} \
diff --git a/sysutils/nut-devel/pkg-plist b/sysutils/nut-devel/pkg-plist
index b1dac90a6916..013196dd7f5d 100644
--- a/sysutils/nut-devel/pkg-plist
+++ b/sysutils/nut-devel/pkg-plist
@@ -111,154 +111,154 @@ libdata/pkgconfig/libnutclientstub.pc
 %%SERIAL%%libexec/nut/upscode2
 %%USB%%libexec/nut/usbhid-ups
 %%SERIAL%%libexec/nut/victronups
-man/man3/libnutclient.3.gz
-man/man3/libnutclient_commands.3.gz
-man/man3/libnutclient_devices.3.gz
-man/man3/libnutclient_general.3.gz
-man/man3/libnutclient_misc.3.gz
-man/man3/libnutclient_tcp.3.gz
-man/man3/libnutclient_variables.3.gz
-man/man3/nutclient_authenticate.3.gz
-man/man3/nutclient_destroy.3.gz
-man/man3/nutclient_device_forced_shutdown.3.gz
-man/man3/nutclient_device_login.3.gz
-man/man3/nutclient_device_master.3.gz
-man/man3/nutclient_execute_device_command.3.gz
-man/man3/nutclient_get_device_command_description.3.gz
-man/man3/nutclient_get_device_commands.3.gz
-man/man3/nutclient_get_device_description.3.gz
-man/man3/nutclient_get_device_num_logins.3.gz
-man/man3/nutclient_get_device_rw_variables.3.gz
-man/man3/nutclient_get_device_variable_description.3.gz
-man/man3/nutclient_get_device_variable_values.3.gz
-man/man3/nutclient_get_device_variables.3.gz
-man/man3/nutclient_get_devices.3.gz
-man/man3/nutclient_has_device.3.gz
-man/man3/nutclient_has_device_command.3.gz
-man/man3/nutclient_has_device_variable.3.gz
-man/man3/nutclient_logout.3.gz
-man/man3/nutclient_set_device_variable_value.3.gz
-man/man3/nutclient_set_device_variable_values.3.gz
-man/man3/nutclient_tcp_create_client.3.gz
-man/man3/nutclient_tcp_disconnect.3.gz
-man/man3/nutclient_tcp_get_timeout.3.gz
-man/man3/nutclient_tcp_is_connected.3.gz
-man/man3/nutclient_tcp_reconnect.3.gz
-man/man3/nutclient_tcp_set_timeout.3.gz
-man/man3/nutscan.3.gz
-man/man3/nutscan_add_device_to_device.3.gz
-man/man3/nutscan_add_option_to_device.3.gz
-man/man3/nutscan_cidr_to_ip.3.gz
-man/man3/nutscan_display_parsable.3.gz
-man/man3/nutscan_display_ups_conf.3.gz
-man/man3/nutscan_free_device.3.gz
-man/man3/nutscan_get_serial_ports_list.3.gz
-man/man3/nutscan_init.3.gz
-man/man3/nutscan_new_device.3.gz
-man/man3/nutscan_scan_avahi.3.gz
-man/man3/nutscan_scan_eaton_serial.3.gz
-man/man3/nutscan_scan_ipmi.3.gz
-man/man3/nutscan_scan_nut.3.gz
-man/man3/nutscan_scan_snmp.3.gz
-man/man3/nutscan_scan_usb.3.gz
-man/man3/nutscan_scan_xml_http_range.3.gz
-man/man3/upscli_add_host_cert.3.gz
-man/man3/upscli_cleanup.3.gz
-man/man3/upscli_connect.3.gz
-man/man3/upscli_disconnect.3.gz
-man/man3/upscli_fd.3.gz
-man/man3/upscli_get.3.gz
-man/man3/upscli_init.3.gz
-man/man3/upscli_list_next.3.gz
-man/man3/upscli_list_start.3.gz
-man/man3/upscli_readline.3.gz
-man/man3/upscli_readline_timeout.3.gz
-man/man3/upscli_sendline.3.gz
-man/man3/upscli_sendline_timeout.3.gz
-man/man3/upscli_splitaddr.3.gz
-man/man3/upscli_splitname.3.gz
-man/man3/upscli_ssl.3.gz
-man/man3/upscli_strerror.3.gz
-man/man3/upscli_upserror.3.gz
-man/man3/upsclient.3.gz
-man/man5/nut.conf.5.gz
-man/man5/ups.conf.5.gz
-man/man5/upsd.conf.5.gz
-man/man5/upsd.users.5.gz
-man/man5/upsmon.conf.5.gz
-man/man5/upssched.conf.5.gz
-%%SERIAL%%man/man8/al175.8.gz
-%%SERIAL%%man/man8/apcupsd-ups.8.gz
-%%SERIAL%%man/man8/blazer_ser.8.gz
-%%USB%%man/man8/blazer_usb.8.gz
-%%NEON%%man/man8/netxml-ups.8.gz
-man/man8/nut-driver-enumerator.8.gz
-man/man8/nut-recorder.8.gz
-man/man8/nut-scanner.8.gz
-%%USB%%man/man8/nutdrv_atcl_usb.8.gz
-%%USB%%man/man8/nutdrv_qx.8.gz
-%%SERIAL%%man/man8/nutdrv_siemens_sitop.8.gz
-man/man8/nutupsdrv.8.gz
-%%SERIAL%%man/man8/riello_ser.8.gz
-%%USB%%man/man8/riello_usb.8.gz
-man/man8/upsc.8.gz
-man/man8/upscmd.8.gz
-man/man8/upsd.8.gz
-man/man8/upsdrvctl.8.gz
-man/man8/upsdrvsvcctl.8.gz
-man/man8/upslog.8.gz
-man/man8/upsmon.8.gz
-man/man8/upsrw.8.gz
-man/man8/upssched.8.gz
-%%CGI%%man/man5/hosts.conf.5.gz
-%%CGI%%man/man5/upsset.conf.5.gz
-%%CGI%%man/man5/upsstats.html.5.gz
-%%CGI%%man/man8/upsset.cgi.8.gz
-%%CGI%%man/man8/upsstats.cgi.8.gz
-%%CGI%%man/man8/upsimage.cgi.8.gz
-%%SERIAL%%man/man8/apcsmart.8.gz
-%%SERIAL%%man/man8/apcsmart-old.8.gz
-%%SERIAL%%man/man8/bestfortress.8.gz
-%%SERIAL%%man/man8/bcmxcp.8.gz
-%%SERIAL%%man/man8/belkin.8.gz
-%%SERIAL%%man/man8/belkinunv.8.gz
-%%SERIAL%%man/man8/bestuferrups.8.gz
-%%SERIAL%%man/man8/bestups.8.gz
-%%SERIAL%%man/man8/bestfcom.8.gz
-%%SERIAL%%man/man8/clone.8.gz
-%%SERIAL%%man/man8/dummy-ups.8.gz
-%%SERIAL%%man/man8/etapro.8.gz
-%%SERIAL%%man/man8/everups.8.gz
-%%SERIAL%%man/man8/gamatronic.8.gz
-%%SERIAL%%man/man8/genericups.8.gz
-%%SERIAL%%man/man8/isbmex.8.gz
-%%SERIAL%%man/man8/ivtscd.8.gz
-%%SERIAL%%man/man8/liebert.8.gz
-%%SERIAL%%man/man8/liebert-esp2.8.gz
-%%SERIAL%%man/man8/masterguard.8.gz
-%%SERIAL%%man/man8/metasys.8.gz
-%%SERIAL%%man/man8/mge-shut.8.gz
-%%SERIAL%%man/man8/mge-utalk.8.gz
-%%SERIAL%%man/man8/microdowell.8.gz
-%%SERIAL%%man/man8/microsol-apc.8.gz
-%%SERIAL%%man/man8/oneac.8.gz
-%%SERIAL%%man/man8/optiups.8.gz
-%%SERIAL%%man/man8/powercom.8.gz
-%%SERIAL%%man/man8/powerpanel.8.gz
-%%SERIAL%%man/man8/rhino.8.gz
-%%SERIAL%%man/man8/safenet.8.gz
-%%SERIAL%%man/man8/solis.8.gz
-%%SERIAL%%man/man8/tripplite.8.gz
-%%SERIAL%%man/man8/tripplitesu.8.gz
-%%SERIAL%%man/man8/upscode2.8.gz
-%%SERIAL%%man/man8/victronups.8.gz
-%%USB%%man/man8/bcmxcp_usb.8.gz
-%%USB%%man/man8/richcomm_usb.8.gz
-%%USB%%man/man8/tripplite_usb.8.gz
-%%USB%%man/man8/usbhid-ups.8.gz
-%%SNMP%%man/man8/snmp-ups.8.gz
-%%IPMIPSU%%man/man8/nut-ipmipsu.8.gz
-%%PDU%%man/man8/powerman-pdu.8.gz
+%%MANPAGES%%man/man3/libnutclient.3.gz
+%%MANPAGES%%man/man3/libnutclient_commands.3.gz
+%%MANPAGES%%man/man3/libnutclient_devices.3.gz
+%%MANPAGES%%man/man3/libnutclient_general.3.gz
+%%MANPAGES%%man/man3/libnutclient_misc.3.gz
+%%MANPAGES%%man/man3/libnutclient_tcp.3.gz
+%%MANPAGES%%man/man3/libnutclient_variables.3.gz
+%%MANPAGES%%man/man3/nutclient_authenticate.3.gz
+%%MANPAGES%%man/man3/nutclient_destroy.3.gz
+%%MANPAGES%%man/man3/nutclient_device_forced_shutdown.3.gz
+%%MANPAGES%%man/man3/nutclient_device_login.3.gz
+%%MANPAGES%%man/man3/nutclient_device_master.3.gz
+%%MANPAGES%%man/man3/nutclient_execute_device_command.3.gz
+%%MANPAGES%%man/man3/nutclient_get_device_command_description.3.gz
+%%MANPAGES%%man/man3/nutclient_get_device_commands.3.gz
+%%MANPAGES%%man/man3/nutclient_get_device_description.3.gz
+%%MANPAGES%%man/man3/nutclient_get_device_num_logins.3.gz
+%%MANPAGES%%man/man3/nutclient_get_device_rw_variables.3.gz
+%%MANPAGES%%man/man3/nutclient_get_device_variable_description.3.gz
+%%MANPAGES%%man/man3/nutclient_get_device_variable_values.3.gz
+%%MANPAGES%%man/man3/nutclient_get_device_variables.3.gz
+%%MANPAGES%%man/man3/nutclient_get_devices.3.gz
+%%MANPAGES%%man/man3/nutclient_has_device.3.gz
+%%MANPAGES%%man/man3/nutclient_has_device_command.3.gz
+%%MANPAGES%%man/man3/nutclient_has_device_variable.3.gz
+%%MANPAGES%%man/man3/nutclient_logout.3.gz
+%%MANPAGES%%man/man3/nutclient_set_device_variable_value.3.gz
+%%MANPAGES%%man/man3/nutclient_set_device_variable_values.3.gz
+%%MANPAGES%%man/man3/nutclient_tcp_create_client.3.gz
+%%MANPAGES%%man/man3/nutclient_tcp_disconnect.3.gz
+%%MANPAGES%%man/man3/nutclient_tcp_get_timeout.3.gz
+%%MANPAGES%%man/man3/nutclient_tcp_is_connected.3.gz
+%%MANPAGES%%man/man3/nutclient_tcp_reconnect.3.gz
+%%MANPAGES%%man/man3/nutclient_tcp_set_timeout.3.gz
+%%MANPAGES%%man/man3/nutscan.3.gz
+%%MANPAGES%%man/man3/nutscan_add_device_to_device.3.gz
+%%MANPAGES%%man/man3/nutscan_add_option_to_device.3.gz
+%%MANPAGES%%man/man3/nutscan_cidr_to_ip.3.gz
+%%MANPAGES%%man/man3/nutscan_display_parsable.3.gz
+%%MANPAGES%%man/man3/nutscan_display_ups_conf.3.gz
+%%MANPAGES%%man/man3/nutscan_free_device.3.gz
+%%MANPAGES%%man/man3/nutscan_get_serial_ports_list.3.gz
+%%MANPAGES%%man/man3/nutscan_init.3.gz
+%%MANPAGES%%man/man3/nutscan_new_device.3.gz
+%%MANPAGES%%man/man3/nutscan_scan_avahi.3.gz
+%%MANPAGES%%man/man3/nutscan_scan_eaton_serial.3.gz
+%%MANPAGES%%man/man3/nutscan_scan_ipmi.3.gz
+%%MANPAGES%%man/man3/nutscan_scan_nut.3.gz
+%%MANPAGES%%man/man3/nutscan_scan_snmp.3.gz
+%%MANPAGES%%man/man3/nutscan_scan_usb.3.gz
+%%MANPAGES%%man/man3/nutscan_scan_xml_http_range.3.gz
+%%MANPAGES%%man/man3/upscli_add_host_cert.3.gz
+%%MANPAGES%%man/man3/upscli_cleanup.3.gz
+%%MANPAGES%%man/man3/upscli_connect.3.gz
+%%MANPAGES%%man/man3/upscli_disconnect.3.gz
+%%MANPAGES%%man/man3/upscli_fd.3.gz
+%%MANPAGES%%man/man3/upscli_get.3.gz
+%%MANPAGES%%man/man3/upscli_init.3.gz
+%%MANPAGES%%man/man3/upscli_list_next.3.gz
+%%MANPAGES%%man/man3/upscli_list_start.3.gz
+%%MANPAGES%%man/man3/upscli_readline.3.gz
+%%MANPAGES%%man/man3/upscli_readline_timeout.3.gz
+%%MANPAGES%%man/man3/upscli_sendline.3.gz
+%%MANPAGES%%man/man3/upscli_sendline_timeout.3.gz
+%%MANPAGES%%man/man3/upscli_splitaddr.3.gz
+%%MANPAGES%%man/man3/upscli_splitname.3.gz
+%%MANPAGES%%man/man3/upscli_ssl.3.gz
+%%MANPAGES%%man/man3/upscli_strerror.3.gz
+%%MANPAGES%%man/man3/upscli_upserror.3.gz
+%%MANPAGES%%man/man3/upsclient.3.gz
+%%MANPAGES%%man/man5/nut.conf.5.gz
+%%MANPAGES%%man/man5/ups.conf.5.gz
+%%MANPAGES%%man/man5/upsd.conf.5.gz
+%%MANPAGES%%man/man5/upsd.users.5.gz
+%%MANPAGES%%man/man5/upsmon.conf.5.gz
+%%MANPAGES%%man/man5/upssched.conf.5.gz
+%%MANPAGES%%%%SERIAL%%man/man8/al175.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/apcupsd-ups.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/blazer_ser.8.gz
+%%MANPAGES%%%%USB%%man/man8/blazer_usb.8.gz
+%%MANPAGES%%%%NEON%%man/man8/netxml-ups.8.gz
+%%MANPAGES%%man/man8/nut-driver-enumerator.8.gz
+%%MANPAGES%%man/man8/nut-recorder.8.gz
+%%MANPAGES%%man/man8/nut-scanner.8.gz
+%%MANPAGES%%%%USB%%man/man8/nutdrv_atcl_usb.8.gz
+%%MANPAGES%%%%USB%%man/man8/nutdrv_qx.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/nutdrv_siemens_sitop.8.gz
+%%MANPAGES%%man/man8/nutupsdrv.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/riello_ser.8.gz
+%%MANPAGES%%%%USB%%man/man8/riello_usb.8.gz
+%%MANPAGES%%man/man8/upsc.8.gz
+%%MANPAGES%%man/man8/upscmd.8.gz
+%%MANPAGES%%man/man8/upsd.8.gz
+%%MANPAGES%%man/man8/upsdrvctl.8.gz
+%%MANPAGES%%man/man8/upsdrvsvcctl.8.gz
+%%MANPAGES%%man/man8/upslog.8.gz
+%%MANPAGES%%man/man8/upsmon.8.gz
+%%MANPAGES%%man/man8/upsrw.8.gz
+%%MANPAGES%%man/man8/upssched.8.gz
+%%MANPAGES%%%%CGI%%man/man5/hosts.conf.5.gz
+%%MANPAGES%%%%CGI%%man/man5/upsset.conf.5.gz
+%%MANPAGES%%%%CGI%%man/man5/upsstats.html.5.gz
+%%MANPAGES%%%%CGI%%man/man8/upsset.cgi.8.gz
+%%MANPAGES%%%%CGI%%man/man8/upsstats.cgi.8.gz
+%%MANPAGES%%%%CGI%%man/man8/upsimage.cgi.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/apcsmart.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/apcsmart-old.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/bestfortress.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/bcmxcp.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/belkin.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/belkinunv.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/bestuferrups.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/bestups.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/bestfcom.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/clone.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/dummy-ups.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/etapro.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/everups.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/gamatronic.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/genericups.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/isbmex.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/ivtscd.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/liebert.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/liebert-esp2.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/masterguard.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/metasys.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/mge-shut.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/mge-utalk.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/microdowell.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/microsol-apc.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/oneac.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/optiups.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/powercom.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/powerpanel.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/rhino.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/safenet.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/solis.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/tripplite.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/tripplitesu.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/upscode2.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/victronups.8.gz
+%%MANPAGES%%%%USB%%man/man8/bcmxcp_usb.8.gz
+%%MANPAGES%%%%USB%%man/man8/richcomm_usb.8.gz
+%%MANPAGES%%%%USB%%man/man8/tripplite_usb.8.gz
+%%MANPAGES%%%%USB%%man/man8/usbhid-ups.8.gz
+%%MANPAGES%%%%SNMP%%man/man8/snmp-ups.8.gz
+%%MANPAGES%%%%IPMIPSU%%man/man8/nut-ipmipsu.8.gz
+%%MANPAGES%%%%PDU%%man/man8/powerman-pdu.8.gz
 sbin/upsd
 sbin/upsdrvctl
 sbin/upsmon
diff --git a/sysutils/nut/Makefile b/sysutils/nut/Makefile
index 1a9a89ddeec8..7b9aaaebf21e 100644
--- a/sysutils/nut/Makefile
+++ b/sysutils/nut/Makefile
@@ -28,8 +28,8 @@ CGIDIR_REL?=	${CGIDIR:S,^${PREFIX}/,,}
 PLIST_SUB+=	CGIDIR="${CGIDIR_REL}"
 PLIST_SUB+=	CGIETCDIR="etc/nut/"
 
-OPTIONS_DEFAULT=SERIAL USB SNMP NEON SSL_OFF
-OPTIONS_DEFINE=	SERIAL USB SNMP NEON PDU CGI BASH AVAHI IPMIPSU FREEIPMI DOCS
+OPTIONS_DEFAULT=SERIAL USB SNMP NEON SSL_OFF MANPAGES
+OPTIONS_DEFINE=	SERIAL USB SNMP NEON PDU CGI BASH AVAHI IPMIPSU FREEIPMI DOCS MANPAGES
 OPTIONS_SINGLE=	IPMI SSL
 OPTIONS_SINGLE_SSL=	SSL_OFF OPENSSL NSS
 OPTIONS_SUB=	yes
@@ -68,6 +68,9 @@ CONFIGURE_ARGS=	--sysconfdir=${PREFIX}/etc/nut \
 CFLAGS+=	-I${LOCALBASE}/include -L${LOCALBASE}/lib
 LIB_DEPENDS+=	libltdl.so:devel/libltdl
 
+MANPAGES_CONFIGURE_ON=	--with-doc=man=auto
+MANPAGES_CONFIGURE_OFF=	--with-doc=no
+
 CGI_LIB_DEPENDS=	libgd.so:graphics/gd
 CGI_CONFIGURE_WITH=	cgi
 CGI_CONFIGURE_ON=	--with-cgipath=${CGIDIR} \
diff --git a/sysutils/nut/pkg-plist b/sysutils/nut/pkg-plist
index b1dac90a6916..013196dd7f5d 100644
--- a/sysutils/nut/pkg-plist
+++ b/sysutils/nut/pkg-plist
@@ -111,154 +111,154 @@ libdata/pkgconfig/libnutclientstub.pc
 %%SERIAL%%libexec/nut/upscode2
 %%USB%%libexec/nut/usbhid-ups
 %%SERIAL%%libexec/nut/victronups
-man/man3/libnutclient.3.gz
-man/man3/libnutclient_commands.3.gz
-man/man3/libnutclient_devices.3.gz
-man/man3/libnutclient_general.3.gz
-man/man3/libnutclient_misc.3.gz
-man/man3/libnutclient_tcp.3.gz
-man/man3/libnutclient_variables.3.gz
-man/man3/nutclient_authenticate.3.gz
-man/man3/nutclient_destroy.3.gz
-man/man3/nutclient_device_forced_shutdown.3.gz
-man/man3/nutclient_device_login.3.gz
-man/man3/nutclient_device_master.3.gz
-man/man3/nutclient_execute_device_command.3.gz
-man/man3/nutclient_get_device_command_description.3.gz
-man/man3/nutclient_get_device_commands.3.gz
-man/man3/nutclient_get_device_description.3.gz
-man/man3/nutclient_get_device_num_logins.3.gz
-man/man3/nutclient_get_device_rw_variables.3.gz
-man/man3/nutclient_get_device_variable_description.3.gz
-man/man3/nutclient_get_device_variable_values.3.gz
-man/man3/nutclient_get_device_variables.3.gz
-man/man3/nutclient_get_devices.3.gz
-man/man3/nutclient_has_device.3.gz
-man/man3/nutclient_has_device_command.3.gz
-man/man3/nutclient_has_device_variable.3.gz
-man/man3/nutclient_logout.3.gz
-man/man3/nutclient_set_device_variable_value.3.gz
-man/man3/nutclient_set_device_variable_values.3.gz
-man/man3/nutclient_tcp_create_client.3.gz
-man/man3/nutclient_tcp_disconnect.3.gz
-man/man3/nutclient_tcp_get_timeout.3.gz
-man/man3/nutclient_tcp_is_connected.3.gz
-man/man3/nutclient_tcp_reconnect.3.gz
-man/man3/nutclient_tcp_set_timeout.3.gz
-man/man3/nutscan.3.gz
-man/man3/nutscan_add_device_to_device.3.gz
-man/man3/nutscan_add_option_to_device.3.gz
-man/man3/nutscan_cidr_to_ip.3.gz
-man/man3/nutscan_display_parsable.3.gz
-man/man3/nutscan_display_ups_conf.3.gz
-man/man3/nutscan_free_device.3.gz
-man/man3/nutscan_get_serial_ports_list.3.gz
-man/man3/nutscan_init.3.gz
-man/man3/nutscan_new_device.3.gz
-man/man3/nutscan_scan_avahi.3.gz
-man/man3/nutscan_scan_eaton_serial.3.gz
-man/man3/nutscan_scan_ipmi.3.gz
-man/man3/nutscan_scan_nut.3.gz
-man/man3/nutscan_scan_snmp.3.gz
-man/man3/nutscan_scan_usb.3.gz
-man/man3/nutscan_scan_xml_http_range.3.gz
-man/man3/upscli_add_host_cert.3.gz
-man/man3/upscli_cleanup.3.gz
-man/man3/upscli_connect.3.gz
-man/man3/upscli_disconnect.3.gz
-man/man3/upscli_fd.3.gz
-man/man3/upscli_get.3.gz
-man/man3/upscli_init.3.gz
-man/man3/upscli_list_next.3.gz
-man/man3/upscli_list_start.3.gz
-man/man3/upscli_readline.3.gz
-man/man3/upscli_readline_timeout.3.gz
-man/man3/upscli_sendline.3.gz
-man/man3/upscli_sendline_timeout.3.gz
-man/man3/upscli_splitaddr.3.gz
-man/man3/upscli_splitname.3.gz
-man/man3/upscli_ssl.3.gz
-man/man3/upscli_strerror.3.gz
-man/man3/upscli_upserror.3.gz
-man/man3/upsclient.3.gz
-man/man5/nut.conf.5.gz
-man/man5/ups.conf.5.gz
-man/man5/upsd.conf.5.gz
-man/man5/upsd.users.5.gz
-man/man5/upsmon.conf.5.gz
-man/man5/upssched.conf.5.gz
-%%SERIAL%%man/man8/al175.8.gz
-%%SERIAL%%man/man8/apcupsd-ups.8.gz
-%%SERIAL%%man/man8/blazer_ser.8.gz
-%%USB%%man/man8/blazer_usb.8.gz
-%%NEON%%man/man8/netxml-ups.8.gz
-man/man8/nut-driver-enumerator.8.gz
-man/man8/nut-recorder.8.gz
-man/man8/nut-scanner.8.gz
-%%USB%%man/man8/nutdrv_atcl_usb.8.gz
-%%USB%%man/man8/nutdrv_qx.8.gz
-%%SERIAL%%man/man8/nutdrv_siemens_sitop.8.gz
-man/man8/nutupsdrv.8.gz
-%%SERIAL%%man/man8/riello_ser.8.gz
-%%USB%%man/man8/riello_usb.8.gz
-man/man8/upsc.8.gz
-man/man8/upscmd.8.gz
-man/man8/upsd.8.gz
-man/man8/upsdrvctl.8.gz
-man/man8/upsdrvsvcctl.8.gz
-man/man8/upslog.8.gz
-man/man8/upsmon.8.gz
-man/man8/upsrw.8.gz
-man/man8/upssched.8.gz
-%%CGI%%man/man5/hosts.conf.5.gz
-%%CGI%%man/man5/upsset.conf.5.gz
-%%CGI%%man/man5/upsstats.html.5.gz
-%%CGI%%man/man8/upsset.cgi.8.gz
-%%CGI%%man/man8/upsstats.cgi.8.gz
-%%CGI%%man/man8/upsimage.cgi.8.gz
-%%SERIAL%%man/man8/apcsmart.8.gz
-%%SERIAL%%man/man8/apcsmart-old.8.gz
-%%SERIAL%%man/man8/bestfortress.8.gz
-%%SERIAL%%man/man8/bcmxcp.8.gz
-%%SERIAL%%man/man8/belkin.8.gz
-%%SERIAL%%man/man8/belkinunv.8.gz
-%%SERIAL%%man/man8/bestuferrups.8.gz
-%%SERIAL%%man/man8/bestups.8.gz
-%%SERIAL%%man/man8/bestfcom.8.gz
-%%SERIAL%%man/man8/clone.8.gz
-%%SERIAL%%man/man8/dummy-ups.8.gz
-%%SERIAL%%man/man8/etapro.8.gz
-%%SERIAL%%man/man8/everups.8.gz
-%%SERIAL%%man/man8/gamatronic.8.gz
-%%SERIAL%%man/man8/genericups.8.gz
-%%SERIAL%%man/man8/isbmex.8.gz
-%%SERIAL%%man/man8/ivtscd.8.gz
-%%SERIAL%%man/man8/liebert.8.gz
-%%SERIAL%%man/man8/liebert-esp2.8.gz
-%%SERIAL%%man/man8/masterguard.8.gz
-%%SERIAL%%man/man8/metasys.8.gz
-%%SERIAL%%man/man8/mge-shut.8.gz
-%%SERIAL%%man/man8/mge-utalk.8.gz
-%%SERIAL%%man/man8/microdowell.8.gz
-%%SERIAL%%man/man8/microsol-apc.8.gz
-%%SERIAL%%man/man8/oneac.8.gz
-%%SERIAL%%man/man8/optiups.8.gz
-%%SERIAL%%man/man8/powercom.8.gz
-%%SERIAL%%man/man8/powerpanel.8.gz
-%%SERIAL%%man/man8/rhino.8.gz
-%%SERIAL%%man/man8/safenet.8.gz
-%%SERIAL%%man/man8/solis.8.gz
-%%SERIAL%%man/man8/tripplite.8.gz
-%%SERIAL%%man/man8/tripplitesu.8.gz
-%%SERIAL%%man/man8/upscode2.8.gz
-%%SERIAL%%man/man8/victronups.8.gz
-%%USB%%man/man8/bcmxcp_usb.8.gz
-%%USB%%man/man8/richcomm_usb.8.gz
-%%USB%%man/man8/tripplite_usb.8.gz
-%%USB%%man/man8/usbhid-ups.8.gz
-%%SNMP%%man/man8/snmp-ups.8.gz
-%%IPMIPSU%%man/man8/nut-ipmipsu.8.gz
-%%PDU%%man/man8/powerman-pdu.8.gz
+%%MANPAGES%%man/man3/libnutclient.3.gz
+%%MANPAGES%%man/man3/libnutclient_commands.3.gz
+%%MANPAGES%%man/man3/libnutclient_devices.3.gz
+%%MANPAGES%%man/man3/libnutclient_general.3.gz
+%%MANPAGES%%man/man3/libnutclient_misc.3.gz
+%%MANPAGES%%man/man3/libnutclient_tcp.3.gz
+%%MANPAGES%%man/man3/libnutclient_variables.3.gz
+%%MANPAGES%%man/man3/nutclient_authenticate.3.gz
+%%MANPAGES%%man/man3/nutclient_destroy.3.gz
+%%MANPAGES%%man/man3/nutclient_device_forced_shutdown.3.gz
+%%MANPAGES%%man/man3/nutclient_device_login.3.gz
+%%MANPAGES%%man/man3/nutclient_device_master.3.gz
+%%MANPAGES%%man/man3/nutclient_execute_device_command.3.gz
+%%MANPAGES%%man/man3/nutclient_get_device_command_description.3.gz
+%%MANPAGES%%man/man3/nutclient_get_device_commands.3.gz
+%%MANPAGES%%man/man3/nutclient_get_device_description.3.gz
+%%MANPAGES%%man/man3/nutclient_get_device_num_logins.3.gz
+%%MANPAGES%%man/man3/nutclient_get_device_rw_variables.3.gz
+%%MANPAGES%%man/man3/nutclient_get_device_variable_description.3.gz
+%%MANPAGES%%man/man3/nutclient_get_device_variable_values.3.gz
+%%MANPAGES%%man/man3/nutclient_get_device_variables.3.gz
+%%MANPAGES%%man/man3/nutclient_get_devices.3.gz
+%%MANPAGES%%man/man3/nutclient_has_device.3.gz
+%%MANPAGES%%man/man3/nutclient_has_device_command.3.gz
+%%MANPAGES%%man/man3/nutclient_has_device_variable.3.gz
+%%MANPAGES%%man/man3/nutclient_logout.3.gz
+%%MANPAGES%%man/man3/nutclient_set_device_variable_value.3.gz
+%%MANPAGES%%man/man3/nutclient_set_device_variable_values.3.gz
+%%MANPAGES%%man/man3/nutclient_tcp_create_client.3.gz
+%%MANPAGES%%man/man3/nutclient_tcp_disconnect.3.gz
+%%MANPAGES%%man/man3/nutclient_tcp_get_timeout.3.gz
+%%MANPAGES%%man/man3/nutclient_tcp_is_connected.3.gz
+%%MANPAGES%%man/man3/nutclient_tcp_reconnect.3.gz
+%%MANPAGES%%man/man3/nutclient_tcp_set_timeout.3.gz
+%%MANPAGES%%man/man3/nutscan.3.gz
+%%MANPAGES%%man/man3/nutscan_add_device_to_device.3.gz
+%%MANPAGES%%man/man3/nutscan_add_option_to_device.3.gz
+%%MANPAGES%%man/man3/nutscan_cidr_to_ip.3.gz
+%%MANPAGES%%man/man3/nutscan_display_parsable.3.gz
+%%MANPAGES%%man/man3/nutscan_display_ups_conf.3.gz
+%%MANPAGES%%man/man3/nutscan_free_device.3.gz
+%%MANPAGES%%man/man3/nutscan_get_serial_ports_list.3.gz
+%%MANPAGES%%man/man3/nutscan_init.3.gz
+%%MANPAGES%%man/man3/nutscan_new_device.3.gz
+%%MANPAGES%%man/man3/nutscan_scan_avahi.3.gz
+%%MANPAGES%%man/man3/nutscan_scan_eaton_serial.3.gz
+%%MANPAGES%%man/man3/nutscan_scan_ipmi.3.gz
+%%MANPAGES%%man/man3/nutscan_scan_nut.3.gz
+%%MANPAGES%%man/man3/nutscan_scan_snmp.3.gz
+%%MANPAGES%%man/man3/nutscan_scan_usb.3.gz
+%%MANPAGES%%man/man3/nutscan_scan_xml_http_range.3.gz
+%%MANPAGES%%man/man3/upscli_add_host_cert.3.gz
+%%MANPAGES%%man/man3/upscli_cleanup.3.gz
+%%MANPAGES%%man/man3/upscli_connect.3.gz
+%%MANPAGES%%man/man3/upscli_disconnect.3.gz
+%%MANPAGES%%man/man3/upscli_fd.3.gz
+%%MANPAGES%%man/man3/upscli_get.3.gz
+%%MANPAGES%%man/man3/upscli_init.3.gz
+%%MANPAGES%%man/man3/upscli_list_next.3.gz
+%%MANPAGES%%man/man3/upscli_list_start.3.gz
+%%MANPAGES%%man/man3/upscli_readline.3.gz
+%%MANPAGES%%man/man3/upscli_readline_timeout.3.gz
+%%MANPAGES%%man/man3/upscli_sendline.3.gz
+%%MANPAGES%%man/man3/upscli_sendline_timeout.3.gz
+%%MANPAGES%%man/man3/upscli_splitaddr.3.gz
+%%MANPAGES%%man/man3/upscli_splitname.3.gz
+%%MANPAGES%%man/man3/upscli_ssl.3.gz
+%%MANPAGES%%man/man3/upscli_strerror.3.gz
+%%MANPAGES%%man/man3/upscli_upserror.3.gz
+%%MANPAGES%%man/man3/upsclient.3.gz
+%%MANPAGES%%man/man5/nut.conf.5.gz
+%%MANPAGES%%man/man5/ups.conf.5.gz
+%%MANPAGES%%man/man5/upsd.conf.5.gz
+%%MANPAGES%%man/man5/upsd.users.5.gz
+%%MANPAGES%%man/man5/upsmon.conf.5.gz
+%%MANPAGES%%man/man5/upssched.conf.5.gz
+%%MANPAGES%%%%SERIAL%%man/man8/al175.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/apcupsd-ups.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/blazer_ser.8.gz
+%%MANPAGES%%%%USB%%man/man8/blazer_usb.8.gz
+%%MANPAGES%%%%NEON%%man/man8/netxml-ups.8.gz
+%%MANPAGES%%man/man8/nut-driver-enumerator.8.gz
+%%MANPAGES%%man/man8/nut-recorder.8.gz
+%%MANPAGES%%man/man8/nut-scanner.8.gz
+%%MANPAGES%%%%USB%%man/man8/nutdrv_atcl_usb.8.gz
+%%MANPAGES%%%%USB%%man/man8/nutdrv_qx.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/nutdrv_siemens_sitop.8.gz
+%%MANPAGES%%man/man8/nutupsdrv.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/riello_ser.8.gz
+%%MANPAGES%%%%USB%%man/man8/riello_usb.8.gz
+%%MANPAGES%%man/man8/upsc.8.gz
+%%MANPAGES%%man/man8/upscmd.8.gz
+%%MANPAGES%%man/man8/upsd.8.gz
+%%MANPAGES%%man/man8/upsdrvctl.8.gz
+%%MANPAGES%%man/man8/upsdrvsvcctl.8.gz
+%%MANPAGES%%man/man8/upslog.8.gz
+%%MANPAGES%%man/man8/upsmon.8.gz
+%%MANPAGES%%man/man8/upsrw.8.gz
+%%MANPAGES%%man/man8/upssched.8.gz
+%%MANPAGES%%%%CGI%%man/man5/hosts.conf.5.gz
+%%MANPAGES%%%%CGI%%man/man5/upsset.conf.5.gz
+%%MANPAGES%%%%CGI%%man/man5/upsstats.html.5.gz
+%%MANPAGES%%%%CGI%%man/man8/upsset.cgi.8.gz
+%%MANPAGES%%%%CGI%%man/man8/upsstats.cgi.8.gz
+%%MANPAGES%%%%CGI%%man/man8/upsimage.cgi.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/apcsmart.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/apcsmart-old.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/bestfortress.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/bcmxcp.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/belkin.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/belkinunv.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/bestuferrups.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/bestups.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/bestfcom.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/clone.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/dummy-ups.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/etapro.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/everups.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/gamatronic.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/genericups.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/isbmex.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/ivtscd.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/liebert.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/liebert-esp2.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/masterguard.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/metasys.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/mge-shut.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/mge-utalk.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/microdowell.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/microsol-apc.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/oneac.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/optiups.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/powercom.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/powerpanel.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/rhino.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/safenet.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/solis.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/tripplite.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/tripplitesu.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/upscode2.8.gz
+%%MANPAGES%%%%SERIAL%%man/man8/victronups.8.gz
+%%MANPAGES%%%%USB%%man/man8/bcmxcp_usb.8.gz
+%%MANPAGES%%%%USB%%man/man8/richcomm_usb.8.gz
+%%MANPAGES%%%%USB%%man/man8/tripplite_usb.8.gz
+%%MANPAGES%%%%USB%%man/man8/usbhid-ups.8.gz
+%%MANPAGES%%%%SNMP%%man/man8/snmp-ups.8.gz
+%%MANPAGES%%%%IPMIPSU%%man/man8/nut-ipmipsu.8.gz
+%%MANPAGES%%%%PDU%%man/man8/powerman-pdu.8.gz
 sbin/upsd
 sbin/upsdrvctl
 sbin/upsmon