This patch add cgi programs to apcupsd - data visualization on the web Signed-off-by: Cezary Jackiewicz <[email protected]>
--- Index: feeds/packages/net/apcupsd/Makefile =================================================================== --- feeds/packages/net/apcupsd/Makefile (revision 36754) +++ feeds/packages/net/apcupsd/Makefile (working copy) @@ -9,7 +9,7 @@ PKG_NAME:=apcupsd PKG_VERSION:=3.14.7 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/apcupsd @@ -25,12 +25,21 @@ URL:=http://www.apcupsd.org/ endef +define Package/apcupsd-cgi + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+apcupsd +libgd +uhttpd + TITLE:=UPS control software (CGI) + URL:=http://www.apcupsd.org/ +endef + define Build/Configure $(CP) $(SCRIPT_DIR)/config.* $(PKG_BUILD_DIR)/autoconf/ $(call Build/Configure/Default, \ --with-distname=unknown \ --sysconfdir=/etc/apcupsd \ --enable-usb \ + --enable-cgi \ --without-x \ ) endef @@ -61,6 +70,15 @@ $(INSTALL_BIN) ./files/apcupsd.init $(1)/etc/init.d/apcupsd endef +define Package/apcupsd-cgi/install + $(INSTALL_DIR) $(1)/www/cgi-bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/etc/apcupsd/*.cgi $(1)/www/cgi-bin + $(INSTALL_DIR) $(1)/etc/apcupsd + $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/apcupsd/multimon.conf $(1)/etc/apcupsd/ + $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/apcupsd/apcupsd.css $(1)/etc/apcupsd/ + $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/apcupsd/hosts.conf $(1)/etc/apcupsd/ +endef + define Package/apcupsd/conffiles /etc/apcupsd/apcupsd.conf /etc/apcupsd/apcupsd_mail.conf @@ -72,3 +90,4 @@ endef $(eval $(call BuildPackage,apcupsd)) +$(eval $(call BuildPackage,apcupsd-cgi)) -- Pozdrawiam, Cezary Jackiewicz _______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
