replace lots of manual install commands with INSTALL_* variables
[openwrt/svn-archive/archive.git] / net / nsca / 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 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=nsca
12 PKG_VERSION:=2.6
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/nagios
17 PKG_MD5SUM:=d526a3ac3c29648c729c5fb4fb332488
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/send-nsca
25 SECTION:=net
26 CATEGORY:=Network
27 DEPENDS:=+libmcrypt
28 TITLE:=Nagios Service Check Acceptor (NSCA) client
29 URL:=http://www.nagios.org/
30 endef
31
32 define Package/send-nsca/conffiles
33 /etc/send_nsca.cfg
34 endef
35
36 define Build/Configure
37 $(call Build/Configure/Default, \
38 --with-libmcrypt-prefix="$(STAGING_DIR)/usr" \
39 , \
40 CFLAGS="$$$$CFLAGS $$$$CPPFLAGS" \
41 )
42 endef
43
44 define Build/Compile
45 $(MAKE) -C $(PKG_BUILD_DIR) \
46 send_nsca
47 endef
48
49 define Package/send-nsca/install
50 $(INSTALL_DIR) $(1)/etc
51 install -m0600 $(PKG_BUILD_DIR)/sample-config/send_nsca.cfg $(1)/etc/
52 $(INSTALL_DIR) $(1)/usr/sbin
53 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/send_nsca $(1)/usr/sbin/
54 endef
55
56 $(eval $(call BuildPackage,send-nsca))