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 \
28 CONFIG_PACKAGE_nut-web-cgi
30 include $(INCLUDE_DIR
)/package.mk
32 define Package
/nut
/Default
35 URL
:=http
://www.networkupstools.org
/
36 TITLE
:=Network UPS Tools
(NUT
)
39 define Package
/nut
/description
/Default
40 Network UPS Tools
(NUT
) is a client
/server monitoring system that
41 allows computers to share uninterruptible power supply
(UPS
) and
42 power distribution unit
(PDU
) hardware. Clients access the hardware
43 through the server
, and are notified whenever the power status
48 $(call Package
/nut
/Default
)
52 define Package
/nut
/description
53 $(call Package
/nut
/description
/Default
)
56 define Package
/nut
/config
57 source
"$(SOURCE)/Config.in"
60 define Package
/nut
/install
64 define Package
/nut-server
/install
66 $(INSTALL_DIR
) $(1)/etc
/nut
67 $(INSTALL_DIR
) $(1)/usr
/sbin
68 $(INSTALL_DIR
) $(1)/etc
/init.d
69 $(INSTALL_DIR
) $(1)/usr
/share
/nut
70 $(INSTALL_BIN
) .
/files
/nut-server.init
$(1)/etc
/init.d
/nut-server
71 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/upsd
$(1)/usr
/sbin
72 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/share
/nut
/cmdvartab
$(1)/usr
/share
/nut
/
73 $(INSTALL_DIR
) $(1)/etc
/config
74 $(INSTALL_CONF
) .
/files
/nut_server
$(1)/etc
/config
/nut_server
75 ln
-sf ..
/..
/var
/etc
/nut
/upsd.users
$(1)/etc
/nut
/upsd.users
76 ln
-sf ..
/..
/var
/etc
/nut
/upsd.conf
$(1)/etc
/nut
/upsd.conf
77 # Driver common portion
78 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/upsdrvctl
$(1)/usr
/sbin
79 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/share
/nut
/driver.list
$(1)/usr
/share
/nut
/
80 ln
-sf ..
/..
/var
/etc
/nut
/ups.conf
$(1)/etc
/nut
/ups.conf
81 # Mangle libhid.usermap into a format (hotplug shell script) useful for OpenWrt
82 $(INSTALL_DIR
) $(1)/etc
/hotplug.d
/usb
83 $(INSTALL_DIR
) $(1)/etc
/hotplug.d
/tty
84 $(INSTALL_BIN
) .
/files
/nut_serial.hotplug
$(1)/etc
/hotplug.d
/tty
/40-nut_serial
85 $(INSTALL_BIN
) .
/files
/30-libhid-ups.head
$(1)/etc
/hotplug.d
/usb
/30-libhid-ups
86 $(CP
) $(PKG_INSTALL_DIR
)/etc
/hotplug
/usb
/libhid.usermap
$(PKG_BUILD_DIR
)/30-libhid-ups.middle
89 -E
-e
's:^[^ ][^ ]* *0x0003 *0x0{0,3}([^ ][^ ]*) *0x0{0,3}*([^ ][^ ]*).*:\1/\2/* | \\:' \
90 $(PKG_BUILD_DIR
)/30-libhid-ups.middle
91 tail
-n
+2 $(PKG_BUILD_DIR
)/30-libhid-ups.middle
>>$(1)/etc
/hotplug.d
/usb
/30-libhid-ups
92 cat .
/files
/30-libhid-ups.tail
>>$(1)/etc
/hotplug.d
/usb
/30-libhid-ups
95 define Package
/nut-common
96 $(call Package
/nut
/Default
)
99 +NUT_DRIVER_SNMP
:libnetsnmp \
100 +NUT_DRIVER_USB
:libusb-compat \
104 define Package
/nut-common
/description
105 $(call Package
/nut
/description
/Default
)
106 This package contains the common files.
109 define Package
/nut-common
/conffiles
113 define Package
/nut-common
/install
114 $(INSTALL_DIR
) $(1)/etc
/nut
115 $(INSTALL_DIR
) $(1)/usr
/lib
116 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libupsclient.so
* $(1)/usr
/lib
/
117 ln
-sf
/var
/etc
/nut
/nut.conf
$(1)/etc
/nut
/nut.conf
120 define Package
/nut-server
121 $(call Package
/nut
/Default
)
123 DEPENDS
:=nut
+nut-common
124 USERID
:=nut
=113:nut
=113
127 define Package
/nut-server
/description
128 $(call Package
/nut
/description
/Default
)
129 upsd is responsible for serving the data from the drivers to the
130 clients. It connects to each driver and maintains a local cache of the
131 current state. Queries from the clients are served from this cache
, so
132 delays are minimal. This program is essential
, and must be running at
133 all times to actually make any use out of the drivers and clients.
136 define Package
/nut-server
/conffiles
137 /etc
/config
/nut_server
143 define Package
/nut-upsmon
144 $(call Package
/nut
/Default
)
146 DEPENDS
:=nut
+nut-common
147 USERID
:=nutmon
=114:nutmon
=114
150 define Package
/nut-upsmon
/description
151 $(call Package
/nut
/description
/Default
)
152 upsmon is the client process that is responsible for the most important
153 part of UPS monitoring--shutting down the system when the power goes
154 out. It can call out to other helper programs for notification purposes
155 during power events. upsmon can monitor multiple systems using a single
156 process. Every UPS that is defined in the upsmon.conf configuration file
157 is assigned a power value and a type
(slave or master
).
160 define Package
/nut-upsmon
/conffiles
161 /etc
/config
/nut_monitor
165 define Package
/nut-upsmon
/install
166 $(INSTALL_DIR
) $(1)/etc
/nut
167 $(INSTALL_DIR
) $(1)/usr
/sbin
168 $(INSTALL_DIR
) $(1)/etc
/init.d
169 $(INSTALL_BIN
) .
/files
/nut-monitor.init
$(1)/etc
/init.d
/nut-monitor
170 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/upsmon
$(1)/usr
/sbin
/
171 $(INSTALL_BIN
) .
/files
/nutshutdown
$(1)/usr
/sbin
/nutshutdown
172 $(INSTALL_DIR
) $(1)/etc
/config
173 $(INSTALL_CONF
) .
/files
/nut_monitor
$(1)/etc
/config
/nut_monitor
174 ln
-sf
/var
/etc
/nut
/upsmon.conf
$(1)/etc
/nut
/upsmon.conf
177 define Package
/nut-upsmon-sendmail-notify
178 $(call Package
/nut
/Default
)
179 TITLE
+= (upsmon with notifications via sendmail
)
180 DEPENDS
:=nut
+nut-upsmon
181 CONFLICTS
:=nut-upssched
184 define Package
/nut-upsmon-sendmail-notify
/description
185 $(call Package
/nut
/description
/Default
)
186 upsmon with default notification via sendmail
189 define Package
/nut-upsmon-sendmail-notify
/install
190 $(INSTALL_DIR
) $(1)/usr
/bin
$(1)/etc
/uci-defaults
191 $(INSTALL_BIN
) .
/files
/nut-sendmail-notify
$(1)/usr
/bin
/
192 $(INSTALL_DATA
) .
/files
/nut-sendmail-notify.default
$(1)/etc
/uci-defaults
/nut-sendmail-notify
195 define Package
/nut-upsc
196 $(call Package
/nut
/Default
)
197 TITLE
+= (upsc command
)
198 DEPENDS
:=nut
+nut-common
201 define Package
/nut-upsc
/description
202 $(call Package
/nut
/description
/Default
)
203 upsc is provided
as a quick way to poll the status of a UPS server. It
204 can be used inside
shell scripts and other programs that need UPS data
205 but do not want to
include the full interface.
208 define Package
/nut-upsc
/install
209 $(INSTALL_DIR
) $(1)/usr
/bin
210 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/upsc
$(1)/usr
/bin
213 define Package
/nut-upslog
214 $(call Package
/nut
/Default
)
215 TITLE
+= (logging client
)
216 DEPENDS
:=nut
+nut-common
219 define Package
/nut-upslog
/description
220 $(call Package
/nut
/description
/Default
)
221 upslog is a daemon that will poll a UPS at periodic intervals
, fetch the
222 variables that interest you
, format them
, and write them to a file.
225 define Package
/nut-upslog
/install
226 $(INSTALL_DIR
) $(1)/usr
/bin
227 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/upslog
$(1)/usr
/bin
/
230 define Package
/nut-upscmd
231 $(call Package
/nut
/Default
)
233 DEPENDS
:=nut
+nut-common
236 define Package
/nut-upscmd
/description
237 $(call Package
/nut
/description
/Default
)
238 upscmd allows you to invoke
"instant commands" in your UPS hardware. Not
239 all hardware supports this
, so
check the list with
-l to see if anything
240 will work on your equipment. On hardware that supports it
, you can use
241 this program to start and stop battery tests
, invoke a front panel
test
242 (beep
!), turn the load on or off
, and more.
245 define Package
/nut-upscmd
/install
246 $(INSTALL_DIR
) $(1)/usr
/bin
247 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/upscmd
$(1)/usr
/bin
/
250 define Package
/nut-upsrw
251 $(call Package
/nut
/Default
)
252 TITLE
+= (variable editor
)
253 DEPENDS
:=nut
+nut-common
256 define Package
/nut-upsrw
/description
257 $(call Package
/nut
/description
/Default
)
258 upsrw allows you to view and change the read
/write variables inside your
259 UPS. It sends commands via the upsd to your driver
, which configures the
260 hardware for you. The list of variables that allow you to change their
261 values is based on the capabilities of your UPS equipment. Not
all
262 models support this feature. Typically
, cheaper hardware does not
266 define Package
/nut-upsrw
/install
267 $(INSTALL_DIR
) $(1)/usr
/bin
268 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/upsrw
$(1)/usr
/bin
/
271 define Package
/nut-upssched
272 $(call Package
/nut
/Default
)
273 TITLE
+= (helper for triggering events from upsmon
)
274 DEPENDS
:=nut
+nut-common
+nut-upsmon
277 define Package
/nut-upssched
/description
278 $(call Package
/nut
/description
/Default
)
279 upssched was created to allow users to execute programs at times relative
280 to events being monitored by upsmon. The original purpose was to allow
281 for a shutdown to occur after some fixed period on battery
, but there are
282 other uses that are possible.
283 You can alternatively write your own script and save some space.
286 define Package
/nut-upssched
/conffiles
287 /etc
/nut
/upssched.conf
290 define Package
/nut-upssched
/install
291 $(INSTALL_DIR
) $(1)/usr
/bin
292 $(INSTALL_DIR
) $(1)/usr
/sbin
293 $(INSTALL_DIR
) $(1)/etc
/nut
294 $(INSTALL_DIR
) $(1)/etc
/uci-defaults
295 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/upssched-cmd
$(1)/usr
/bin
/
296 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/upssched
$(1)/usr
/sbin
/
297 $(INSTALL_CONF
) $(PKG_INSTALL_DIR
)/etc
/nut
/upssched.conf.sample
$(1)/etc
/nut
/upssched.conf
298 $(INSTALL_DATA
) .
/files
/nut-sched.default
$(1)/etc
/uci-defaults
/nut-upssched
301 define Package
/nut-web-cgi
302 $(call Package
/nut
/Default
)
303 TITLE
+= Web CGI interface
304 DEPENDS
:=nut
+nut-common
+PACKAGE_nut-web-cgi
:libgd
307 define Package
/nut-web-cgi
/description
308 The CGI programs are clients that run through your web server.
309 They allow you to see UPS status and perform certain administrative
310 commands from any web browser. Javascript and cookies are not required.
313 define Package
/nut-web-cgi
/conffiles
316 /etc
/nut
/upsstats.html
317 /etc
/nut
/upsstats-single.html
322 define Package
/nut-web-cgi
/install
323 $(INSTALL_DIR
) $(1)/www
/cgi-bin
/nut
$(1)/www
/nut
324 $(INSTALL_DIR
) $(1)/etc
/nut
325 $(CP
) $(PKG_INSTALL_DIR
)/usr
/html
/* $(1)/www
/nut
/
326 $(INSTALL_DIR
) $(1)/etc
/uci-defaults
327 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/cgi-bin
/* $(1)/www
/cgi-bin
/nut
328 $(INSTALL_CONF
) .
/files
/add_nut_httpd_conf
$(1)/etc
/uci-defaults
/add_nut_httpd_conf
329 $(INSTALL_CONF
) $(PKG_INSTALL_DIR
)/etc
/nut
/upsstats.html.sample
$(1)/etc
/nut
/upsstats.html
330 $(INSTALL_CONF
) $(PKG_INSTALL_DIR
)/etc
/nut
/upsstats-single.html.sample
$(1)/etc
/nut
/upsstats-single.html
331 $(INSTALL_CONF
) $(PKG_INSTALL_DIR
)/etc
/nut
/upsset.conf.sample
$(1)/etc
/nut
/upsset.conf.disable
332 $(INSTALL_CONF
) $(PKG_INSTALL_DIR
)/etc
/nut
/upsset.conf.sample
$(1)/etc
/nut
/upsset.conf.enable
333 $(SED
) 's/### \?//' $(1)/etc
/nut
/upsset.conf.enable
334 $(INSTALL_DIR
) $(1)/etc
/config
335 $(INSTALL_CONF
) .
/files
/nut_cgi
$(1)/etc
/config
/nut_cgi
336 $(INSTALL_DIR
) $(1)/etc
/init.d
337 $(INSTALL_BIN
) .
/files
/nut-cgi.init
$(1)/etc
/init.d
/nut-cgi
338 ln
-sf
/var
/etc
/nut
/hosts.conf
$(1)/etc
/nut
/hosts.conf
339 ln
-sf
/var
/etc
/nut
/upsset.conf
$(1)/etc
/nut
/upsset.conf
342 define Package
/nut-avahi-service
343 $(call Package
/nut
/Default
)
344 TITLE
+= (Avahi service
)
345 DEPENDS
:=nut
+avahi-daemon
348 define Package
/nut-avahi-service
/description
349 This package contains the service definition for announcing the
350 attached UPS via mDNS
/DNS-SD.
353 define Package
/nut-avahi-service
/conffiles
354 /etc
/avahi
/services
/nut.service
357 define Package
/nut-avahi-service
/install
358 $(INSTALL_DIR
) $(1)/etc
/avahi
/services
359 $(INSTALL_CONF
) .
/files
/nut.service
$(1)/etc
/avahi
/services
/
362 # Dealing with all of the drivers is very repetitive, but the previous
363 # maintainer had a neat solution which just needed some tweaking.
365 define Package
/nut-driver-
$(2)
366 $(call Package
/nut
/Default
)
367 TITLE
:=$(2) (NUT
$(1) driver
)
368 DEPENDS
:=nut
+nut-server
369 $(if
$(filter $(1),snmp
),DEPENDS
+= @NUT_DRIVER_SNMP
)
370 $(if
$(filter $(1),usb
),DEPENDS
+= @NUT_DRIVER_USB
)
371 $(if
$(filter $(1),serial
),DEPENDS
+= @NUT_DRIVER_SERIAL
)
373 # Deliberately empty description in order to trigger a build failure.
374 # It should be overridden by the list below, and when updating to a
375 # new version of nut we will need to provide descriptions for any new
377 define Package
/nut-driver-
$(2)/description
380 define Package
/nut-driver-
$(2)/install
381 $(INSTALL_DIR
) $$(1)/lib
/nut
382 $(CP
) $$(PKG_INSTALL_DIR
)/lib
/nut
/$(2) $$(1)/lib
/nut
/
383 $(if
$(filter $(2),clone
),$(CP
) $$(PKG_INSTALL_DIR
)/lib
/nut
/$(2)-outlet
$$(1)/lib
/nut
/)
386 define DriverDescription
387 define Package
/nut-driver-
$(2)/description
391 # These lists are lifted *directly* from drivers/Makefile.am in the nut
392 # source tree. This it to make it simpler to keep in sync when updating
393 # to a newer version of nut. Do not edit this manually.
395 # DO NOT EDIT (except to update with a fresh cut/paste)!
396 SERIAL_DRIVERLIST
= al175 bcmxcp belkin belkinunv bestfcom \
397 bestfortress bestuferrups bestups dummy-ups etapro everups \
398 gamatronic genericups isbmex liebert liebert-esp2 masterguard metasys \
399 oldmge-shut mge-utalk microdowell mge-shut oneac optiups powercom rhino \
400 safenet skel solis tripplite tripplitesu upscode2 victronups powerpanel \
401 blazer_ser clone clone-outlet ivtscd apcsmart apcsmart-old apcupsd-ups riello_ser \
403 SNMP_DRIVERLIST
= snmp-ups
404 USB_LIBUSB_DRIVERLIST
= usbhid-ups bcmxcp_usb tripplite_usb \
405 blazer_usb richcomm_usb riello_usb \
409 SERIAL_DRIVERLIST_IGNORE
:=skel clone-outlet nutdrv_qx
410 # nutdrv_qx can be either USB or serial. Given most routers have USB
411 # instead of serial ports, and not wanting two identical packages with
412 # different names that conflict with each other, only the option for the
413 # driver with USB bindings is provided. If you really want to save that
414 # tiny bit of space and build it without USB support, remove nutdrv_qx
415 # from the previous line.
417 $(foreach d
,$(filter-out $(SERIAL_DRIVERLIST_IGNORE
),$(SERIAL_DRIVERLIST
)),$(eval
$(call DriverPackage
,serial
,$(d
))))
418 $(foreach d
,$(SNMP_DRIVERLIST
),$(eval
$(call DriverPackage
,snmp
,$(d
))))
419 $(foreach d
,$(USB_LIBUSB_DRIVERLIST
),$(eval
$(call DriverPackage
,usb
,$(d
))))
421 $(eval
$(call DriverDescription
,serial
,al175
,\
422 Driver for Eltek UPS models with AL175 alarm module
))
423 $(eval
$(call DriverDescription
,serial
,bcmxcp
,\
424 Driver for UPSes supporting the serial BCM
/XCP protocol
))
425 $(eval
$(call DriverDescription
,serial
,belkin
,\
426 Driver for Belkin serial UPS equipment
))
427 $(eval
$(call DriverDescription
,serial
,belkinunv
,\
428 Driver for Belkin
"Universal UPS" and compatible
))
429 $(eval
$(call DriverDescription
,serial
,bestfcom
,\
430 Driver for Best Power Fortress
/Ferrups
))
431 $(eval
$(call DriverDescription
,serial
,bestfortress
,\
432 Driver for old Best Fortress UPS equipment
))
433 $(eval
$(call DriverDescription
,serial
,bestuferrups
,\
434 Driver for Best Power Micro-Ferrups
))
435 $(eval
$(call DriverDescription
,serial
,bestups
,\
436 Driver for Best Power
/ SOLA
(Phoenixtec protocol
) UPS equipment
))
437 $(eval
$(call DriverDescription
,serial
,dummy-ups
,\
438 Driver for multi-purpose UPS emulation
))
439 $(eval
$(call DriverDescription
,serial
,etapro
,\
440 Driver for ETA UPS equipment
))
441 $(eval
$(call DriverDescription
,serial
,everups
,\
442 Driver for Ever UPS models
))
443 $(eval
$(call DriverDescription
,serial
,gamatronic
,\
444 Driver for Gamatronic UPS equipment
))
445 $(eval
$(call DriverDescription
,serial
,genericups
,\
446 Driver for contact-closure UPS equipment
))
447 $(eval
$(call DriverDescription
,serial
,isbmex
,\
448 Driver for ISBMEX UPS equipment
))
449 $(eval
$(call DriverDescription
,serial
,liebert
,\
450 Driver for Liebert contact-closure UPS equipment
))
451 $(eval
$(call DriverDescription
,serial
,liebert-esp2
,\
452 Driver for Liebert UPS
, using the ESP-II serial protocol
))
453 $(eval
$(call DriverDescription
,serial
,masterguard
,\
454 Driver for Masterguard UPS equipment
))
455 $(eval
$(call DriverDescription
,serial
,metasys
,\
456 Driver for Meta System UPS equipment
))
457 $(eval
$(call DriverDescription
,serial
,oldmge-shut
,\
458 Driver for SHUT Protocol UPS equipment
, deprecated
, use mge-shut
))
459 $(eval
$(call DriverDescription
,serial
,mge-utalk
,\
460 Driver for MGE UPS SYSTEMS UTalk protocol equipment
))
461 $(eval
$(call DriverDescription
,serial
,microdowell
,\
462 Driver for Microdowell Enterprise UPS series
))
463 $(eval
$(call DriverDescription
,serial
,mge-shut
,\
464 Driver for SHUT Protocol UPS equipment
))
465 $(eval
$(call DriverDescription
,serial
,oneac
,\
466 Driver for Oneac UPS equipment
))
467 $(eval
$(call DriverDescription
,serial
,optiups
,\
468 Driver for Opti-UPS
(Viewsonic
) UPS and Zinto D
(ONLINE-USV
) equipment
))
469 $(eval
$(call DriverDescription
,serial
,powercom
,\
470 Driver for serial Powercom
/Trust
/Advice UPS equipment
))
471 $(eval
$(call DriverDescription
,serial
,rhino
,\
472 Driver for Brazilian Microsol RHINO UPS equipment
))
473 $(eval
$(call DriverDescription
,serial
,safenet
,\
474 Driver for SafeNet compatible UPS equipment
))
475 $(eval
$(call DriverDescription
,serial
,solis
,\
476 Driver for Brazilian Microsol SOLIS UPS equipment
))
477 $(eval
$(call DriverDescription
,serial
,tripplite
,\
478 Driver for Tripp-Lite SmartPro UPS equipment
))
479 $(eval
$(call DriverDescription
,serial
,tripplitesu
,\
480 Driver for Tripp-Lite SmartOnline
(SU
) UPS equipment
))
481 $(eval
$(call DriverDescription
,serial
,upscode2
,\
482 Driver for UPScode II compatible UPS equipment
))
483 $(eval
$(call DriverDescription
,serial
,victronups
,\
484 Driver for IMV
/Victron UPS unit Match
, Match Lite
, NetUps
))
485 $(eval
$(call DriverDescription
,serial
,powerpanel
,\
486 Driver for PowerPanel Plus compatible UPS equipment
))
487 $(eval
$(call DriverDescription
,serial
,blazer_ser
,\
488 Driver for Megatec
/Q1 protocol serial based UPS equipment
))
489 $(eval
$(call DriverDescription
,serial
,clone
,\
491 $(eval
$(call DriverDescription
,serial
,ivtscd
,\
492 Driver for the IVT Solar Controller Device
))
493 $(eval
$(call DriverDescription
,serial
,apcsmart
,\
494 Driver for American Power Conversion Smart Protocol UPS equipment
))
495 $(eval
$(call DriverDescription
,serial
,apcsmart-old
,\
496 Driver for American Power Conversion Smart Protocol UPS equipment
))
497 $(eval
$(call DriverDescription
,serial
,apcupsd-ups
,\
498 Driver for apcupsd client access
))
499 $(eval
$(call DriverDescription
,serial
,riello_ser
,\
500 Driver for Riello UPS Protocol UPS equipment
))
501 $(eval
$(call DriverDescription
,snmp
,snmp-ups
,\
502 Multi-MIB Driver for SNMP UPS equipment
))
503 $(eval
$(call DriverDescription
,usb
,usbhid-ups
,\
504 Driver for USB
/HID UPS equipment
))
505 $(eval
$(call DriverDescription
,usb
,bcmxcp_usb
,\
506 Experimental driver for UPSes supporting the BCM
/XCP protocol over USB
))
507 $(eval
$(call DriverDescription
,usb
,tripplite_usb
,\
508 Driver for older Tripp Lite USB UPSes
(not PDC HID
)))
509 $(eval
$(call DriverDescription
,usb
,blazer_usb
,\
510 Driver for Megatec
/Q1 protocol USB based UPS equipment
))
511 $(eval
$(call DriverDescription
,usb
,richcomm_usb
,\
512 Driver for UPS equipment using Richcomm dry-contact to USB solution
))
513 $(eval
$(call DriverDescription
,usb
,riello_usb
,\
514 Driver for Riello UPS Protocol UPS equipment via USB
))
515 $(eval
$(call DriverDescription
,usb
,nutdrv_atcl_usb
,\
516 Driver for ATCL FOR UPS equipment
))
517 $(eval
$(call DriverDescription
,usb
,nutdrv_qx
,\
518 Driver for Q
* protocol serial and USB based UPS equipment
))
521 --sysconfdir
=/etc
/nut \
522 --datadir=/usr
/share
/nut \
524 --$(if
$(CONFIG_NUT_DRIVER_USB
),with
,without
)-usb \
526 --$(if
$(CONFIG_NUT_DRIVER_SNMP
),with
,without
)-snmp \
527 --$(if
$(CONFIG_NUT_DRIVER_SERIAL
),with
,without
)-serial \
532 --with-hotplug-dir
=/etc
/hotplug \
533 --with
$(if
$(CONFIG_PACKAGE_nut-web-cgi
),,out
)-cgi \
536 --$(if
$(CONFIG_NUT_SSL
),with
,without
)-ssl
$(if
$(CONFIG_NUT_SSL
),--with-openssl
) \
538 --with-statepath
=/var
/run
/nut \
539 --with-drvpath
=/lib
/nut \
542 $(if
$(CONFIG_PACKAGE_nut-web-cgi
),--with-gd-includes
="`pkg-config --cflags gdlib`") \
543 $(if
$(CONFIG_PACKAGE_nut-web-cgi
),--with-gd-libs
="`pkg-config --libs gdlib`")
545 TARGET_CXXFLAGS
+= -std
=c
++98
547 define Build
/InstallDev
548 $(INSTALL_DIR
) $(1)/usr
/include $(1)/usr
/lib
/pkgconfig
549 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
*.so
* $(1)/usr
/lib
/
550 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/*.h
$(1)/usr
/include/
551 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/*.
pc $(1)/usr
/lib
/pkgconfig
/
554 $(eval
$(call BuildPackage
,nut
))
555 $(eval
$(call BuildPackage
,nut-common
))
556 $(eval
$(call BuildPackage
,nut-server
))
557 $(eval
$(call BuildPackage
,nut-upsmon
))
558 $(eval
$(call BuildPackage
,nut-upsmon-sendmail-notify
))
559 $(eval
$(call BuildPackage
,nut-upsc
))
560 $(eval
$(call BuildPackage
,nut-upscmd
))
561 $(eval
$(call BuildPackage
,nut-upslog
))
562 $(eval
$(call BuildPackage
,nut-upsrw
))
563 $(eval
$(call BuildPackage
,nut-upssched
))
564 $(eval
$(call BuildPackage
,nut-web-cgi
))
565 $(eval
$(call BuildPackage
,nut-avahi-service
))
566 $(foreach d
,$(filter-out $(SERIAL_DRIVERLIST_IGNORE
),$(SERIAL_DRIVERLIST
)),$(eval
$(call BuildPackage
,nut-driver-
$(d
))))
567 $(foreach d
,$(SNMP_DRIVERLIST
),$(eval
$(call BuildPackage
,nut-driver-
$(d
))))
568 $(foreach d
,$(USB_LIBUSB_DRIVERLIST
),$(eval
$(call BuildPackage
,nut-driver-
$(d
))))