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.

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