Fix nagios compilation
[openwrt/svn-archive/archive.git] / net / nagios / Makefile
1 #
2 # Copyright (C) 2007 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:=nagios
12 PKG_VERSION:=2.9
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/nagios
17 PKG_MD5SUM:=b6e3a21c91edb063c00712c6001e15ec
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/nagios
25 SECTION:=net
26 CATEGORY:=Network
27 DEPENDS:=+libpthread +microperl
28 TITLE:=service and network monitoring program
29 DESCRIPTION:=\
30 service and network monitoring program
31 URL:=http://www.nagios.org/
32 endef
33
34 define Package/send-nagios/conffiles
35 /etc/send_nagios.cfg
36 endef
37
38 EXTRA_CFLAGS += -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include
39
40 define Build/Configure
41 $(call Build/Configure/Default,\
42 --with-nagios-user="root" \
43 --with-nagios-group="root", \
44 CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
45 LIBS="-lnotimpl" \
46 )
47 endef
48
49 define Build/Compile
50 $(call Build/Compile/Default,\
51 DESTDIR="$(PKG_INSTALL_DIR)" \
52 INSTALL_OPTS="" \
53 all install install-config \
54 )
55 endef
56
57 define Package/nagios/install
58 $(CP) $(PKG_INSTALL_DIR) $(1)/
59 endef
60
61 $(eval $(call BuildPackage,nagios))