|
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
9
|
9
|
|
10
|
10
|
PKG_NAME:=apcupsd
|
11
|
11
|
PKG_VERSION:=3.14.13
|
12
|
|
-PKG_RELEASE:=2
|
|
12
|
+PKG_RELEASE:=3
|
13
|
13
|
|
14
|
14
|
PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
|
15
|
15
|
PKG_LICENSE:=GPL-2.0
|
|
@@ -19,21 +19,32 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
19
|
19
|
PKG_SOURCE_URL:=@SF/apcupsd
|
20
|
20
|
PKG_MD5SUM:=c291d9d3923b4d9c0e600b755ad4f489
|
21
|
21
|
|
|
22
|
+PKG_BUILD_DEPENDS:=libgd
|
|
23
|
+
|
22
|
24
|
include $(INCLUDE_DIR)/package.mk
|
23
|
25
|
|
24
|
26
|
define Package/apcupsd
|
25
|
|
- SECTION:=utils
|
26
|
|
- CATEGORY:=Utilities
|
27
|
|
- DEPENDS:=+libpthread +libusb-compat
|
|
27
|
+ SECTION:=net
|
|
28
|
+ CATEGORY:=Network
|
|
29
|
+ DEPENDS:=+libpthread
|
28
|
30
|
TITLE:=UPS control software
|
29
|
31
|
URL:=http://www.apcupsd.org/
|
30
|
32
|
endef
|
31
|
33
|
|
|
34
|
+define Package/apcupsd-cgi
|
|
35
|
+ SECTION:=net
|
|
36
|
+ CATEGORY:=Network
|
|
37
|
+ DEPENDS:=+libpthread +libgd
|
|
38
|
+ TITLE:=UPS control software CGI module
|
|
39
|
+ URL:=http://www.apcupsd.org/
|
|
40
|
+endef
|
|
41
|
+
|
32
|
42
|
define Build/Configure
|
33
|
43
|
$(CP) $(SCRIPT_DIR)/config.* $(PKG_BUILD_DIR)/autoconf/
|
34
|
44
|
$(call Build/Configure/Default, \
|
35
|
45
|
--with-distname=unknown \
|
36
|
46
|
--sysconfdir=/etc/apcupsd \
|
|
47
|
+ --enable-cgi \
|
37
|
48
|
--enable-usb \
|
38
|
49
|
--without-x \
|
39
|
50
|
)
|
|
@@ -65,6 +76,17 @@ define Package/apcupsd/install
|
65
|
76
|
$(INSTALL_BIN) ./files/apcupsd.init $(1)/etc/init.d/apcupsd
|
66
|
77
|
endef
|
67
|
78
|
|
|
79
|
+define Package/apcupsd-cgi/install
|
|
80
|
+ $(INSTALL_DIR) $(1)/www/cgi-bin/apcupsd
|
|
81
|
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/etc/apcupsd/multimon.cgi $(1)/www/cgi-bin/apcupsd
|
|
82
|
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/etc/apcupsd/upsfstats.cgi $(1)/www/cgi-bin/apcupsd
|
|
83
|
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/etc/apcupsd/upsimage.cgi $(1)/www/cgi-bin/apcupsd
|
|
84
|
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/etc/apcupsd/upsstats.cgi $(1)/www/cgi-bin/apcupsd
|
|
85
|
+ $(INSTALL_DIR) $(1)/etc/apcupsd
|
|
86
|
+ $(INSTALL_CONF) ./files/apcupsd.css $(1)/etc/apcupsd/
|
|
87
|
+ $(INSTALL_CONF) ./files/hosts.conf $(1)/etc/apcupsd/
|
|
88
|
+endef
|
|
89
|
+
|
68
|
90
|
define Package/apcupsd/conffiles
|
69
|
91
|
/etc/apcupsd/apcupsd.conf
|
70
|
92
|
/etc/apcupsd/apcupsd_mail.conf
|
|
@@ -75,4 +97,10 @@ define Package/apcupsd/conffiles
|
75
|
97
|
/etc/apcupsd/onbattery
|
76
|
98
|
endef
|
77
|
99
|
|
|
100
|
+define Package/apcupsd-cgi/conffiles
|
|
101
|
+/etc/apcupsd/apcupsd.css
|
|
102
|
+/etc/apcupsd/hosts.conf
|
|
103
|
+endef
|
|
104
|
+
|
78
|
105
|
$(eval $(call BuildPackage,apcupsd))
|
|
106
|
+$(eval $(call BuildPackage,apcupsd-cgi))
|