[package] add nzbgetweb (#5946)
[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
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/apcupsd
21 SECTION:=utils
22 CATEGORY:=Utilities
23 DEPENDS:=+libpthread
24 TITLE:=UPS control software
25 URL:=http://www.apcupsd.org/
26 endef
27
28 define Build/Configure
29 $(CP) $(SCRIPT_DIR)/config.* $(PKG_BUILD_DIR)/autoconf/
30 $(call Build/Configure/Default, \
31 --with-distname=unknown \
32 --sysconfdir=/etc/apcupsd \
33 )
34 endef
35
36 define Build/Compile
37 $(MAKE) -C $(PKG_BUILD_DIR) \
38 DESTDIR="$(PKG_INSTALL_DIR)" \
39 LD="$(TARGET_CC)" \
40 all install
41 endef
42
43 define Package/apcupsd/install
44 $(INSTALL_DIR) $(1)/usr/sbin
45 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/apcupsd $(1)/usr/sbin/
46 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/smtp $(1)/usr/sbin/
47 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/apctest $(1)/usr/sbin/
48 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/apcaccess $(1)/usr/sbin/
49 $(INSTALL_DIR) $(1)/etc/apcupsd
50 $(INSTALL_CONF) ./files/apcupsd.conf $(1)/etc/apcupsd/
51 $(INSTALL_CONF) ./files/apcupsd_mail.conf $(1)/etc/apcupsd/
52 $(INSTALL_BIN) ./files/changeme $(1)/etc/apcupsd/
53 $(INSTALL_BIN) ./files/commfailure $(1)/etc/apcupsd/
54 $(INSTALL_BIN) ./files/commok $(1)/etc/apcupsd/
55 $(INSTALL_BIN) ./files/offbattery $(1)/etc/apcupsd/
56 $(INSTALL_BIN) ./files/onbattery $(1)/etc/apcupsd/
57 $(INSTALL_BIN) ./files/apccontrol $(1)/etc/apcupsd/
58 $(INSTALL_DIR) $(1)/etc/init.d
59 $(INSTALL_BIN) ./files/apcupsd.init $(1)/etc/init.d/apcupsd
60 endef
61
62 $(eval $(call BuildPackage,apcupsd))