13.05.2013 20:20, Peter Mueller пишет:
>
> I like to use the modbus plugin. But it is not listed in the config options.
> How can I enable this plugin to compile it.
I've just added comms/libmodbus upon your request.
And here is attached (an untested) patch to net-mgmt/collectd.
Test and feedback are welcome.
Thanks!
--
WBR, Boris Samorodov (bsam)
FreeBSD Committer, http://www.FreeBSD.org The Power To Serve
Index: Makefile
===================================================================
--- Makefile (revision 317544)
+++ Makefile (working copy)
@@ -19,8 +19,9 @@
OPTIONS_GROUP= INPUT OUTPUT
OPTIONS_GROUP_OUTPUT= RRDTOOL RRDCACHED WRITE_HTTP
OPTIONS_GROUP_INPUT= APACHE APCUPS CURL CURL_JSON CURL_XML DBI DISK \
- NUTUPS INTERFACE MBMON MEMCACHED MYSQL NGINX OPENVPN \
- PDNS PGSQL PING PYTHON ROUTEROS SNMP TOKYOTYRANT XMMS
+ NUTUPS INTERFACE MBMON MEMCACHED MODBUS MYSQL NGINX \
+ OPENVPN PDNS PGSQL PING PYTHON ROUTEROS SNMP \
+ TOKYOTYRANT XMMS
OPTIONS_DEFAULT= BIND INTERFACE PING SNMP RRDTOOL RRDCACHED
CGI_DESC= Install collection.cgi (requires RRDTOOL)
@@ -40,6 +41,7 @@
INTERFACE_DESC= Network interfaces (libstatgrab)
MBMON_DESC= MBMon
MEMCACHED_DESC= Memcached
+MODBUS_DESC= modbus support via libmodbus
MYSQL_DESC= MySQL
NGINX_DESC= Nginx
OPENVPN_DESC= OpenVPN statistics
@@ -100,7 +102,6 @@
--disable-match_timediff \
--disable-match_value \
--disable-memcachec \
- --disable-modbus \
--disable-multimeter \
--disable-netapp \
--disable-netlink \
@@ -276,6 +277,15 @@
PLIST_SUB+= MEMCACHED="@comment "
.endif
+.if ${PORT_OPTIONS:MMODBUS}
+CONFIGURE_ARGS+=--enable-modbus
+LIB_DEPENDS+= modbus:${PORTSDIR}/comms/libmodbus
+PLIST_SUB+= MODBUS=""
+.else
+CONFIGURE_ARGS+=--disable-modbus
+PLIST_SUB+= MODBUS="@comment "
+.endif
+
.if ${PORT_OPTIONS:MMYSQL}
USE_MYSQL= yes
CONFIGURE_ARGS+=--enable-mysql
@@ -362,7 +372,7 @@
CONFIGURE_ARGS+=--enable-rrdcached
PLIST_SUB+= RRDCACHED=""
.else
-CONFIGURE_ARGS+=--disable--rrdcached
+CONFIGURE_ARGS+=--disable-rrdcached
PLIST_SUB+= RRDCACHED="@comment "
.endif
Index: pkg-plist
===================================================================
--- pkg-plist (revision 317544)
+++ pkg-plist (working copy)
@@ -49,6 +49,8 @@
lib/collectd/load.so
lib/collectd/logfile.la
lib/collectd/logfile.so
+%%MODBUS%%lib/collectd/modbus.la
+%%MODBUS%%lib/collectd/modbus.so
%%MBMON%%lib/collectd/mbmon.la
%%MBMON%%lib/collectd/mbmon.so
%%MEMCACHED%%lib/collectd/memcached.la
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "[email protected]"