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_MD5SUM
:=c291d9d3923b4d9c0e600b755ad4f489
22 include $(INCLUDE_DIR
)/package.mk
24 define Package
/apcupsd
27 DEPENDS
:=+libpthread
+libusb-compat
28 TITLE
:=UPS control software
29 URL
:=http
://www.apcupsd.org
/
32 define Build
/Configure
33 $(CP
) $(SCRIPT_DIR
)/config.
* $(PKG_BUILD_DIR
)/autoconf
/
34 $(call Build
/Configure
/Default
, \
35 --with-distname
=unknown \
36 --sysconfdir
=/etc
/apcupsd \
43 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
44 DESTDIR
="$(PKG_INSTALL_DIR)" \
49 define Package
/apcupsd
/install
50 $(INSTALL_DIR
) $(1)/usr
/sbin
51 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/apcupsd
$(1)/usr
/sbin
/
52 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/smtp
$(1)/usr
/sbin
/
53 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/apctest
$(1)/usr
/sbin
/
54 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/apcaccess
$(1)/usr
/sbin
/
55 $(INSTALL_DIR
) $(1)/etc
/apcupsd
56 $(INSTALL_CONF
) .
/files
/apcupsd.conf
$(1)/etc
/apcupsd
/
57 $(INSTALL_CONF
) .
/files
/apcupsd_mail.conf
$(1)/etc
/apcupsd
/
58 $(INSTALL_BIN
) .
/files
/changeme
$(1)/etc
/apcupsd
/
59 $(INSTALL_BIN
) .
/files
/commfailure
$(1)/etc
/apcupsd
/
60 $(INSTALL_BIN
) .
/files
/commok
$(1)/etc
/apcupsd
/
61 $(INSTALL_BIN
) .
/files
/offbattery
$(1)/etc
/apcupsd
/
62 $(INSTALL_BIN
) .
/files
/onbattery
$(1)/etc
/apcupsd
/
63 $(INSTALL_BIN
) .
/files
/apccontrol
$(1)/etc
/apcupsd
/
64 $(INSTALL_DIR
) $(1)/etc
/init.d
65 $(INSTALL_BIN
) .
/files
/apcupsd.init
$(1)/etc
/init.d
/apcupsd
68 define Package
/apcupsd
/conffiles
69 /etc
/apcupsd
/apcupsd.conf
70 /etc
/apcupsd
/apcupsd_mail.conf
72 /etc
/apcupsd
/commfailure
74 /etc
/apcupsd
/offbattery
75 /etc
/apcupsd
/onbattery
78 $(eval
$(call BuildPackage
,apcupsd
))