nuke $Id$ in /packages as well
[openwrt/svn-archive/archive.git] / net / apcupsd / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=apcupsd
11 PKG_VERSION:=3.14.2
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SF/apcupsd
16 PKG_MD5SUM:=fd8785e7607d20cefa68dc20e44eebc4
17 PKG_CAT:=zcat
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/apcupsd
22 SECTION:=utils
23 CATEGORY:=Utilities
24 DEPENDS:=+libpthread
25 TITLE:=UPS control software
26 URL:=http://www.apcupsd.org/
27 endef
28
29 define Build/Configure
30 $(CP) $(SCRIPT_DIR)/config.* $(PKG_BUILD_DIR)/autoconf/
31 $(call Build/Configure/Default, \
32 --with-distname=unknown \
33 --sysconfdir=/etc/apcupsd \
34 )
35 endef
36
37 define Build/Compile
38 $(MAKE) -C $(PKG_BUILD_DIR) \
39 DESTDIR="$(PKG_INSTALL_DIR)" \
40 LD="$(TARGET_CC)" \
41 all install
42 endef
43
44 define Package/apcupsd/install
45 $(INSTALL_DIR) $(1)/usr/sbin
46 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/apcupsd $(1)/usr/sbin/
47 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/smtp $(1)/usr/sbin/
48 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/apctest $(1)/usr/sbin/
49 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/apcaccess $(1)/usr/sbin/
50 $(INSTALL_DIR) $(1)/etc/apcupsd
51 $(INSTALL_CONF) ./files/apcupsd.conf $(1)/etc/apcupsd/
52 $(INSTALL_CONF) ./files/apcupsd_mail.conf $(1)/etc/apcupsd/
53 $(INSTALL_BIN) ./files/changeme $(1)/etc/apcupsd/
54 $(INSTALL_BIN) ./files/commfailure $(1)/etc/apcupsd/
55 $(INSTALL_BIN) ./files/commok $(1)/etc/apcupsd/
56 $(INSTALL_BIN) ./files/offbattery $(1)/etc/apcupsd/
57 $(INSTALL_BIN) ./files/onbattery $(1)/etc/apcupsd/
58 $(INSTALL_BIN) ./files/apccontrol $(1)/etc/apcupsd/
59 $(INSTALL_DIR) $(1)/etc/init.d
60 $(INSTALL_BIN) ./files/apcupsd.init $(1)/etc/init.d/apcupsd
61 endef
62
63 $(eval $(call BuildPackage,apcupsd))