You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

539 lines
19 KiB

  1. # Copyright (C) 2006-2016 OpenWrt.org
  2. #
  3. # This is free software, licensed under the GNU General Public License v2.
  4. # See /LICENSE for more information.
  5. #
  6. include $(TOPDIR)/rules.mk
  7. PKG_NAME:=nut
  8. PKG_VERSION:=2.7.4
  9. PKG_RELEASE:=6
  10. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  11. PKG_SOURCE_URL:=http://www.networkupstools.org/source/2.7/
  12. PKG_HASH:=980e82918c52d364605c0703a5dcf01f74ad2ef06e3d365949e43b7d406d25a7
  13. PKG_MAINTAINER:=Daniel Dickinson <cshored@thecshore.com>
  14. PKG_LICENSE:=GPL-2.0
  15. PKG_LICENSE_FILES:=LICENSE-GPL2
  16. PKG_FIXUP:=autoreconf
  17. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
  18. PKG_INSTALL:=1
  19. PKG_CONFIG_DEPENDS:= \
  20. CONFIG_NUT_DRIVER_SNMP \
  21. CONFIG_NUT_DRIVER_USB \
  22. CONFIG_NUT_DRIVER_SERIAL \
  23. CONFIG_NUT_SSL
  24. include $(INCLUDE_DIR)/package.mk
  25. define Package/nut/Default
  26. SECTION:=net
  27. CATEGORY:=Network
  28. URL:=http://www.networkupstools.org/
  29. TITLE:=Network UPS Tools (NUT)
  30. endef
  31. define Package/nut/description/Default
  32. Network UPS Tools (NUT) is a client/server monitoring system that
  33. allows computers to share uninterruptible power supply (UPS) and
  34. power distribution unit (PDU) hardware. Clients access the hardware
  35. through the server, and are notified whenever the power status
  36. changes.
  37. endef
  38. define Package/nut
  39. $(call Package/nut/Default)
  40. MENU:=1
  41. endef
  42. define Package/nut/description
  43. $(call Package/nut/description/Default)
  44. endef
  45. define Package/nut/config
  46. source "$(SOURCE)/Config.in"
  47. endef
  48. define Package/nut/install
  49. true
  50. endef
  51. define Package/nut-server/install
  52. $(INSTALL_DIR) $(1)/etc/nut
  53. $(INSTALL_DIR) $(1)/usr/sbin
  54. $(INSTALL_DIR) $(1)/etc/init.d
  55. $(INSTALL_DIR) $(1)/usr/share/nut
  56. $(INSTALL_DIR) $(1)/etc/init.d
  57. $(INSTALL_BIN) ./files/nut-server.init $(1)/etc/init.d/nut-server
  58. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/upsd $(1)/usr/sbin
  59. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/upsdrvctl $(1)/usr/sbin
  60. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/nut/cmdvartab $(1)/usr/share/nut/
  61. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/nut/driver.list $(1)/usr/share/nut/
  62. $(INSTALL_DIR) $(1)/etc/config
  63. $(INSTALL_CONF) ./files/nut_server $(1)/etc/config/nut_server
  64. ln -sf /var/etc/nut/nut.conf $(1)/etc/nut/nut.conf
  65. ln -sf /var/etc/nut/ups.conf $(1)/etc/nut/ups.conf
  66. ln -sf /var/etc/nut/upsd.users $(1)/etc/nut/upsd.users
  67. ln -sf /var/etc/nut/upsd.conf $(1)/etc/nut/upsd.conf
  68. endef
  69. define Package/nut-common
  70. $(call Package/nut/Default)
  71. TITLE+= (common)
  72. DEPENDS:= nut \
  73. +NUT_DRIVER_SNMP:libnetsnmp \
  74. +NUT_DRIVER_USB:libusb-compat \
  75. +NUT_SSL:libopenssl \
  76. +PACKAGE_libwrap:libwrap
  77. endef
  78. define Package/nut-common/description
  79. $(call Package/nut/description/Default)
  80. This package contains the common files.
  81. endef
  82. define Package/nut-common/install
  83. $(INSTALL_DIR) $(1)/etc/nut
  84. $(INSTALL_DIR) $(1)/usr/lib
  85. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libupsclient.so* $(1)/usr/lib/
  86. ln -sf /var/etc/nut/nut.conf $(1)/etc/nut/nut.conf
  87. endef
  88. define Package/nut-server
  89. $(call Package/nut/Default)
  90. TITLE+= (server)
  91. DEPENDS:=nut +nut-common
  92. endef
  93. define Package/nut-server/description
  94. $(call Package/nut/description/Default)
  95. upsd is responsible for serving the data from the drivers to the
  96. clients. It connects to each driver and maintains a local cache of the
  97. current state. Queries from the clients are served from this cache, so
  98. delays are minimal. This program is essential, and must be running at
  99. all times to actually make any use out of the drivers and clients.
  100. endef
  101. define Package/nut-server/conffiles
  102. /etc/config/nut_server
  103. endef
  104. define Package/nut-upsmon
  105. $(call Package/nut/Default)
  106. TITLE+= (monitor)
  107. DEPENDS:=nut +nut-common
  108. USERID:=nut=113:nut=113
  109. endef
  110. define Package/nut-upsmon/description
  111. $(call Package/nut/description/Default)
  112. upsmon is the client process that is responsible for the most important
  113. part of UPS monitoring--shutting down the system when the power goes
  114. out. It can call out to other helper programs for notification purposes
  115. during power events. upsmon can monitor multiple systems using a single
  116. process. Every UPS that is defined in the upsmon.conf configuration file
  117. is assigned a power value and a type (slave or master).
  118. endef
  119. define Package/nut-upsmon/conffiles
  120. /etc/config/nut_monitor
  121. endef
  122. define Package/nut-upsmon/install
  123. $(INSTALL_DIR) $(1)/etc/nut
  124. $(INSTALL_DIR) $(1)/usr/sbin
  125. $(INSTALL_DIR) $(1)/etc/init.d
  126. $(INSTALL_BIN) ./files/nut-monitor.init $(1)/etc/init.d/nut-monitor
  127. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/upsmon $(1)/usr/sbin/
  128. $(INSTALL_DIR) $(1)/etc/config
  129. $(INSTALL_CONF) ./files/nut_monitor $(1)/etc/config/nut_monitor
  130. ln -sf /var/etc/nut/upsmon.conf $(1)/etc/nut/upsmon.conf
  131. endef
  132. define Package/nut-upsmon-sendmail-notify
  133. $(call Package/nut/Default)
  134. TITLE+= (upsmon with notifications via sendmail)
  135. DEPENDS:=nut +nut-upsmon
  136. CONFLICTS:=nut-upssched
  137. endef
  138. define Package/nut-upsmon-sendmail-notify/description
  139. $(call Package/nut/description/Default)
  140. upsmon with default notification via sendmail
  141. endef
  142. define Package/nut-upsmon-sendmail-notify/install
  143. $(INSTALL_DIR) $(1)/usr/bin $(1)/etc/uci-defaults
  144. $(INSTALL_BIN) ./files/nut-sendmail-notify $(1)/usr/bin/
  145. $(INSTALL_DATA) ./files/nut-sendmail-notify.default $(1)/etc/uci-defaults/nut-sendmail-notify
  146. endef
  147. define Package/nut-upsc
  148. $(call Package/nut/Default)
  149. TITLE+= (upsc command)
  150. DEPENDS:=nut +nut-common
  151. endef
  152. define Package/nut-upsc/description
  153. $(call Package/nut/description/Default)
  154. upsc is provided as a quick way to poll the status of a UPS server. It
  155. can be used inside shell scripts and other programs that need UPS data
  156. but don not want to include the full interface.
  157. endef
  158. define Package/nut-upsc/install
  159. $(INSTALL_DIR) $(1)/usr/bin
  160. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/upsc $(1)/usr/bin
  161. endef
  162. define Package/nut-upslog
  163. $(call Package/nut/Default)
  164. TITLE+= (logging client)
  165. DEPENDS:=nut +nut-common
  166. endef
  167. define Package/nut-upslog/description
  168. $(call Package/nut/description/Default)
  169. upslog is a daemon that will poll a UPS at periodic intervals, fetch the
  170. variables that interest you, format them, and write them to a file.
  171. endef
  172. define Package/nut-upslog/install
  173. $(INSTALL_DIR) $(1)/usr/bin
  174. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/upslog $(1)/usr/bin/
  175. endef
  176. define Package/nut-upscmd
  177. $(call Package/nut/Default)
  178. TITLE+= (controller)
  179. DEPENDS:=nut +nut-common
  180. endef
  181. define Package/nut-upscmd/description
  182. $(call Package/nut/description/Default)
  183. upscmd allows you to invoke "instant commands" in your UPS hardware. Not
  184. all hardware supports this, so check the list with -l to see if anything
  185. will work on your equipment. On hardware that supports it, you can use
  186. this program to start and stop battery tests, invoke a front panel test
  187. (beep!), turn the load on or off, and more.
  188. endef
  189. define Package/nut-upscmd/install
  190. $(INSTALL_DIR) $(1)/usr/bin
  191. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/upscmd $(1)/usr/bin/
  192. endef
  193. define Package/nut-upsrw
  194. $(call Package/nut/Default)
  195. TITLE+= (variable editor)
  196. DEPENDS:=nut +nut-common
  197. endef
  198. define Package/nut-upsrw/description
  199. $(call Package/nut/description/Default)
  200. upsrw allows you to view and change the read/write variables inside your
  201. UPS. It sends commands via the upsd to your driver, which configures the
  202. hardware for you. The list of variables that allow you to change their
  203. values is based on the capabilities of your UPS equipment. Not all
  204. models support this feature. Typically, cheaper hardware does not
  205. support any of them.
  206. endef
  207. define Package/nut-upsrw/install
  208. $(INSTALL_DIR) $(1)/usr/bin
  209. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/upsrw $(1)/usr/bin/
  210. endef
  211. define Package/nut-upssched
  212. $(call Package/nut/Default)
  213. TITLE+= (helper for triggering events from upsmon)
  214. DEPENDS:=nut +nut-common +nut-upsmon
  215. endef
  216. define Package/nut-upssched/description
  217. $(call Package/nut/description/Default)
  218. upssched was created to allow users to execute programs at times relative
  219. to events being monitored by upsmon. The original purpose was to allow
  220. for a shutdown to occur after some fixed period on battery, but there are
  221. other uses that are possible.
  222. You can alternatively write your own script and save some space.
  223. endef
  224. define Package/nut-upssched/conffiles
  225. /etc/nut/upssched.conf
  226. endef
  227. define Package/nut-upssched/install
  228. $(INSTALL_DIR) $(1)/usr/bin
  229. $(INSTALL_DIR) $(1)/usr/sbin
  230. $(INSTALL_DIR) $(1)/etc/nut
  231. $(INSTALL_DIR) $(1)/etc/uci-defaults
  232. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/upssched-cmd $(1)/usr/bin/
  233. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/upssched $(1)/usr/sbin/
  234. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/nut/upssched.conf.sample $(1)/etc/nut/upssched.conf
  235. $(INSTALL_DATA) ./files/nut-sched.default $(1)/etc/uci-defaults/nut-upssched
  236. endef
  237. define Package/nut-web-cgi
  238. $(call Package/nut/Default)
  239. TITLE+= Web CGI interface
  240. DEPENDS:=nut +nut-common +libgd
  241. endef
  242. define Package/nut-web-cgi/description
  243. The CGI programs are clients that run through your web server.
  244. They allow you to see UPS status and perform certain administrative
  245. commands from any web browser. Javascript and cookies are not required.
  246. endef
  247. define Package/nut-web-cgi/conffiles
  248. /etc/nut/hosts.conf
  249. /etc/nut/upsset.conf
  250. /etc/nut/upsstats.html
  251. /etc/nut/upsstats-single.html
  252. /etc/config/nut_cgi
  253. /etc/httpd.conf
  254. endef
  255. define Package/nut-web-cgi/install
  256. $(INSTALL_DIR) $(1)/www/cgi-bin/nut $(1)/www/nut
  257. $(INSTALL_DIR) $(1)/etc/nut
  258. $(CP) $(PKG_INSTALL_DIR)/usr/html/* $(1)/www/nut/
  259. $(INSTALL_DIR) $(1)/etc/uci-defaults
  260. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/cgi-bin/* $(1)/www/cgi-bin/nut
  261. $(INSTALL_CONF) ./files/add_nut_httpd_conf $(1)/etc/uci-defaults/add_nut_httpd_conf
  262. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/nut/upsstats.html.sample $(1)/etc/nut/upsstats.html
  263. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/nut/upsstats-single.html.sample $(1)/etc/nut/upsstats-single.html
  264. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/nut/upsset.conf.sample $(1)/etc/nut/upsset.conf
  265. $(INSTALL_DIR) $(1)/etc/config
  266. $(INSTALL_CONF) ./files/nut_cgi $(1)/etc/config/nut_cgi
  267. $(INSTALL_DIR) $(1)/etc/init.d
  268. $(INSTALL_BIN) ./files/nut-cgi.init $(1)/etc/init.d/nut-cgi
  269. ln -sf /var/etc/nut/hosts.conf $(1)/etc/nut/hosts.conf
  270. endef
  271. define Package/nut-avahi-service
  272. $(call Package/nut/Default)
  273. TITLE+= (Avahi service)
  274. DEPENDS:=nut +avahi-daemon
  275. endef
  276. define Package/nut-avahi-service/description
  277. This package contains the service definition for announcing the
  278. attached UPS via mDNS/DNS-SD.
  279. endef
  280. define Package/nut-avahi-service/conffiles
  281. /etc/avahi/services/nut.service
  282. endef
  283. define Package/nut-avahi-service/install
  284. $(INSTALL_DIR) $(1)/etc/avahi/services
  285. $(INSTALL_CONF) ./files/nut.service $(1)/etc/avahi/services/
  286. endef
  287. # Dealing with all of the drivers is very repetitive, but the previous
  288. # maintainer had a neat solution which just needed some tweaking.
  289. define DriverPackage
  290. define Package/nut-driver-$(2)
  291. $(call Package/nut/Default)
  292. TITLE:=$(2) (NUT $(1) driver)
  293. DEPENDS:=nut +nut-common
  294. $(if $(filter $(1),snmp),DEPENDS+= @NUT_DRIVER_SNMP)
  295. $(if $(filter $(1),usb),DEPENDS+= @NUT_DRIVER_USB)
  296. $(if $(filter $(1),serial),DEPENDS+= @NUT_DRIVER_SERIAL)
  297. endef
  298. # Deliberately empty description in order to trigger a build failure.
  299. # It should be overridden by the list below, and when updating to a
  300. # new version of nut we will need to provide descriptions for any new
  301. # drivers.
  302. define Package/nut-driver-$(2)/description
  303. endef
  304. define Package/nut-driver-$(2)/install
  305. $(INSTALL_DIR) $$(1)/lib/nut
  306. $(CP) $$(PKG_INSTALL_DIR)/lib/nut/$(2) $$(1)/lib/nut/
  307. $(if $(filter $(2),clone),$(CP) $$(PKG_INSTALL_DIR)/lib/nut/$(2)-outlet $$(1)/lib/nut/)
  308. endef
  309. endef
  310. define DriverDescription
  311. define Package/nut-driver-$(2)/description
  312. $(3)
  313. endef
  314. endef
  315. # These lists are lifted *directly* from drivers/Makefile.am in the nut
  316. # source tree. This it to make it simpler to keep in sync when updating
  317. # to a newer version of nut. Do not edit this manually.
  318. #
  319. # DO NOT EDIT (except to update with a fresh cut/paste)!
  320. SERIAL_DRIVERLIST = al175 bcmxcp belkin belkinunv bestfcom \
  321. bestfortress bestuferrups bestups dummy-ups etapro everups \
  322. gamatronic genericups isbmex liebert liebert-esp2 masterguard metasys \
  323. oldmge-shut mge-utalk microdowell mge-shut oneac optiups powercom rhino \
  324. safenet skel solis tripplite tripplitesu upscode2 victronups powerpanel \
  325. blazer_ser clone clone-outlet ivtscd apcsmart apcsmart-old apcupsd-ups riello_ser \
  326. nutdrv_qx
  327. SNMP_DRIVERLIST = snmp-ups
  328. USB_LIBUSB_DRIVERLIST = usbhid-ups bcmxcp_usb tripplite_usb \
  329. blazer_usb richcomm_usb riello_usb \
  330. nutdrv_atcl_usb \
  331. nutdrv_qx
  332. # END: DO NOT EDIT!
  333. SERIAL_DRIVERLIST_IGNORE:=skel clone-outlet nutdrv_qx
  334. # nutdrv_qx can be either USB or serial. Given most routers have USB
  335. # instead of serial ports, and not wanting two identical packages with
  336. # different names that conflict with each other, only the option for the
  337. # driver with USB bindings is provided. If you really want to save that
  338. # tiny bit of space and build it without USB support, remove nutdrv_qx
  339. # from the previous line.
  340. $(foreach d,$(filter-out $(SERIAL_DRIVERLIST_IGNORE),$(SERIAL_DRIVERLIST)),$(eval $(call DriverPackage,serial,$(d))))
  341. $(foreach d,$(SNMP_DRIVERLIST),$(eval $(call DriverPackage,snmp,$(d))))
  342. $(foreach d,$(USB_LIBUSB_DRIVERLIST),$(eval $(call DriverPackage,usb,$(d))))
  343. $(eval $(call DriverDescription,serial,al175,\
  344. Driver for Eltek UPS models with AL175 alarm module))
  345. $(eval $(call DriverDescription,serial,bcmxcp,\
  346. Driver for UPSes supporting the serial BCM/XCP protocol))
  347. $(eval $(call DriverDescription,serial,belkin,\
  348. Driver for Belkin serial UPS equipment))
  349. $(eval $(call DriverDescription,serial,belkinunv,\
  350. Driver for Belkin "Universal UPS" and compatible))
  351. $(eval $(call DriverDescription,serial,bestfcom,\
  352. Driver for Best Power Fortress/Ferrups))
  353. $(eval $(call DriverDescription,serial,bestfortress,\
  354. Driver for old Best Fortress UPS equipment))
  355. $(eval $(call DriverDescription,serial,bestuferrups,\
  356. Driver for Best Power Micro-Ferrups))
  357. $(eval $(call DriverDescription,serial,bestups,\
  358. Driver for Best Power / SOLA (Phoenixtec protocol) UPS equipment))
  359. $(eval $(call DriverDescription,serial,dummy-ups,\
  360. Driver for multi-purpose UPS emulation))
  361. $(eval $(call DriverDescription,serial,etapro,\
  362. Driver for ETA UPS equipment))
  363. $(eval $(call DriverDescription,serial,everups,\
  364. Driver for Ever UPS models))
  365. $(eval $(call DriverDescription,serial,gamatronic,\
  366. Driver for Gamatronic UPS equipment))
  367. $(eval $(call DriverDescription,serial,genericups,\
  368. Driver for contact-closure UPS equipment))
  369. $(eval $(call DriverDescription,serial,isbmex,\
  370. Driver for ISBMEX UPS equipment))
  371. $(eval $(call DriverDescription,serial,liebert,\
  372. Driver for Liebert contact-closure UPS equipment))
  373. $(eval $(call DriverDescription,serial,liebert-esp2,\
  374. Driver for Liebert UPS, using the ESP-II serial protocol))
  375. $(eval $(call DriverDescription,serial,masterguard,\
  376. Driver for Masterguard UPS equipment))
  377. $(eval $(call DriverDescription,serial,metasys,\
  378. Driver for Meta System UPS equipment))
  379. $(eval $(call DriverDescription,serial,oldmge-shut,\
  380. Driver for SHUT Protocol UPS equipment, deprecated, use mge-shut))
  381. $(eval $(call DriverDescription,serial,mge-utalk,\
  382. Driver for MGE UPS SYSTEMS UTalk protocol equipment))
  383. $(eval $(call DriverDescription,serial,microdowell,\
  384. Driver for Microdowell Enterprise UPS series))
  385. $(eval $(call DriverDescription,serial,mge-shut,\
  386. Driver for SHUT Protocol UPS equipment))
  387. $(eval $(call DriverDescription,serial,oneac,\
  388. Driver for Oneac UPS equipment))
  389. $(eval $(call DriverDescription,serial,optiups,\
  390. Driver for Opti-UPS (Viewsonic) UPS and Zinto D (ONLINE-USV) equipment))
  391. $(eval $(call DriverDescription,serial,powercom,\
  392. Driver for serial Powercom/Trust/Advice UPS equipment))
  393. $(eval $(call DriverDescription,serial,rhino,\
  394. Driver for Brazilian Microsol RHINO UPS equipment))
  395. $(eval $(call DriverDescription,serial,safenet,\
  396. Driver for SafeNet compatible UPS equipment))
  397. $(eval $(call DriverDescription,serial,solis,\
  398. Driver for Brazilian Microsol SOLIS UPS equipment))
  399. $(eval $(call DriverDescription,serial,tripplite,\
  400. Driver for Tripp-Lite SmartPro UPS equipment))
  401. $(eval $(call DriverDescription,serial,tripplitesu,\
  402. Driver for Tripp-Lite SmartOnline (SU) UPS equipment))
  403. $(eval $(call DriverDescription,serial,upscode2,\
  404. Driver for UPScode II compatible UPS equipment))
  405. $(eval $(call DriverDescription,serial,victronups,\
  406. Driver for IMV/Victron UPS unit Match, Match Lite, NetUps))
  407. $(eval $(call DriverDescription,serial,powerpanel,\
  408. Driver for PowerPanel Plus compatible UPS equipment))
  409. $(eval $(call DriverDescription,serial,blazer_ser,\
  410. Driver for Megatec/Q1 protocol serial based UPS equipment))
  411. $(eval $(call DriverDescription,serial,clone,\
  412. UPS driver clone))
  413. $(eval $(call DriverDescription,serial,ivtscd,\
  414. Driver for the IVT Solar Controller Device))
  415. $(eval $(call DriverDescription,serial,apcsmart,\
  416. Driver for American Power Conversion Smart Protocol UPS equipment))
  417. $(eval $(call DriverDescription,serial,apcsmart-old,\
  418. Driver for American Power Conversion Smart Protocol UPS equipment))
  419. $(eval $(call DriverDescription,serial,apcupsd-ups,\
  420. Driver for apcupsd client access))
  421. $(eval $(call DriverDescription,serial,riello_ser,\
  422. Driver for Riello UPS Protocol UPS equipment))
  423. $(eval $(call DriverDescription,snmp,snmp-ups,\
  424. Multi-MIB Driver for SNMP UPS equipment))
  425. $(eval $(call DriverDescription,usb,usbhid-ups,\
  426. Driver for USB/HID UPS equipment))
  427. $(eval $(call DriverDescription,usb,bcmxcp_usb,\
  428. Experimental driver for UPSes supporting the BCM/XCP protocol over USB))
  429. $(eval $(call DriverDescription,usb,tripplite_usb,\
  430. Driver for older Tripp Lite USB UPSes (not PDC HID)))
  431. $(eval $(call DriverDescription,usb,blazer_usb,\
  432. Driver for Megatec/Q1 protocol USB based UPS equipment))
  433. $(eval $(call DriverDescription,usb,richcomm_usb,\
  434. Driver for UPS equipment using Richcomm dry-contact to USB solution))
  435. $(eval $(call DriverDescription,usb,riello_usb,\
  436. Driver for Riello UPS Protocol UPS equipment via USB))
  437. $(eval $(call DriverDescription,usb,nutdrv_atcl_usb,\
  438. Driver for ATCL FOR UPS equipment))
  439. $(eval $(call DriverDescription,usb,nutdrv_qx,\
  440. Driver for Q* protocol serial and USB based UPS equipment))
  441. CONFIGURE_ARGS += \
  442. --sysconfdir=/etc/nut \
  443. --datadir=/usr/share/nut \
  444. --with-dev \
  445. --$(if $(CONFIG_NUT_DRIVER_USB),with,without)-usb \
  446. --without-avahi \
  447. --$(if $(CONFIG_NUT_DRIVER_SNMP),with,without)-snmp \
  448. --$(if $(CONFIG_NUT_DRIVER_SERIAL),with,without)-serial \
  449. --without-neon \
  450. --without-powerman \
  451. --without-wrap \
  452. --with-cgi \
  453. --without-ipmi \
  454. --without-freeipmi \
  455. --$(if $(CONFIG_NUT_SSL),with,without)-ssl $(if $(CONFIG_NUT_SSL),--with-openssl) \
  456. --without-libltdl \
  457. --with-statepath=/var/run/nut \
  458. --with-drvpath=/lib/nut \
  459. --with-user=root \
  460. --with-group=root
  461. define Build/InstallDev
  462. $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib/pkgconfig
  463. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/
  464. $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
  465. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig/
  466. endef
  467. $(eval $(call BuildPackage,nut))
  468. $(eval $(call BuildPackage,nut-common))
  469. $(eval $(call BuildPackage,nut-server))
  470. $(eval $(call BuildPackage,nut-upsmon))
  471. $(eval $(call BuildPackage,nut-upsmon-sendmail-notify))
  472. $(eval $(call BuildPackage,nut-upsc))
  473. $(eval $(call BuildPackage,nut-upscmd))
  474. $(eval $(call BuildPackage,nut-upslog))
  475. $(eval $(call BuildPackage,nut-upsrw))
  476. $(eval $(call BuildPackage,nut-upssched))
  477. $(eval $(call BuildPackage,nut-web-cgi))
  478. $(eval $(call BuildPackage,nut-avahi-service))
  479. $(foreach d,$(filter-out $(SERIAL_DRIVERLIST_IGNORE),$(SERIAL_DRIVERLIST)),$(eval $(call BuildPackage,nut-driver-$(d))))
  480. $(foreach d,$(SNMP_DRIVERLIST),$(eval $(call BuildPackage,nut-driver-$(d))))
  481. $(foreach d,$(USB_LIBUSB_DRIVERLIST),$(eval $(call BuildPackage,nut-driver-$(d))))