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_MAINTAINER
:=Daniel Dickinson
<cshored@thecshore.com
>
18 PKG_LICENSE
:=GPL-2.0
-or-later GPL-3.0
-or-later GPL-1.0
-or-later Artistic-1.0
-Perl
19 PKG_LICENSE_FILES
:=LICENSE-GPL2 LICENSE-GPL3 COPYING
24 PKG_CONFIG_DEPENDS
:= \
25 CONFIG_NUT_DRIVER_SNMP \
26 CONFIG_NUT_DRIVER_USB \
27 CONFIG_NUT_DRIVER_SERIAL \
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 \
105 define Package
/nut-common
/description
106 $(call Package
/nut
/description
/Default
)
107 This package contains the common files.
110 define Package
/nut-common
/conffiles
114 define Package
/nut-common
/install
115 $(INSTALL_DIR
) $(1)/etc
/nut
116 $(INSTALL_DIR
) $(1)/usr
/lib
117 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libupsclient.so
* $(1)/usr
/lib
/
118 ln
-sf
/var
/etc
/nut
/nut.conf
$(1)/etc
/nut
/nut.conf
121 define Package
/nut-server
122 $(call Package
/nut
/Default
)
124 DEPENDS
:=nut
+nut-common
125 USERID
:=nut
=113:nut
=113
128 define Package
/nut-server
/description
129 $(call Package
/nut
/description
/Default
)
130 upsd is responsible for serving the data from the drivers to the
131 clients. It connects to each driver and maintains a local cache of the
132 current state. Queries from the clients are served from this cache
, so
133 delays are minimal. This program is essential
, and must be running at
134 all times to actually make any use out of the drivers and clients.
137 define Package
/nut-server
/conffiles
138 /etc
/config
/nut_server
144 define Package
/nut-upsmon
145 $(call Package
/nut
/Default
)
147 DEPENDS
:=nut
+nut-common
148 USERID
:=nutmon
=114:nutmon
=114
151 define Package
/nut-upsmon
/description
152 $(call Package
/nut
/description
/Default
)
153 upsmon is the client process that is responsible for the most important
154 part of UPS monitoring--shutting down the system when the power goes
155 out. It can call out to other helper programs for notification purposes
156 during power events. upsmon can monitor multiple systems using a single
157 process. Every UPS that is defined in the upsmon.conf configuration file
158 is assigned a power value and a type
(slave or master
).
161 define Package
/nut-upsmon
/conffiles
162 /etc
/config
/nut_monitor
166 define Package
/nut-upsmon
/install
167 $(INSTALL_DIR
) $(1)/etc
/nut
168 $(INSTALL_DIR
) $(1)/usr
/sbin
169 $(INSTALL_DIR
) $(1)/etc
/init.d
170 $(INSTALL_BIN
) .
/files
/nut-monitor.init
$(1)/etc
/init.d
/nut-monitor
171 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/upsmon
$(1)/usr
/sbin
/
172 $(INSTALL_BIN
) .
/files
/nutshutdown
$(1)/usr
/sbin
/nutshutdown
173 $(INSTALL_DIR
) $(1)/etc
/config
174 $(INSTALL_CONF
) .
/files
/nut_monitor
$(1)/etc
/config
/nut_monitor
175 ln
-sf
/var
/etc
/nut
/upsmon.conf
$(1)/etc
/nut
/upsmon.conf
178 define Package
/nut-upsmon-sendmail-notify
179 $(call Package
/nut
/Default
)
180 TITLE
+= (upsmon with notifications via sendmail
)
181 DEPENDS
:=nut
+nut-upsmon
182 CONFLICTS
:=nut-upssched
185 define Package
/nut-upsmon-sendmail-notify
/description
186 $(call Package
/nut
/description
/Default
)
187 upsmon with default notification via sendmail
190 define Package
/nut-upsmon-sendmail-notify
/install
191 $(INSTALL_DIR
) $(1)/usr
/bin
$(1)/etc
/uci-defaults
192 $(INSTALL_BIN
) .
/files
/nut-sendmail-notify
$(1)/usr
/bin
/
193 $(INSTALL_DATA
) .
/files
/nut-sendmail-notify.default
$(1)/etc
/uci-defaults
/nut-sendmail-notify
196 define Package
/nut-upsc
197 $(call Package
/nut
/Default
)
198 TITLE
+= (upsc command
)
199 DEPENDS
:=nut
+nut-common
202 define Package
/nut-upsc
/description
203 $(call Package
/nut
/description
/Default
)
204 upsc is provided
as a quick way to poll the status of a UPS server. It
205 can be used inside
shell scripts and other programs that need UPS data
206 but do not want to
include the full interface.
209 define Package
/nut-upsc
/install
210 $(INSTALL_DIR
) $(1)/usr
/bin
211 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/upsc
$(1)/usr
/bin
214 define Package
/nut-upslog
215 $(call Package
/nut
/Default
)
216 TITLE
+= (logging client
)
217 DEPENDS
:=nut
+nut-common
220 define Package
/nut-upslog
/description
221 $(call Package
/nut
/description
/Default
)
222 upslog is a daemon that will poll a UPS at periodic intervals
, fetch the
223 variables that interest you
, format them
, and write them to a file.
226 define Package
/nut-upslog
/install
227 $(INSTALL_DIR
) $(1)/usr
/bin
228 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/upslog
$(1)/usr
/bin
/
231 define Package
/nut-upscmd
232 $(call Package
/nut
/Default
)
234 DEPENDS
:=nut
+nut-common
237 define Package
/nut-upscmd
/description
238 $(call Package
/nut
/description
/Default
)
239 upscmd allows you to invoke
"instant commands" in your UPS hardware. Not
240 all hardware supports this
, so
check the list with
-l to see if anything
241 will work on your equipment. On hardware that supports it
, you can use
242 this program to start and stop battery tests
, invoke a front panel
test
243 (beep
!), turn the load on or off
, and more.
246 define Package
/nut-upscmd
/install
247 $(INSTALL_DIR
) $(1)/usr
/bin
248 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/upscmd
$(1)/usr
/bin
/
251 define Package
/nut-upsrw
252 $(call Package
/nut
/Default
)
253 TITLE
+= (variable editor
)
254 DEPENDS
:=nut
+nut-common
257 define Package
/nut-upsrw
/description
258 $(call Package
/nut
/description
/Default
)
259 upsrw allows you to view and change the read
/write variables inside your
260 UPS. It sends commands via the upsd to your driver
, which configures the
261 hardware for you. The list of variables that allow you to change their
262 values is based on the capabilities of your UPS equipment. Not
all
263 models support this feature. Typically
, cheaper hardware does not
267 define Package
/nut-upsrw
/install
268 $(INSTALL_DIR
) $(1)/usr
/bin
269 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/upsrw
$(1)/usr
/bin
/
272 define Package
/nut-upssched
273 $(call Package
/nut
/Default
)
274 TITLE
+= (helper for triggering events from upsmon
)
275 DEPENDS
:=nut
+nut-common
+nut-upsmon
278 define Package
/nut-upssched
/description
279 $(call Package
/nut
/description
/Default
)
280 upssched was created to allow users to execute programs at times relative
281 to events being monitored by upsmon. The original purpose was to allow
282 for a shutdown to occur after some fixed period on battery
, but there are
283 other uses that are possible.
284 You can alternatively write your own script and save some space.
287 define Package
/nut-upssched
/conffiles
288 /etc
/nut
/upssched.conf
291 define Package
/nut-upssched
/install
292 $(INSTALL_DIR
) $(1)/usr
/bin
293 $(INSTALL_DIR
) $(1)/usr
/sbin
294 $(INSTALL_DIR
) $(1)/etc
/nut
295 $(INSTALL_DIR
) $(1)/etc
/uci-defaults
296 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/upssched-cmd
$(1)/usr
/bin
/
297 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/upssched
$(1)/usr
/sbin
/
298 $(INSTALL_CONF
) $(PKG_INSTALL_DIR
)/etc
/nut
/upssched.conf.sample
$(1)/etc
/nut
/upssched.conf
299 $(INSTALL_DATA
) .
/files
/nut-sched.default
$(1)/etc
/uci-defaults
/nut-upssched
302 define Package
/nut-web-cgi
303 $(call Package
/nut
/Default
)
304 TITLE
+= Web CGI interface
305 DEPENDS
:=nut
+nut-common
+PACKAGE_nut-web-cgi
:libgd
308 define Package
/nut-web-cgi
/description
309 The CGI programs are clients that run through your web server.
310 They allow you to see UPS status and perform certain administrative
311 commands from any web browser. Javascript and cookies are not required.
314 define Package
/nut-web-cgi
/conffiles
317 /etc
/nut
/upsstats.html
318 /etc
/nut
/upsstats-single.html
323 define Package
/nut-web-cgi
/install
324 $(INSTALL_DIR
) $(1)/www
/cgi-bin
/nut
$(1)/www
/nut
325 $(INSTALL_DIR
) $(1)/etc
/nut
326 $(CP
) $(PKG_INSTALL_DIR
)/usr
/html
/* $(1)/www
/nut
/
327 $(INSTALL_DIR
) $(1)/etc
/uci-defaults
328 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/cgi-bin
/* $(1)/www
/cgi-bin
/nut
329 $(INSTALL_CONF
) .
/files
/add_nut_httpd_conf
$(1)/etc
/uci-defaults
/add_nut_httpd_conf
330 $(INSTALL_CONF
) $(PKG_INSTALL_DIR
)/etc
/nut
/upsstats.html.sample
$(1)/etc
/nut
/upsstats.html
331 $(INSTALL_CONF
) $(PKG_INSTALL_DIR
)/etc
/nut
/upsstats-single.html.sample
$(1)/etc
/nut
/upsstats-single.html
332 $(INSTALL_CONF
) $(PKG_INSTALL_DIR
)/etc
/nut
/upsset.conf.sample
$(1)/etc
/nut
/upsset.conf.disable
333 $(INSTALL_CONF
) $(PKG_INSTALL_DIR
)/etc
/nut
/upsset.conf.sample
$(1)/etc
/nut
/upsset.conf.enable
334 $(SED
) 's/### \?//' $(1)/etc
/nut
/upsset.conf.enable
335 $(INSTALL_DIR
) $(1)/etc
/config
336 $(INSTALL_CONF
) .
/files
/nut_cgi
$(1)/etc
/config
/nut_cgi
337 $(INSTALL_DIR
) $(1)/etc
/init.d
338 $(INSTALL_BIN
) .
/files
/nut-cgi.init
$(1)/etc
/init.d
/nut-cgi
339 ln
-sf
/var
/etc
/nut
/hosts.conf
$(1)/etc
/nut
/hosts.conf
340 ln
-sf
/var
/etc
/nut
/upsset.conf
$(1)/etc
/nut
/upsset.conf
343 define Package
/nut-avahi-service
344 $(call Package
/nut
/Default
)
345 TITLE
+= (Avahi service
)
346 DEPENDS
:=nut
+avahi-daemon
349 define Package
/nut-avahi-service
/description
350 This package contains the service definition for announcing the
351 attached UPS via mDNS
/DNS-SD.
354 define Package
/nut-avahi-service
/conffiles
355 /etc
/avahi
/services
/nut.service
358 define Package
/nut-avahi-service
/install
359 $(INSTALL_DIR
) $(1)/etc
/avahi
/services
360 $(INSTALL_CONF
) .
/files
/nut.service
$(1)/etc
/avahi
/services
/
363 # Dealing with all of the drivers is very repetitive, but the previous
364 # maintainer had a neat solution which just needed some tweaking.
366 define Package
/nut-driver-
$(2)
367 $(call Package
/nut
/Default
)
368 TITLE
:=$(2) (NUT
$(1) driver
)
369 DEPENDS
:=nut
+nut-server
370 $(if
$(filter $(1),snmp
),DEPENDS
+= @NUT_DRIVER_SNMP
)
371 $(if
$(filter $(1),usb
),DEPENDS
+= @NUT_DRIVER_USB
)
372 $(if
$(filter $(1),serial
),DEPENDS
+= @NUT_DRIVER_SERIAL
)
374 # Deliberately empty description in order to trigger a build failure.
375 # It should be overridden by the list below, and when updating to a
376 # new version of nut we will need to provide descriptions for any new
378 define Package
/nut-driver-
$(2)/description
381 define Package
/nut-driver-
$(2)/install
382 $(INSTALL_DIR
) $$(1)/lib
/nut
383 $(CP
) $$(PKG_INSTALL_DIR
)/lib
/nut
/$(2) $$(1)/lib
/nut
/
384 $(if
$(filter $(2),clone
),$(CP
) $$(PKG_INSTALL_DIR
)/lib
/nut
/$(2)-outlet
$$(1)/lib
/nut
/)
387 define DriverDescription
388 define Package
/nut-driver-
$(2)/description
392 # These lists are lifted *directly* from drivers/Makefile.am in the nut
393 # source tree. This it to make it simpler to keep in sync when updating
394 # to a newer version of nut. Do not edit this manually.
396 # DO NOT EDIT (except to update with a fresh cut/paste)!
397 SERIAL_DRIVERLIST
= al175 bcmxcp belkin belkinunv bestfcom \
398 bestfortress bestuferrups bestups dummy-ups etapro everups \
399 gamatronic genericups isbmex liebert liebert-esp2 masterguard metasys \
400 oldmge-shut mge-utalk microdowell mge-shut oneac optiups powercom rhino \
401 safenet skel solis tripplite tripplitesu upscode2 victronups powerpanel \
402 blazer_ser clone clone-outlet ivtscd apcsmart apcsmart-old apcupsd-ups riello_ser \
404 SNMP_DRIVERLIST
= snmp-ups
405 USB_LIBUSB_DRIVERLIST
= usbhid-ups bcmxcp_usb tripplite_usb \
406 blazer_usb richcomm_usb riello_usb \
410 SERIAL_DRIVERLIST_IGNORE
:=skel clone-outlet nutdrv_qx
411 # nutdrv_qx can be either USB or serial. Given most routers have USB
412 # instead of serial ports, and not wanting two identical packages with
413 # different names that conflict with each other, only the option for the
414 # driver with USB bindings is provided. If you really want to save that
415 # tiny bit of space and build it without USB support, remove nutdrv_qx
416 # from the previous line.
418 $(foreach d
,$(filter-out $(SERIAL_DRIVERLIST_IGNORE
),$(SERIAL_DRIVERLIST
)),$(eval
$(call DriverPackage
,serial
,$(d
))))
419 $(foreach d
,$(SNMP_DRIVERLIST
),$(eval
$(call DriverPackage
,snmp
,$(d
))))
420 $(foreach d
,$(USB_LIBUSB_DRIVERLIST
),$(eval
$(call DriverPackage
,usb
,$(d
))))
422 $(eval
$(call DriverDescription
,serial
,al175
,\
423 Driver for Eltek UPS models with AL175 alarm module
))
424 $(eval
$(call DriverDescription
,serial
,bcmxcp
,\
425 Driver for UPSes supporting the serial BCM
/XCP protocol
))
426 $(eval
$(call DriverDescription
,serial
,belkin
,\
427 Driver for Belkin serial UPS equipment
))
428 $(eval
$(call DriverDescription
,serial
,belkinunv
,\
429 Driver for Belkin
"Universal UPS" and compatible
))
430 $(eval
$(call DriverDescription
,serial
,bestfcom
,\
431 Driver for Best Power Fortress
/Ferrups
))
432 $(eval
$(call DriverDescription
,serial
,bestfortress
,\
433 Driver for old Best Fortress UPS equipment
))
434 $(eval
$(call DriverDescription
,serial
,bestuferrups
,\
435 Driver for Best Power Micro-Ferrups
))
436 $(eval
$(call DriverDescription
,serial
,bestups
,\
437 Driver for Best Power
/ SOLA
(Phoenixtec protocol
) UPS equipment
))
438 $(eval
$(call DriverDescription
,serial
,dummy-ups
,\
439 Driver for multi-purpose UPS emulation
))
440 $(eval
$(call DriverDescription
,serial
,etapro
,\
441 Driver for ETA UPS equipment
))
442 $(eval
$(call DriverDescription
,serial
,everups
,\
443 Driver for Ever UPS models
))
444 $(eval
$(call DriverDescription
,serial
,gamatronic
,\
445 Driver for Gamatronic UPS equipment
))
446 $(eval
$(call DriverDescription
,serial
,genericups
,\
447 Driver for contact-closure UPS equipment
))
448 $(eval
$(call DriverDescription
,serial
,isbmex
,\
449 Driver for ISBMEX UPS equipment
))
450 $(eval
$(call DriverDescription
,serial
,liebert
,\
451 Driver for Liebert contact-closure UPS equipment
))
452 $(eval
$(call DriverDescription
,serial
,liebert-esp2
,\
453 Driver for Liebert UPS
, using the ESP-II serial protocol
))
454 $(eval
$(call DriverDescription
,serial
,masterguard
,\
455 Driver for Masterguard UPS equipment
))
456 $(eval
$(call DriverDescription
,serial
,metasys
,\
457 Driver for Meta System UPS equipment
))
458 $(eval
$(call DriverDescription
,serial
,oldmge-shut
,\
459 Driver for SHUT Protocol UPS equipment
, deprecated
, use mge-shut
))
460 $(eval
$(call DriverDescription
,serial
,mge-utalk
,\
461 Driver for MGE UPS SYSTEMS UTalk protocol equipment
))
462 $(eval
$(call DriverDescription
,serial
,microdowell
,\
463 Driver for Microdowell Enterprise UPS series
))
464 $(eval
$(call DriverDescription
,serial
,mge-shut
,\
465 Driver for SHUT Protocol UPS equipment
))
466 $(eval
$(call DriverDescription
,serial
,oneac
,\
467 Driver for Oneac UPS equipment
))
468 $(eval
$(call DriverDescription
,serial
,optiups
,\
469 Driver for Opti-UPS
(Viewsonic
) UPS and Zinto D
(ONLINE-USV
) equipment
))
470 $(eval
$(call DriverDescription
,serial
,powercom
,\
471 Driver for serial Powercom
/Trust
/Advice UPS equipment
))
472 $(eval
$(call DriverDescription
,serial
,rhino
,\
473 Driver for Brazilian Microsol RHINO UPS equipment
))
474 $(eval
$(call DriverDescription
,serial
,safenet
,\
475 Driver for SafeNet compatible UPS equipment
))
476 $(eval
$(call DriverDescription
,serial
,solis
,\
477 Driver for Brazilian Microsol SOLIS UPS equipment
))
478 $(eval
$(call DriverDescription
,serial
,tripplite
,\
479 Driver for Tripp-Lite SmartPro UPS equipment
))
480 $(eval
$(call DriverDescription
,serial
,tripplitesu
,\
481 Driver for Tripp-Lite SmartOnline
(SU
) UPS equipment
))
482 $(eval
$(call DriverDescription
,serial
,upscode2
,\
483 Driver for UPScode II compatible UPS equipment
))
484 $(eval
$(call DriverDescription
,serial
,victronups
,\
485 Driver for IMV
/Victron UPS unit Match
, Match Lite
, NetUps
))
486 $(eval
$(call DriverDescription
,serial
,powerpanel
,\
487 Driver for PowerPanel Plus compatible UPS equipment
))
488 $(eval
$(call DriverDescription
,serial
,blazer_ser
,\
489 Driver for Megatec
/Q1 protocol serial based UPS equipment
))
490 $(eval
$(call DriverDescription
,serial
,clone
,\
492 $(eval
$(call DriverDescription
,serial
,ivtscd
,\
493 Driver for the IVT Solar Controller Device
))
494 $(eval
$(call DriverDescription
,serial
,apcsmart
,\
495 Driver for American Power Conversion Smart Protocol UPS equipment
))
496 $(eval
$(call DriverDescription
,serial
,apcsmart-old
,\
497 Driver for American Power Conversion Smart Protocol UPS equipment
))
498 $(eval
$(call DriverDescription
,serial
,apcupsd-ups
,\
499 Driver for apcupsd client access
))
500 $(eval
$(call DriverDescription
,serial
,riello_ser
,\
501 Driver for Riello UPS Protocol UPS equipment
))
502 $(eval
$(call DriverDescription
,snmp
,snmp-ups
,\
503 Multi-MIB Driver for SNMP UPS equipment
))
504 $(eval
$(call DriverDescription
,usb
,usbhid-ups
,\
505 Driver for USB
/HID UPS equipment
))
506 $(eval
$(call DriverDescription
,usb
,bcmxcp_usb
,\
507 Experimental driver for UPSes supporting the BCM
/XCP protocol over USB
))
508 $(eval
$(call DriverDescription
,usb
,tripplite_usb
,\
509 Driver for older Tripp Lite USB UPSes
(not PDC HID
)))
510 $(eval
$(call DriverDescription
,usb
,blazer_usb
,\
511 Driver for Megatec
/Q1 protocol USB based UPS equipment
))
512 $(eval
$(call DriverDescription
,usb
,richcomm_usb
,\
513 Driver for UPS equipment using Richcomm dry-contact to USB solution
))
514 $(eval
$(call DriverDescription
,usb
,riello_usb
,\
515 Driver for Riello UPS Protocol UPS equipment via USB
))
516 $(eval
$(call DriverDescription
,usb
,nutdrv_atcl_usb
,\
517 Driver for ATCL FOR UPS equipment
))
518 $(eval
$(call DriverDescription
,usb
,nutdrv_qx
,\
519 Driver for Q
* protocol serial and USB based UPS equipment
))
522 --sysconfdir
=/etc
/nut \
523 --datadir=/usr
/share
/nut \
525 --$(if
$(CONFIG_NUT_DRIVER_USB
),with
,without
)-usb \
527 --$(if
$(CONFIG_NUT_DRIVER_SNMP
),with
,without
)-snmp \
528 --$(if
$(CONFIG_NUT_DRIVER_SERIAL
),with
,without
)-serial \
533 --with-hotplug-dir
=/etc
/hotplug \
534 --with
$(if
$(CONFIG_PACKAGE_nut-web-cgi
),,out
)-cgi \
537 --$(if
$(CONFIG_NUT_SSL
),with
,without
)-ssl
$(if
$(CONFIG_NUT_SSL
),--with-openssl
) \
539 --with-statepath
=/var
/run
/nut \
540 --with-drvpath
=/lib
/nut \
543 $(if
$(CONFIG_PACKAGE_nut-web-cgi
),--with-gd-includes
="`pkg-config --cflags gdlib`") \
544 $(if
$(CONFIG_PACKAGE_nut-web-cgi
),--with-gd-libs
="`pkg-config --libs gdlib`")
546 define Build
/InstallDev
547 $(INSTALL_DIR
) $(1)/usr
/include $(1)/usr
/lib
/pkgconfig
548 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
*.so
* $(1)/usr
/lib
/
549 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/*.h
$(1)/usr
/include/
550 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/*.
pc $(1)/usr
/lib
/pkgconfig
/
553 $(eval
$(call BuildPackage
,nut
))
554 $(eval
$(call BuildPackage
,nut-common
))
555 $(eval
$(call BuildPackage
,nut-server
))
556 $(eval
$(call BuildPackage
,nut-upsmon
))
557 $(eval
$(call BuildPackage
,nut-upsmon-sendmail-notify
))
558 $(eval
$(call BuildPackage
,nut-upsc
))
559 $(eval
$(call BuildPackage
,nut-upscmd
))
560 $(eval
$(call BuildPackage
,nut-upslog
))
561 $(eval
$(call BuildPackage
,nut-upsrw
))
562 $(eval
$(call BuildPackage
,nut-upssched
))
563 $(eval
$(call BuildPackage
,nut-web-cgi
))
564 $(eval
$(call BuildPackage
,nut-avahi-service
))
565 $(foreach d
,$(filter-out $(SERIAL_DRIVERLIST_IGNORE
),$(SERIAL_DRIVERLIST
)),$(eval
$(call BuildPackage
,nut-driver-
$(d
))))
566 $(foreach d
,$(SNMP_DRIVERLIST
),$(eval
$(call BuildPackage
,nut-driver-
$(d
))))
567 $(foreach d
,$(USB_LIBUSB_DRIVERLIST
),$(eval
$(call BuildPackage
,nut-driver-
$(d
))))