nuke $Id$ in /packages as well
[packages.git] / net / nagios / Makefile
1
2 # Copyright (C) 2008 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 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
19
20 include $(INCLUDE_DIR)/package.mk
21
22 PKG_BUILD_DEPENDS:=libnotimpl
23
24 define Package/nagios
25   SECTION:=net
26   CATEGORY:=Network
27   SUBMENU:=Monitoring
28   DEPENDS:=+libpthread +microperl +libltdl
29   TITLE:=service and network monitoring program
30   URL:=http://www.nagios.org/
31 endef
32
33 define Package/nagios/description
34         service and network monitoring program
35 endef
36
37 EXTRA_CFLAGS += -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include
38
39 CONFIGURE_ARGS += \
40         --with-nagios-user="root" \
41         --with-nagios-group="root" \
42         --sysconfdir="/etc/nagios" \
43         --without-gd-lib \
44         --without-gd-inc \
45         CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)"
46         
47 CONFIGURE_VARS += \
48         LIBS="-lnotimpl"
49
50 define Build/Compile
51         $(MAKE) -C $(PKG_BUILD_DIR) \
52                 DESTDIR="$(PKG_INSTALL_DIR)" \
53                 INSTALL_OPTS="" \
54                 STRIP=: \
55                 all install install-config
56 endef
57
58 define Package/nagios/install
59         $(INSTALL_DIR)  $(1)/etc/nagios
60         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/nagios/* $(1)/etc/nagios/
61         $(INSTALL_DIR)  $(1)/usr/bin
62         $(INSTALL_BIN)  $(PKG_INSTALL_DIR)/usr/bin/{nagios,nagiostats} $(1)/usr/bin/
63         $(INSTALL_DIR)  $(1)/usr/sbin
64         $(INSTALL_BIN)  $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
65         $(INSTALL_DIR)  $(1)/usr/share
66         $(CP)   $(PKG_INSTALL_DIR)/usr/share/* $(1)/usr/share/
67 endef
68
69 $(eval $(call BuildPackage,nagios))