[net] Monitoring: Finally collected a Nagios programs under Monitoring submenu.
[packages.git] / net / nagios / Makefile
1
2 # Copyright (C) 2008-2009 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:=nagios
11 PKG_VERSION:=2.10
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SF/nagios
16 PKG_MD5SUM:=8c3a29e138f2ff8c8abbd3dd8a40c4b6
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/nagios
21   SECTION:=net
22   CATEGORY:=Network
23   SUBMENU:=Monitoring
24   DEPENDS:=+libpthread +microperl +libltdl
25   TITLE:=service and network monitoring program
26   URL:=http://www.nagios.org/
27 endef
28
29 define Package/nagios/description
30         service and network monitoring program
31 endef
32
33 EXTRA_CFLAGS += $(TARGET_CPPFLAGS)
34
35 CONFIGURE_ARGS += \
36         --with-nagios-user="root" \
37         --with-nagios-group="root" \
38         --sysconfdir="/etc/nagios" \
39         --without-gd-lib \
40         --without-gd-inc \
41         CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)"
42         
43 define Build/Compile
44         $(MAKE) -C $(PKG_BUILD_DIR) \
45                 DESTDIR="$(PKG_INSTALL_DIR)" \
46                 INSTALL_OPTS="" \
47                 STRIP=: \
48                 all install install-config
49 endef
50
51 define Package/nagios/install
52         $(INSTALL_DIR)  $(1)/etc/nagios
53         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/nagios/* $(1)/etc/nagios/
54         $(INSTALL_DIR)  $(1)/usr/bin
55         $(INSTALL_BIN)  $(PKG_INSTALL_DIR)/usr/bin/{nagios,nagiostats} $(1)/usr/bin/
56         $(INSTALL_DIR)  $(1)/usr/sbin
57         $(INSTALL_BIN)  $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
58         $(INSTALL_DIR)  $(1)/usr/share
59         $(CP)   $(PKG_INSTALL_DIR)/usr/share/* $(1)/usr/share/
60 endef
61
62 $(eval $(call BuildPackage,nagios))