2 # Copyright (C) 2006-2016 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=http
://www.networkupstools.org
/source
/2.7/
16 PKG_HASH
:=980e82918c52d364605c0703a5dcf01f74ad2ef06e3d365949e43b7d406d25a7
17 PKG_LICENSE
:=GPL-2.0
-or-later GPL-3.0
-or-later GPL-1.0
-or-later Artistic-1.0
-Perl
18 PKG_LICENSE_FILES
:=LICENSE-GPL2 LICENSE-GPL3 COPYING
23 PKG_CONFIG_DEPENDS
:= \
24 CONFIG_NUT_DRIVER_SNMP \
25 CONFIG_NUT_DRIVER_USB \
26 CONFIG_NUT_DRIVER_SERIAL \
27 CONFIG_NUT_DRIVER_NEON \
29 CONFIG_PACKAGE_nut-web-cgi
31 include $(INCLUDE_DIR
)/package.mk
33 define Package
/nut
/Default
36 URL
:=http
://www.networkupstools.org
/
37 TITLE
:=Network UPS Tools
(NUT
)
40 define Package
/nut
/description
/Default
41 Network UPS Tools
(NUT
) is a client
/server monitoring system that
42 allows computers to share uninterruptible power supply
(UPS
) and
43 power distribution unit
(PDU
) hardware. Clients access the hardware
44 through the server
, and are notified whenever the power status
49 $(call Package
/nut
/Default
)
53 define Package
/nut
/description
54 $(call Package
/nut
/description
/Default
)
57 define Package
/nut
/config
58 source
"$(SOURCE)/Config.in"
61 define Package
/nut
/install
65 define Package
/nut-server
/install
67 $(INSTALL_DIR
) $(1)/etc
/nut
68 $(INSTALL_DIR
) $(1)/usr
/sbin
69 $(INSTALL_DIR
) $(1)/etc
/init.d
70 $(INSTALL_DIR
) $(1)/usr
/share
/nut
71 $(INSTALL_BIN
) .
/files
/nut-server.init
$(1)/etc
/init.d
/nut-server
72 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/upsd
$(1)/usr
/sbin
73 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/share
/nut
/cmdvartab
$(1)/usr
/share
/nut
/
74 $(INSTALL_DIR
) $(1)/etc
/config
75 $(INSTALL_CONF
) .
/files
/nut_server
$(1)/etc
/config
/nut_server
76 ln
-sf ..
/..
/var
/etc
/nut
/upsd.users
$(1)/etc
/nut
/upsd.users
77 ln
-sf ..
/..
/var
/etc
/nut
/upsd.conf
$(1)/etc
/nut
/upsd.conf
78 # Driver common portion
79 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/upsdrvctl
$(1)/usr
/sbin
80 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/share
/nut
/driver.list
$(1)/usr
/share
/nut
/
81 ln
-sf ..
/..
/var
/etc
/nut
/ups.conf
$(1)/etc
/nut
/ups.conf
82 # Mangle libhid.usermap into a format (hotplug shell script) useful for OpenWrt
83 $(INSTALL_DIR
) $(1)/etc
/hotplug.d
/usb
84 $(INSTALL_DIR
) $(1)/etc
/hotplug.d
/tty
85 $(INSTALL_BIN
) .
/files
/nut_serial.hotplug
$(1)/etc
/hotplug.d
/tty
/40-nut_serial
86 $(INSTALL_BIN
) .
/files
/30-libhid-ups.head
$(1)/etc
/hotplug.d
/usb
/30-libhid-ups
87 $(CP
) $(PKG_INSTALL_DIR
)/etc
/hotplug
/usb
/libhid.usermap
$(PKG_BUILD_DIR
)/30-libhid-ups.middle
90 -E
-e
's:^[^ ][^ ]* *0x0003 *0x0{0,3}([^ ][^ ]*) *0x0{0,3}*([^ ][^ ]*).*:\1/\2/* | \\:' \
91 $(PKG_BUILD_DIR
)/30-libhid-ups.middle
92 tail
-n
+2 $(PKG_BUILD_DIR
)/30-libhid-ups.middle
>>$(1)/etc
/hotplug.d
/usb
/30-libhid-ups
93 cat .
/files
/30-libhid-ups.tail
>>$(1)/etc
/hotplug.d
/usb
/30-libhid-ups
96 define Package
/nut-common
97 $(call Package
/nut
/Default
)
100 +NUT_DRIVER_SNMP
:libnetsnmp \
101 +NUT_DRIVER_USB
:libusb-compat \
102 +NUT_DRIVER_NEON
:libneon \
106 define Package
/nut-common
/description
107 $(call Package
/nut
/description
/Default
)
108 This package contains the common files.
111 define Package
/nut-common
/conffiles
115 define Package
/nut-common
/install
116 $(INSTALL_DIR
) $(1)/etc
/nut
117 $(INSTALL_DIR
) $(1)/usr
/lib
118 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libupsclient.so
* $(1)/usr
/lib
/
119 ln
-sf
/var
/etc
/nut
/nut.conf
$(1)/etc
/nut
/nut.conf
122 define Package
/nut-server
123 $(call Package
/nut
/Default
)
125 DEPENDS
:=nut
+nut-common
126 USERID
:=nut
=113:nut
=113
129 define Package
/nut-server
/description
130 $(call Package
/nut
/description
/Default
)
131 upsd is responsible for serving the data from the drivers to the
132 clients. It connects to each driver and maintains a local cache of the
133 current state. Queries from the clients are served from this cache
, so
134 delays are minimal. This program is essential
, and must be running at
135 all times to actually make any use out of the drivers and clients.
138 define Package
/nut-server
/conffiles
139 /etc
/config
/nut_server
145 define Package
/nut-upsmon
146 $(call Package
/nut
/Default
)
148 DEPENDS
:=nut
+nut-common
149 USERID
:=nutmon
=114:nutmon
=114
152 define Package
/nut-upsmon
/description
153 $(call Package
/nut
/description
/Default
)
154 upsmon is the client process that is responsible for the most important
155 part of UPS monitoring--shutting down the system when the power goes
156 out. It can call out to other helper programs for notification purposes
157 during power events. upsmon can monitor multiple systems using a single
158 process. Every UPS that is defined in the upsmon.conf configuration file
159 is assigned a power value and a type
(slave or master
).
162 define Package
/nut-upsmon
/conffiles
163 /etc
/config
/nut_monitor
167 define Package
/nut-upsmon
/install
168 $(INSTALL_DIR
) $(1)/etc
/nut
169 $(INSTALL_DIR
) $(1)/usr
/sbin
170 $(INSTALL_DIR
) $(1)/etc
/init.d
171 $(INSTALL_BIN
) .
/files
/nut-monitor.init
$(1)/etc
/init.d
/nut-monitor
172 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/upsmon
$(1)/usr
/sbin
/
173 $(INSTALL_BIN
) .
/files
/nutshutdown
$(1)/usr
/sbin
/nutshutdown
174 $(INSTALL_DIR
) $(1)/etc
/config
175 $(INSTALL_CONF
) .
/files
/nut_monitor
$(1)/etc
/config
/nut_monitor
176 ln
-sf
/var
/etc
/nut
/upsmon.conf
$(1)/etc
/nut
/upsmon.conf
179 define Package
/nut-upsmon-sendmail-notify
180 $(call Package
/nut
/Default
)
181 TITLE
+= (upsmon with notifications via sendmail
)
182 DEPENDS
:=nut
+nut-upsmon
183 CONFLICTS
:=nut-upssched
186 define Package
/nut-upsmon-sendmail-notify
/description
187 $(call Package
/nut
/description
/Default
)
188 upsmon with default notification via sendmail
191 define Package
/nut-upsmon-sendmail-notify
/install
192 $(INSTALL_DIR
) $(1)/usr
/bin
$(1)/etc
/uci-defaults
193 $(INSTALL_BIN
) .
/files
/nut-sendmail-notify
$(1)/usr
/bin
/
194 $(INSTALL_DATA
) .
/files
/nut-sendmail-notify.default
$(1)/etc
/uci-defaults
/nut-sendmail-notify
197 define Package
/nut-upsc
198 $(call Package
/nut
/Default
)
199 TITLE
+= (upsc command
)
200 DEPENDS
:=nut
+nut-common
203 define Package
/nut-upsc
/description
204 $(call Package
/nut
/description
/Default
)
205 upsc is provided
as a quick way to poll the status of a UPS server. It
206 can be used inside
shell scripts and other programs that need UPS data
207 but do not want to
include the full interface.
210 define Package
/nut-upsc
/install
211 $(INSTALL_DIR
) $(1)/usr
/bin
212 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/upsc
$(1)/usr
/bin
215 define Package
/nut-upslog
216 $(call Package
/nut
/Default
)
217 TITLE
+= (logging client
)
218 DEPENDS
:=nut
+nut-common
221 define Package
/nut-upslog
/description
222 $(call Package
/nut
/description
/Default
)
223 upslog is a daemon that will poll a UPS at periodic intervals
, fetch the
224 variables that interest you
, format them
, and write them to a file.
227 define Package
/nut-upslog
/install
228 $(INSTALL_DIR
) $(1)/usr
/bin
229 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/upslog
$(1)/usr
/bin
/
232 define Package
/nut-upscmd
233 $(call Package
/nut
/Default
)
235 DEPENDS
:=nut
+nut-common
238 define Package
/nut-upscmd
/description
239 $(call Package
/nut
/description
/Default
)
240 upscmd allows you to invoke
"instant commands" in your UPS hardware. Not
241 all hardware supports this
, so
check the list with
-l to see if anything
242 will work on your equipment. On hardware that supports it
, you can use
243 this program to start and stop battery tests
, invoke a front panel
test
244 (beep
!), turn the load on or off
, and more.
247 define Package
/nut-upscmd
/install
248 $(INSTALL_DIR
) $(1)/usr
/bin
249 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/upscmd
$(1)/usr
/bin
/
252 define Package
/nut-upsrw
253 $(call Package
/nut
/Default
)
254 TITLE
+= (variable editor
)
255 DEPENDS
:=nut
+nut-common
258 define Package
/nut-upsrw
/description
259 $(call Package
/nut
/description
/Default
)
260 upsrw allows you to view and change the read
/write variables inside your
261 UPS. It sends commands via the upsd to your driver
, which configures the
262 hardware for you. The list of variables that allow you to change their
263 values is based on the capabilities of your UPS equipment. Not
all
264 models support this feature. Typically
, cheaper hardware does not
268 define Package
/nut-upsrw
/install
269 $(INSTALL_DIR
) $(1)/usr
/bin
270 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/upsrw
$(1)/usr
/bin
/
273 define Package
/nut-upssched
274 $(call Package
/nut
/Default
)
275 TITLE
+= (helper for triggering events from upsmon
)
276 DEPENDS
:=nut
+nut-common
+nut-upsmon
279 define Package
/nut-upssched
/description
280 $(call Package
/nut
/description
/Default
)
281 upssched was created to allow users to execute programs at times relative
282 to events being monitored by upsmon. The original purpose was to allow
283 for a shutdown to occur after some fixed period on battery
, but there are
284 other uses that are possible.
285 You can alternatively write your own script and save some space.
288 define Package
/nut-upssched
/conffiles
289 /etc
/nut
/upssched.conf
292 define Package
/nut-upssched
/install
293 $(INSTALL_DIR
) $(1)/usr
/bin
294 $(INSTALL_DIR
) $(1)/usr
/sbin
295 $(INSTALL_DIR
) $(1)/etc
/nut
296 $(INSTALL_DIR
) $(1)/etc
/uci-defaults
297 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/upssched-cmd
$(1)/usr
/bin
/
298 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/upssched
$(1)/usr
/sbin
/
299 $(INSTALL_CONF
) $(PKG_INSTALL_DIR
)/etc
/nut
/upssched.conf.sample
$(1)/etc
/nut
/upssched.conf
300 $(INSTALL_DATA
) .
/files
/nut-sched.default
$(1)/etc
/uci-defaults
/nut-upssched
303 define Package
/nut-web-cgi
304 $(call Package
/nut
/Default
)
305 TITLE
+= Web CGI interface
306 DEPENDS
:=nut
+nut-common
+PACKAGE_nut-web-cgi
:libgd
309 define Package
/nut-web-cgi
/description
310 The CGI programs are clients that run through your web server.
311 They allow you to see UPS status and perform certain administrative
312 commands from any web browser. Javascript and cookies are not required.
315 define Package
/nut-web-cgi
/conffiles
318 /etc
/nut
/upsstats.html
319 /etc
/nut
/upsstats-single.html
324 define Package
/nut-web-cgi
/install
325 $(INSTALL_DIR
) $(1)/www
/cgi-bin
/nut
$(1)/www
/nut
326 $(INSTALL_DIR
) $(1)/etc
/nut
327 $(CP
) $(PKG_INSTALL_DIR
)/usr
/html
/* $(1)/www
/nut
/
328 $(INSTALL_DIR
) $(1)/etc
/uci-defaults
329 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/cgi-bin
/* $(1)/www
/cgi-bin
/nut
330 $(INSTALL_CONF
) .
/files
/add_nut_httpd_conf
$(1)/etc
/uci-defaults
/add_nut_httpd_conf
331 $(INSTALL_CONF
) $(PKG_INSTALL_DIR
)/etc
/nut
/upsstats.html.sample
$(1)/etc
/nut
/upsstats.html
332 $(INSTALL_CONF
) $(PKG_INSTALL_DIR
)/etc
/nut
/upsstats-single.html.sample
$(1)/etc
/nut
/upsstats-single.html
333 $(INSTALL_CONF
) $(PKG_INSTALL_DIR
)/etc
/nut
/upsset.conf.sample
$(1)/etc
/nut
/upsset.conf.disable
334 $(INSTALL_CONF
) $(PKG_INSTALL_DIR
)/etc
/nut
/upsset.conf.sample
$(1)/etc
/nut
/upsset.conf.enable
335 $(SED
) 's/### \?//' $(1)/etc
/nut
/upsset.conf.enable
336 $(INSTALL_DIR
) $(1)/etc
/config
337 $(INSTALL_CONF
) .
/files
/nut_cgi
$(1)/etc
/config
/nut_cgi
338 $(INSTALL_DIR
) $(1)/etc
/init.d
339 $(INSTALL_BIN
) .
/files
/nut-cgi.init
$(1)/etc
/init.d
/nut-cgi
340 ln
-sf
/var
/etc
/nut
/hosts.conf
$(1)/etc
/nut
/hosts.conf
341 ln
-sf
/var
/etc
/nut
/upsset.conf
$(1)/etc
/nut
/upsset.conf
344 define Package
/nut-avahi-service
345 $(call Package
/nut
/Default
)
346 TITLE
+= (Avahi service
)
347 DEPENDS
:=nut
+avahi-daemon
350 define Package
/nut-avahi-service
/description
351 This package contains the service definition for announcing the
352 attached UPS via mDNS
/DNS-SD.
355 define Package
/nut-avahi-service
/conffiles
356 /etc
/avahi
/services
/nut.service
359 define Package
/nut-avahi-service
/install
360 $(INSTALL_DIR
) $(1)/etc
/avahi
/services
361 $(INSTALL_CONF
) .
/files
/nut.service
$(1)/etc
/avahi
/services
/
364 # Dealing with all of the drivers is very repetitive, but the previous
365 # maintainer had a neat solution which just needed some tweaking.
367 define Package
/nut-driver-
$(2)
368 $(call Package
/nut
/Default
)
369 TITLE
:=$(2) (NUT
$(1) driver
)
370 DEPENDS
:=nut
+nut-server
371 $(if
$(filter $(1),snmp
),DEPENDS
+= @NUT_DRIVER_SNMP
)
372 $(if
$(filter $(1),usb
),DEPENDS
+= @NUT_DRIVER_USB
)
373 $(if
$(filter $(1),serial
),DEPENDS
+= @NUT_DRIVER_SERIAL
)
374 $(if
$(filter $(1),neon
),DEPENDS
+= @NUT_DRIVER_NEON
)
376 # Deliberately empty description in order to trigger a build failure.
377 # It should be overridden by the list below, and when updating to a
378 # new version of nut we will need to provide descriptions for any new
380 define Package
/nut-driver-
$(2)/description
383 define Package
/nut-driver-
$(2)/install
384 $(INSTALL_DIR
) $$(1)/lib
/nut
385 $(CP
) $$(PKG_INSTALL_DIR
)/lib
/nut
/$(2) $$(1)/lib
/nut
/
386 $(if
$(filter $(2),clone
),$(CP
) $$(PKG_INSTALL_DIR
)/lib
/nut
/$(2)-outlet
$$(1)/lib
/nut
/)
389 define DriverDescription
390 define Package
/nut-driver-
$(2)/description
394 # These lists are lifted *directly* from drivers/Makefile.am in the nut
395 # source tree. This it to make it simpler to keep in sync when updating
396 # to a newer version of nut. Do not edit this manually.
398 # DO NOT EDIT (except to update with a fresh cut/paste)!
399 SERIAL_DRIVERLIST
= al175 bcmxcp belkin belkinunv bestfcom \
400 bestfortress bestuferrups bestups dummy-ups etapro everups \
401 gamatronic genericups isbmex liebert liebert-esp2 masterguard metasys \
402 oldmge-shut mge-utalk microdowell mge-shut oneac optiups powercom rhino \
403 safenet skel solis tripplite tripplitesu upscode2 victronups powerpanel \
404 blazer_ser clone clone-outlet ivtscd apcsmart apcsmart-old apcupsd-ups riello_ser \
406 SNMP_DRIVERLIST
= snmp-ups
407 USB_LIBUSB_DRIVERLIST
= usbhid-ups bcmxcp_usb tripplite_usb \
408 blazer_usb richcomm_usb riello_usb \
411 NEONXML_DRIVERLIST
= netxml-ups
413 SERIAL_DRIVERLIST_IGNORE
:=skel clone-outlet nutdrv_qx
414 # nutdrv_qx can be either USB or serial. Given most routers have USB
415 # instead of serial ports, and not wanting two identical packages with
416 # different names that conflict with each other, only the option for the
417 # driver with USB bindings is provided. If you really want to save that
418 # tiny bit of space and build it without USB support, remove nutdrv_qx
419 # from the previous line.
421 $(foreach d
,$(filter-out $(SERIAL_DRIVERLIST_IGNORE
),$(SERIAL_DRIVERLIST
)),$(eval
$(call DriverPackage
,serial
,$(d
))))
422 $(foreach d
,$(SNMP_DRIVERLIST
),$(eval
$(call DriverPackage
,snmp
,$(d
))))
423 $(foreach d
,$(USB_LIBUSB_DRIVERLIST
),$(eval
$(call DriverPackage
,usb
,$(d
))))
424 $(foreach d
,$(NEONXML_DRIVERLIST
),$(eval
$(call DriverPackage
,neon
,$(d
))))
426 $(eval
$(call DriverDescription
,serial
,al175
,\
427 Driver for Eltek UPS models with AL175 alarm module
))
428 $(eval
$(call DriverDescription
,serial
,bcmxcp
,\
429 Driver for UPSes supporting the serial BCM
/XCP protocol
))
430 $(eval
$(call DriverDescription
,serial
,belkin
,\
431 Driver for Belkin serial UPS equipment
))
432 $(eval
$(call DriverDescription
,serial
,belkinunv
,\
433 Driver for Belkin
"Universal UPS" and compatible
))
434 $(eval
$(call DriverDescription
,serial
,bestfcom
,\
435 Driver for Best Power Fortress
/Ferrups
))
436 $(eval
$(call DriverDescription
,serial
,bestfortress
,\
437 Driver for old Best Fortress UPS equipment
))
438 $(eval
$(call DriverDescription
,serial
,bestuferrups
,\
439 Driver for Best Power Micro-Ferrups
))
440 $(eval
$(call DriverDescription
,serial
,bestups
,\
441 Driver for Best Power
/ SOLA
(Phoenixtec protocol
) UPS equipment
))
442 $(eval
$(call DriverDescription
,serial
,dummy-ups
,\
443 Driver for multi-purpose UPS emulation
))
444 $(eval
$(call DriverDescription
,serial
,etapro
,\
445 Driver for ETA UPS equipment
))
446 $(eval
$(call DriverDescription
,serial
,everups
,\
447 Driver for Ever UPS models
))
448 $(eval
$(call DriverDescription
,serial
,gamatronic
,\
449 Driver for Gamatronic UPS equipment
))
450 $(eval
$(call DriverDescription
,serial
,genericups
,\
451 Driver for contact-closure UPS equipment
))
452 $(eval
$(call DriverDescription
,serial
,isbmex
,\
453 Driver for ISBMEX UPS equipment
))
454 $(eval
$(call DriverDescription
,serial
,liebert
,\
455 Driver for Liebert contact-closure UPS equipment
))
456 $(eval
$(call DriverDescription
,serial
,liebert-esp2
,\
457 Driver for Liebert UPS
, using the ESP-II serial protocol
))
458 $(eval
$(call DriverDescription
,serial
,masterguard
,\
459 Driver for Masterguard UPS equipment
))
460 $(eval
$(call DriverDescription
,serial
,metasys
,\
461 Driver for Meta System UPS equipment
))
462 $(eval
$(call DriverDescription
,serial
,oldmge-shut
,\
463 Driver for SHUT Protocol UPS equipment
, deprecated
, use mge-shut
))
464 $(eval
$(call DriverDescription
,serial
,mge-utalk
,\
465 Driver for MGE UPS SYSTEMS UTalk protocol equipment
))
466 $(eval
$(call DriverDescription
,serial
,microdowell
,\
467 Driver for Microdowell Enterprise UPS series
))
468 $(eval
$(call DriverDescription
,serial
,mge-shut
,\
469 Driver for SHUT Protocol UPS equipment
))
470 $(eval
$(call DriverDescription
,serial
,oneac
,\
471 Driver for Oneac UPS equipment
))
472 $(eval
$(call DriverDescription
,serial
,optiups
,\
473 Driver for Opti-UPS
(Viewsonic
) UPS and Zinto D
(ONLINE-USV
) equipment
))
474 $(eval
$(call DriverDescription
,serial
,powercom
,\
475 Driver for serial Powercom
/Trust
/Advice UPS equipment
))
476 $(eval
$(call DriverDescription
,serial
,rhino
,\
477 Driver for Brazilian Microsol RHINO UPS equipment
))
478 $(eval
$(call DriverDescription
,serial
,safenet
,\
479 Driver for SafeNet compatible UPS equipment
))
480 $(eval
$(call DriverDescription
,serial
,solis
,\
481 Driver for Brazilian Microsol SOLIS UPS equipment
))
482 $(eval
$(call DriverDescription
,serial
,tripplite
,\
483 Driver for Tripp-Lite SmartPro UPS equipment
))
484 $(eval
$(call DriverDescription
,serial
,tripplitesu
,\
485 Driver for Tripp-Lite SmartOnline
(SU
) UPS equipment
))
486 $(eval
$(call DriverDescription
,serial
,upscode2
,\
487 Driver for UPScode II compatible UPS equipment
))
488 $(eval
$(call DriverDescription
,serial
,victronups
,\
489 Driver for IMV
/Victron UPS unit Match
, Match Lite
, NetUps
))
490 $(eval
$(call DriverDescription
,serial
,powerpanel
,\
491 Driver for PowerPanel Plus compatible UPS equipment
))
492 $(eval
$(call DriverDescription
,serial
,blazer_ser
,\
493 Driver for Megatec
/Q1 protocol serial based UPS equipment
))
494 $(eval
$(call DriverDescription
,serial
,clone
,\
496 $(eval
$(call DriverDescription
,serial
,ivtscd
,\
497 Driver for the IVT Solar Controller Device
))
498 $(eval
$(call DriverDescription
,serial
,apcsmart
,\
499 Driver for American Power Conversion Smart Protocol UPS equipment
))
500 $(eval
$(call DriverDescription
,serial
,apcsmart-old
,\
501 Driver for American Power Conversion Smart Protocol UPS equipment
))
502 $(eval
$(call DriverDescription
,serial
,apcupsd-ups
,\
503 Driver for apcupsd client access
))
504 $(eval
$(call DriverDescription
,serial
,riello_ser
,\
505 Driver for Riello UPS Protocol UPS equipment
))
506 $(eval
$(call DriverDescription
,snmp
,snmp-ups
,\
507 Multi-MIB Driver for SNMP UPS equipment
))
508 $(eval
$(call DriverDescription
,usb
,usbhid-ups
,\
509 Driver for USB
/HID UPS equipment
))
510 $(eval
$(call DriverDescription
,usb
,bcmxcp_usb
,\
511 Experimental driver for UPSes supporting the BCM
/XCP protocol over USB
))
512 $(eval
$(call DriverDescription
,usb
,tripplite_usb
,\
513 Driver for older Tripp Lite USB UPSes
(not PDC HID
)))
514 $(eval
$(call DriverDescription
,usb
,blazer_usb
,\
515 Driver for Megatec
/Q1 protocol USB based UPS equipment
))
516 $(eval
$(call DriverDescription
,usb
,richcomm_usb
,\
517 Driver for UPS equipment using Richcomm dry-contact to USB solution
))
518 $(eval
$(call DriverDescription
,usb
,riello_usb
,\
519 Driver for Riello UPS Protocol UPS equipment via USB
))
520 $(eval
$(call DriverDescription
,usb
,nutdrv_atcl_usb
,\
521 Driver for ATCL FOR UPS equipment
))
522 $(eval
$(call DriverDescription
,usb
,nutdrv_qx
,\
523 Driver for Q
* protocol serial and USB based UPS equipment
))
524 $(eval
$(call DriverDescription
,neon
,netxml-ups
,\
525 Driver for NetXML based UPS equipment
))
528 --sysconfdir
=/etc
/nut \
529 --datadir=/usr
/share
/nut \
531 --$(if
$(CONFIG_NUT_DRIVER_USB
),with
,without
)-usb \
533 --$(if
$(CONFIG_NUT_DRIVER_SNMP
),with
,without
)-snmp \
534 --$(if
$(CONFIG_NUT_DRIVER_SERIAL
),with
,without
)-serial \
536 --$(if
$(CONFIG_NUT_DRIVER_NEON
),with
,without
)-neon \
539 --with-hotplug-dir
=/etc
/hotplug \
540 --with
$(if
$(CONFIG_PACKAGE_nut-web-cgi
),,out
)-cgi \
543 --$(if
$(CONFIG_NUT_SSL
),with
,without
)-ssl
$(if
$(CONFIG_NUT_SSL
),--with-openssl
) \
545 --with-statepath
=/var
/run
/nut \
546 --with-drvpath
=/lib
/nut \
549 $(if
$(CONFIG_PACKAGE_nut-web-cgi
),--with-gd-includes
="`pkg-config --cflags gdlib`") \
550 $(if
$(CONFIG_PACKAGE_nut-web-cgi
),--with-gd-libs
="`pkg-config --libs gdlib`")
552 TARGET_CXXFLAGS
+= -std
=c
++98
554 define Build
/InstallDev
555 $(INSTALL_DIR
) $(1)/usr
/include $(1)/usr
/lib
/pkgconfig
556 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
*.so
* $(1)/usr
/lib
/
557 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/*.h
$(1)/usr
/include/
558 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/*.
pc $(1)/usr
/lib
/pkgconfig
/
561 $(eval
$(call BuildPackage
,nut
))
562 $(eval
$(call BuildPackage
,nut-common
))
563 $(eval
$(call BuildPackage
,nut-server
))
564 $(eval
$(call BuildPackage
,nut-upsmon
))
565 $(eval
$(call BuildPackage
,nut-upsmon-sendmail-notify
))
566 $(eval
$(call BuildPackage
,nut-upsc
))
567 $(eval
$(call BuildPackage
,nut-upscmd
))
568 $(eval
$(call BuildPackage
,nut-upslog
))
569 $(eval
$(call BuildPackage
,nut-upsrw
))
570 $(eval
$(call BuildPackage
,nut-upssched
))
571 $(eval
$(call BuildPackage
,nut-web-cgi
))
572 $(eval
$(call BuildPackage
,nut-avahi-service
))
573 $(foreach d
,$(filter-out $(SERIAL_DRIVERLIST_IGNORE
),$(SERIAL_DRIVERLIST
)),$(eval
$(call BuildPackage
,nut-driver-
$(d
))))
574 $(foreach d
,$(SNMP_DRIVERLIST
),$(eval
$(call BuildPackage
,nut-driver-
$(d
))))
575 $(foreach d
,$(USB_LIBUSB_DRIVERLIST
),$(eval
$(call BuildPackage
,nut-driver-
$(d
))))
576 $(foreach d
,$(NEONXML_DRIVERLIST
),$(eval
$(call BuildPackage
,nut-driver-
$(d
))))