2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 # $Id: Makefile 6500 2007-03-04 04:19:46Z pavlov $
9 include $(TOPDIR
)/rules.mk
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_SOURCE_URL
:=@SF
/apcupsd
17 PKG_MD5SUM
:=fd8785e7607d20cefa68dc20e44eebc4
20 include $(INCLUDE_DIR
)/package.mk
22 define Package
/apcupsd
26 TITLE
:=UPS control software
27 URL
:=http
://www.apcupsd.org
/
30 define Build
/Configure
31 $(CP
) $(SCRIPT_DIR
)/config.
* $(PKG_BUILD_DIR
)/autoconf
/
32 $(call Build
/Configure
/Default
, \
33 --with-distname
=unknown \
34 --sysconfdir
=/etc
/apcupsd \
39 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
40 DESTDIR
="$(PKG_INSTALL_DIR)" \
45 define Package
/apcupsd
/install
46 $(INSTALL_DIR
) $(1)/usr
/sbin
47 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/apcupsd
$(1)/usr
/sbin
/
48 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/smtp
$(1)/usr
/sbin
/
49 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/apctest
$(1)/usr
/sbin
/
50 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/apcaccess
$(1)/usr
/sbin
/
51 $(INSTALL_DIR
) $(1)/etc
/apcupsd
52 $(INSTALL_CONF
) .
/files
/apcupsd.conf
$(1)/etc
/apcupsd
/
53 $(INSTALL_CONF
) .
/files
/apcupsd_mail.conf
$(1)/etc
/apcupsd
/
54 $(INSTALL_BIN
) .
/files
/changeme
$(1)/etc
/apcupsd
/
55 $(INSTALL_BIN
) .
/files
/commfailure
$(1)/etc
/apcupsd
/
56 $(INSTALL_BIN
) .
/files
/commok
$(1)/etc
/apcupsd
/
57 $(INSTALL_BIN
) .
/files
/offbattery
$(1)/etc
/apcupsd
/
58 $(INSTALL_BIN
) .
/files
/onbattery
$(1)/etc
/apcupsd
/
59 $(INSTALL_BIN
) .
/files
/apccontrol
$(1)/etc
/apcupsd
/
60 $(INSTALL_DIR
) $(1)/etc
/init.d
61 $(INSTALL_BIN
) .
/files
/apcupsd.init
$(1)/etc
/init.d
/apcupsd
64 $(eval
$(call BuildPackage
,apcupsd
))