PKG_NAME:=apcupsd
PKG_VERSION:=3.14.13
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
PKG_LICENSE:=GPL-2.0
define Package/apcupsd
SECTION:=net
CATEGORY:=Network
- DEPENDS:=+libpthread
+ DEPENDS:=+libpthread +libusb-compat
TITLE:=UPS control software
URL:=http://www.apcupsd.org/
endef
--sysconfdir=/etc/apcupsd \
--enable-cgi \
--enable-usb \
+ --enable-modbus-usb \
--without-x \
)
endef
define Package/apcupsd-cgi/install
$(INSTALL_DIR) $(1)/www/cgi-bin/apcupsd
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/etc/apcupsd/multimon.cgi $(1)/www/cgi-bin/apcupsd
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/etc/apcupsd/upsfstats.cgi $(1)/www/cgi-bin/apcupsd
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/etc/apcupsd/upsimage.cgi $(1)/www/cgi-bin/apcupsd
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/etc/apcupsd/upsstats.cgi $(1)/www/cgi-bin/apcupsd
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/etc/apcupsd/*.cgi $(1)/www/cgi-bin/apcupsd
$(INSTALL_DIR) $(1)/etc/apcupsd
$(INSTALL_CONF) ./files/apcupsd.css $(1)/etc/apcupsd/
$(INSTALL_CONF) ./files/hosts.conf $(1)/etc/apcupsd/
+ $(INSTALL_CONF) ./files/multimon.conf $(1)/etc/apcupsd/
endef
define Package/apcupsd/conffiles
define Package/apcupsd-cgi/conffiles
/etc/apcupsd/apcupsd.css
/etc/apcupsd/hosts.conf
+/etc/apcupsd/multimon.conf
endef
$(eval $(call BuildPackage,apcupsd))
--- /dev/null
+# Sample multimon configuration file
+#
+# This file is not required. Without it, multimon will use the default
+# field layout.
+#
+# Temperature selection
+#
+# Pick "TEMPC" for Celsius or "TEMPF" for Fahrenheit. This will override
+# the --enable-celsius setting from the compile. UPSTEMP (below) will
+# use this setting by default.
+
+TEMPC
+
+# Format:
+# FIELD <variable> "<field name>" "<field suffix>"
+#
+# <variable> is either a word from the UPS protocol like battchg (see the
+# table in src/cgi/upsfetch.c) or a special word in uppercase.
+#
+# Special words are:
+# MODEL - Show the model name for this system in cyan
+#
+# STATUS - Parse the status for this system using the appropriate color
+#
+# UPSTEMP and AMBTEMP use the default scale. This is set to C if you use
+# --enable-celsius at compile time *or* if you use "TEMPC" above.
+#
+# UPSTEMP - Show the UPS temperature in the default scale (suffix ignored)
+# AMBTEMP - Show the ambient temperature in the default scale (suffix ignored)
+#
+# UPSTEMPC - Show the UPS temperature in degrees C (suffix ignored)
+# UPSTEMPF - Show the UPS temperature in degrees F (suffix ignored)
+# AMBTEMPC - Show the ambient temperature in degrees C (suffix ignored)
+# AMBTEMPF - Show the ambient temperature in degrees F (suffix ignored)
+#
+# They're called "special" since they actually understand the content
+# being printed and do other things based on what's in there.
+#
+# <field name> is what you'd like this column to be called on the page.
+# Remember that this is HTML, so you can actually embed markup in here.
+# This means you can even include images here. You can include quotes
+# (and backslashes!) in the string by escaping them with a backslash (\).
+#
+# <field suffix> is typically something like % or VAC. It's useful if
+# you want to convey the units that apply to a value.
+#
+# Example config
+
+FIELD SYSTEM "System" ""
+FIELD MODEL "Model" ""
+FIELD STATUS "Status" ""
+FIELD battpct "Battery Chg" "%"
+FIELD utility "Utility" "VAC"
+FIELD loadpct "UPS Load" "%"
+FIELD UPSTEMP "UPS Temp" ""
+FIELD runtime "Batt. Run Time" "min."
+FIELD DATA "Data" "All data"
+
+# These are only useful if you have a Smart-UPS model with the Measure-UPS II
+# measurement card. No other models presently support these features.
+#
+# FIELD AMBTEMP "Ambient Temp" ""
+# FIELD HUMIDITY "Ambient Humidity" "%"