Add nagios-plugins (#967)
authorFlorian Fainelli <florian@openwrt.org>
Sat, 17 Mar 2007 12:38:18 +0000 (12:38 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Sat, 17 Mar 2007 12:38:18 +0000 (12:38 +0000)
SVN-Revision: 6594

net/nagios-plugins/Makefile [new file with mode: 0644]
net/nagios-plugins/patches/001-ping.patch [new file with mode: 0644]
net/nagios-plugins/patches/002-plugins.patch [new file with mode: 0644]

diff --git a/net/nagios-plugins/Makefile b/net/nagios-plugins/Makefile
new file mode 100644 (file)
index 0000000..0970444
--- /dev/null
@@ -0,0 +1,59 @@
+# 
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id: $
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=nagios-plugins
+PKG_VERSION:=1.4.6
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@SF/nagiosplug
+PKG_MD5SUM:=ea79fa91092d709aa6b2e732b1d55541
+PKG_CAT:=zcat
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/nagios-plugins
+  SECTION:=net
+  CATEGORY:=Network
+  DEPENDS:=uclibcxx
+  TITLE:=plugins for Nagios checks
+  URL:=http://nagiosplug.sourceforge.net/
+endef
+
+define Build/Configure
+       $(call Build/Configure/Default, \
+               --without-mysql \
+               --with-openssl="$(STAGING_DIR)/usr" \
+               --with-ping-command="/bin/ping -c %d %s" \
+               --with-ps-command="/bin/ps -Aopid" \
+               --with-ps-cols="5" \
+               --with-ps-format="%d %s %d %s %n" \
+               --with-uptime-command="/usr/bin/uptime" \
+               --with-ssh-command="/usr/bin/ssh" \
+               --with-nslookup-command="/usr/bin/nslookup" \
+               , \
+       )
+endef
+
+define Build/Compile
+       $(call Build/Compile/Default,\
+               DESTDIR="$(PKG_INSTALL_DIR)" \
+               all install \
+       )
+endef
+
+define Package/nagios-plugins/install
+       $(INSTALL_DIR) $(1)/usr/libexec/nagios
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/libexec/nagios/
+endef
+
+$(eval $(call BuildPackage,nagios-plugins))
diff --git a/net/nagios-plugins/patches/001-ping.patch b/net/nagios-plugins/patches/001-ping.patch
new file mode 100644 (file)
index 0000000..d559f91
--- /dev/null
@@ -0,0 +1,19 @@
+--- nagios-plugins-1.4.5/configure.orig        2006-11-15 16:48:54.000000000 +0100
++++ nagios-plugins-1.4.5/configure     2006-11-15 16:49:07.000000000 +0100
+@@ -30041,16 +30041,6 @@
+ fi
+-if test "x$ac_cv_ping_has_timeout" != "xno"
+-then
+-
+-cat >>confdefs.h <<\_ACEOF
+-#define PING_HAS_TIMEOUT 1
+-_ACEOF
+-
+-fi
+-
+-
+ # Check whether --with-ping6_command or --without-ping6_command was given.
+ if test "${with_ping6_command+set}" = set; then
+   withval="$with_ping6_command"
diff --git a/net/nagios-plugins/patches/002-plugins.patch b/net/nagios-plugins/patches/002-plugins.patch
new file mode 100644 (file)
index 0000000..801a369
--- /dev/null
@@ -0,0 +1,60 @@
+--- nagios-plugins-1.4.5/plugins/Makefile.in.orig      2006-11-15 16:23:06.000000000 +0100
++++ nagios-plugins-1.4.5/plugins/Makefile.in   2006-11-15 16:24:03.000000000 +0100
+@@ -36,7 +36,7 @@
+ POST_UNINSTALL = :
+ build_triplet = @build@
+ host_triplet = @host@
+-libexec_PROGRAMS = check_apt$(EXEEXT) check_disk$(EXEEXT) \
++libexec_PROGRAMS = check_apt$(EXEEXT) \
+       check_dummy$(EXEEXT) check_http$(EXEEXT) check_load$(EXEEXT) \
+       check_mrtg$(EXEEXT) check_mrtgtraf$(EXEEXT) check_ntp$(EXEEXT) \
+       check_nwstat$(EXEEXT) check_overcr$(EXEEXT) \
+@@ -46,7 +46,7 @@
+       urlize$(EXEEXT) @EXTRAS@
+ EXTRA_PROGRAMS = check_mysql$(EXEEXT) check_radius$(EXEEXT) \
+       check_pgsql$(EXEEXT) check_snmp$(EXEEXT) check_hpjd$(EXEEXT) \
+-      check_swap$(EXEEXT) check_fping$(EXEEXT) check_ldap$(EXEEXT) \
++      check_fping$(EXEEXT) check_ldap$(EXEEXT) \
+       check_game$(EXEEXT) check_dig$(EXEEXT) check_nagios$(EXEEXT) \
+       check_by_ssh$(EXEEXT) check_dns$(EXEEXT) check_nt$(EXEEXT) \
+       check_ide_smart$(EXEEXT) check_procs$(EXEEXT) \
+--- nagios-plugins-1.4.5/plugins/Makefile.am.orig      2006-11-15 16:27:09.000000000 +0100
++++ nagios-plugins-1.4.5/plugins/Makefile.am   2006-11-15 16:27:19.000000000 +0100
+@@ -23,7 +23,7 @@
+       check_udp check_clamd @check_tcp_ssl@
+ EXTRA_PROGRAMS = check_mysql check_radius check_pgsql check_snmp check_hpjd \
+-      check_swap check_fping check_ldap check_game check_dig \
++      check_fping check_ldap check_game check_dig \
+       check_nagios check_by_ssh check_dns check_nt check_ide_smart    \
+       check_procs check_mysql_query check_apt
+--- nagios-plugins-1.4.5/configure.orig        2006-11-15 16:33:34.000000000 +0100
++++ nagios-plugins-1.4.5/configure     2006-11-15 16:35:55.000000000 +0100
+@@ -31800,7 +31800,7 @@
+ if test "$ac_cv_have_decl_swapctl" = "yes";
+ then
+-      EXTRAS="$EXTRAS check_swap"
++      EXTRAS="$EXTRAS"
+       echo "$as_me:$LINENO: checking for 2-arg (SVR4) swapctl" >&5
+ echo $ECHO_N "checking for 2-arg (SVR4) swapctl... $ECHO_C" >&6
+       if test "$ac_cv_type_swaptbl_t" = "yes" -a \
+@@ -31943,7 +31943,7 @@
+ #define HAVE_SWAP 1
+ _ACEOF
+-      EXTRAS="$EXTRAS check_swap"
++      EXTRAS="$EXTRAS"
+ fi
+ if test "x$ac_cv_swap_command" != "x"
+ then
+@@ -31995,7 +31995,7 @@
+ #define PROC_MEMINFO "$ac_cv_proc_meminfo"
+ _ACEOF
+-      EXTRAS="$EXTRAS check_swap"
++      EXTRAS="$EXTRAS"
+ fi
+ # Extract the first word of "dig", so it can be a program name with args.