fix click compile
[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 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=nsca
11 PKG_VERSION:=2.6
12 PKG_RELEASE:=1
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
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 include $(INCLUDE_DIR)/package.mk
21
22 define Package/send-nsca
23 SECTION:=net
24 CATEGORY:=Network
25 DEPENDS:=+libmcrypt
26 TITLE:=Nagios Service Check Acceptor (NSCA) client
27 DESCRIPTION:=Nagios Service Check Acceptor (NSCA) client.
28 URL:=http://www.nagios.org/
29 endef
30
31 define Package/send-nsca/conffiles
32 /etc/send_nsca.cfg
33 endef
34
35 define Build/Configure
36 (cd $(PKG_BUILD_DIR); rm -f config.cache; \
37 $(TARGET_CONFIGURE_OPTS) \
38 CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
39 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
40 ./configure \
41 --target=$(GNU_TARGET_NAME) \
42 --host=$(GNU_TARGET_NAME) \
43 --build=$(GNU_HOST_NAME) \
44 --program-prefix="" \
45 --program-suffix="" \
46 --prefix=/usr \
47 --exec-prefix=/usr \
48 --bindir=/usr/bin \
49 --datadir=/usr/share \
50 --includedir=/usr/include \
51 --infodir=/usr/share/info \
52 --libdir=/usr/lib \
53 --libexecdir=/usr/lib \
54 --localstatedir=/var \
55 --mandir=/usr/share/man \
56 --sbindir=/usr/sbin \
57 --sysconfdir=/etc \
58 $(DISABLE_LARGEFILE) \
59 $(DISABLE_NLS) \
60 --with-libmcrypt-prefix="$(STAGING_DIR)/usr" \
61 );
62 endef
63
64 define Build/Compile
65 $(MAKE) -C $(PKG_BUILD_DIR) \
66 send_nsca
67 endef
68
69 define Package/send-nsca/install
70 install -d -m0755 $(1)/etc
71 install -m0600 $(PKG_BUILD_DIR)/sample-config/send_nsca.cfg $(1)/etc/
72 install -d -m0755 $(1)/usr/sbin
73 install -m0755 $(PKG_BUILD_DIR)/src/send_nsca $(1)/usr/sbin/
74 endef
75
76 $(eval $(call BuildPackage,send-nsca))