2 # Copyright (C) 2006-2015 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_MAINTAINER
:=Othmar Truniger
<github@truniger.ch
>
16 PKG_LICENSE_FILES
:=COPYING
18 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
19 PKG_SOURCE_URL
:=@SF
/apcupsd
20 PKG_HASH
:=db7748559b6b4c3784f9856561ef6ac6199ef7bd019b3edcd7e0a647bf8f9867
22 PKG_BUILD_DEPENDS
:=libgd
24 include $(INCLUDE_DIR
)/package.mk
26 define Package
/apcupsd
29 DEPENDS
:=+libpthread
+libusb-compat
30 TITLE
:=UPS control software
31 URL
:=http
://www.apcupsd.org
/
34 define Package
/apcupsd-cgi
37 DEPENDS
:=+libpthread
+libgd
38 TITLE
:=UPS control software CGI module
39 URL
:=http
://www.apcupsd.org
/
42 CONFIGURE_VARS
+= SHUTDOWN
=/sbin
/halt
44 define Build
/Configure
45 $(CP
) $(SCRIPT_DIR
)/config.
* $(PKG_BUILD_DIR
)/autoconf
/
46 $(call Build
/Configure
/Default
, \
47 --with-distname
=unknown \
48 --sysconfdir
=/etc
/apcupsd \
57 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
58 DESTDIR
="$(PKG_INSTALL_DIR)" \
63 define Package
/apcupsd
/install
64 $(INSTALL_DIR
) $(1)/usr
/sbin
65 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/apcupsd
$(1)/usr
/sbin
/
66 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/smtp
$(1)/usr
/sbin
/
67 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/apctest
$(1)/usr
/sbin
/
68 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/apcaccess
$(1)/usr
/sbin
/
69 $(INSTALL_DIR
) $(1)/etc
/apcupsd
70 $(INSTALL_CONF
) .
/files
/apcupsd.conf
$(1)/etc
/apcupsd
/
71 $(INSTALL_CONF
) .
/files
/apcupsd_mail.conf
$(1)/etc
/apcupsd
/
72 $(INSTALL_BIN
) .
/files
/changeme
$(1)/etc
/apcupsd
/
73 $(INSTALL_BIN
) .
/files
/commfailure
$(1)/etc
/apcupsd
/
74 $(INSTALL_BIN
) .
/files
/commok
$(1)/etc
/apcupsd
/
75 $(INSTALL_BIN
) .
/files
/offbattery
$(1)/etc
/apcupsd
/
76 $(INSTALL_BIN
) .
/files
/onbattery
$(1)/etc
/apcupsd
/
77 $(INSTALL_BIN
) .
/files
/apccontrol
$(1)/etc
/apcupsd
/
78 $(INSTALL_DIR
) $(1)/etc
/init.d
79 $(INSTALL_BIN
) .
/files
/apcupsd.init
$(1)/etc
/init.d
/apcupsd
82 define Package
/apcupsd-cgi
/install
83 $(INSTALL_DIR
) $(1)/www
/cgi-bin
/apcupsd
84 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/etc
/apcupsd
/*.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 $(INSTALL_CONF
) .
/files
/multimon.conf
$(1)/etc
/apcupsd
/
91 define Package
/apcupsd
/conffiles
92 /etc
/apcupsd
/apcupsd.conf
93 /etc
/apcupsd
/apcupsd_mail.conf
95 /etc
/apcupsd
/commfailure
97 /etc
/apcupsd
/offbattery
98 /etc
/apcupsd
/onbattery
101 define Package
/apcupsd-cgi
/conffiles
102 /etc
/apcupsd
/apcupsd.css
103 /etc
/apcupsd
/hosts.conf
104 /etc
/apcupsd
/multimon.conf
107 $(eval
$(call BuildPackage
,apcupsd
))
108 $(eval
$(call BuildPackage
,apcupsd-cgi
))