Fri Apr 8 22:49:49 2011 UTC ()
Add DESTDIR support and LICENSE


(morr)
diff -r1.4 -r1.5 pkgsrc/net/nagios-plugin-radius/Makefile
diff -r1.4 -r1.5 pkgsrc/net/nagios-plugin-radius/distinfo
diff -r1.2 -r1.3 pkgsrc/net/nagios-plugin-radius/patches/patch-ak
diff -r1.2 -r1.3 pkgsrc/net/nagios-plugin-radius/patches/patch-al
diff -r1.1.1.1 -r1.2 pkgsrc/net/nagios-plugin-radius/patches/patch-am

cvs diff -r1.4 -r1.5 pkgsrc/net/nagios-plugin-radius/Makefile (expand / switch to unified diff)

--- pkgsrc/net/nagios-plugin-radius/Makefile 2010/01/17 12:02:33 1.4
+++ pkgsrc/net/nagios-plugin-radius/Makefile 2011/04/08 22:49:49 1.5
@@ -1,22 +1,24 @@ @@ -1,22 +1,24 @@
1# $NetBSD: Makefile,v 1.4 2010/01/17 12:02:33 wiz Exp $ 1# $NetBSD: Makefile,v 1.5 2011/04/08 22:49:49 morr Exp $
2# 2#
3 3
4PKGNAME= nagios-plugin-radius-${PLUGINSVERSION} 4PKGNAME= nagios-plugin-radius-${PLUGINSVERSION}
5PKGREVISION= 1 
6CATEGORIES= net sysutils 5CATEGORIES= net sysutils
7 6
8MAINTAINER= pkgsrc-users@NetBSD.org 7MAINTAINER= pkgsrc-users@NetBSD.org
9COMMENT= Nagios radius plugin 8COMMENT= Nagios radius plugin
 9LICENSE= gnu-gpl-v3
 10
 11PKG_DESTDIR_SUPPORT= user-destdir
10 12
11DEPENDS+= nagios-plugins-${PLUGINSVERSION}{,nb[0-9]*}:../../net/nagios-plugins 13DEPENDS+= nagios-plugins-${PLUGINSVERSION}{,nb[0-9]*}:../../net/nagios-plugins
12DEPENDS+= p5-Net-SNMP-[0-9]*:../../net/p5-Net-SNMP 14DEPENDS+= p5-Net-SNMP-[0-9]*:../../net/p5-Net-SNMP
13 15
14BUILD_DEFS+= PKG_SYSCONFBASE 16BUILD_DEFS+= PKG_SYSCONFBASE
15 17
16.include "../../net/nagios-plugins/Makefile.common" 18.include "../../net/nagios-plugins/Makefile.common"
17 19
18BINARY_TARGET= check_radius 20BINARY_TARGET= check_radius
19 21
20SUBST_CLASSES+= config 22SUBST_CLASSES+= config
21SUBST_STAGE.config= post-patch 23SUBST_STAGE.config= post-patch
22SUBST_FILES.config= plugins/check_radius.c 24SUBST_FILES.config= plugins/check_radius.c

cvs diff -r1.4 -r1.5 pkgsrc/net/nagios-plugin-radius/Attic/distinfo (expand / switch to unified diff)

--- pkgsrc/net/nagios-plugin-radius/Attic/distinfo 2009/12/15 18:59:54 1.4
+++ pkgsrc/net/nagios-plugin-radius/Attic/distinfo 2011/04/08 22:49:49 1.5
@@ -1,9 +1,9 @@ @@ -1,9 +1,9 @@
1$NetBSD: distinfo,v 1.4 2009/12/15 18:59:54 bouyer Exp $ 1$NetBSD: distinfo,v 1.5 2011/04/08 22:49:49 morr Exp $
2 2
3SHA1 (nagios-plugins-1.4.14.tar.gz) = b9998231f992c92b9370b62f15ac80323042f22c 3SHA1 (nagios-plugins-1.4.15.tar.gz) = 1faab309c06d37e559490fd852ecb0dc8a8ab610
4RMD160 (nagios-plugins-1.4.14.tar.gz) = f4e1768d84474fc4fa2b59a52efe320c7cbefb3a 4RMD160 (nagios-plugins-1.4.15.tar.gz) = c2780a3523cf4eaaed34a94c07f5f6bd6fb1f736
5Size (nagios-plugins-1.4.14.tar.gz) = 1950729 bytes 5Size (nagios-plugins-1.4.15.tar.gz) = 2095419 bytes
6SHA1 (patch-aa) = eb39ca2fcbe857b48ec6a5a15a097a2e7fd635a2 6SHA1 (patch-aa) = eb39ca2fcbe857b48ec6a5a15a097a2e7fd635a2
7SHA1 (patch-ak) = 801eaa64d88db20880c8b7e61922f198fc5791ac 7SHA1 (patch-ak) = dd9aba7a0930a6448e372b581ba04d62018a973b
8SHA1 (patch-al) = 658079cb3669ffcf2b0d158816b048c412f78d01 8SHA1 (patch-al) = 63e28ae36d671e773acfe6aeb45ab7603c112594
9SHA1 (patch-am) = ed7e108505679e739449b5eed6101f307e23f436 9SHA1 (patch-am) = adc95ba1037a7d7caab6dde6ca1e27e47754db62

cvs diff -r1.2 -r1.3 pkgsrc/net/nagios-plugin-radius/patches/Attic/patch-ak (expand / switch to unified diff)

--- pkgsrc/net/nagios-plugin-radius/patches/Attic/patch-ak 2008/05/27 21:22:02 1.2
+++ pkgsrc/net/nagios-plugin-radius/patches/Attic/patch-ak 2011/04/08 22:49:49 1.3
@@ -1,101 +1,70 @@ @@ -1,101 +1,70 @@
1$NetBSD: patch-ak,v 1.2 2008/05/27 21:22:02 tonnerre Exp $ 1$NetBSD: patch-ak,v 1.3 2011/04/08 22:49:49 morr Exp $
2 2
3--- gl/mountlist.c.orig 2007-01-24 23:47:25.000000000 +0100 3--- gl/mountlist.c.orig 2010-07-27 20:47:15.000000000 +0000
4+++ gl/mountlist.c 4+++ gl/mountlist.c
5@@ -57,7 +57,11 @@ char *strstr (); 5@@ -52,7 +52,11 @@
6 # if HAVE_STRUCT_FSSTAT_F_FSTYPENAME 6 # if HAVE_STRUCT_FSSTAT_F_FSTYPENAME
7 # define FS_TYPE(Ent) ((Ent).f_fstypename) 7 # define FS_TYPE(Ent) ((Ent).f_fstypename)
8 # else 8 # else
9-# define FS_TYPE(Ent) mnt_names[(Ent).f_type] 9-# define FS_TYPE(Ent) mnt_names[(Ent).f_type]
10+# ifdef STAT_STATVFS 10+# ifdef STAT_STATVFS
11+# define FS_TYPE(Ent) mnt_names[(Ent).f_fsid] 11+# define FS_TYPE(Ent) mnt_names[(Ent).f_fsid]
12+# else 12+# else
13+# define FS_TYPE(Ent) mnt_names[(Ent).f_type] 13+# define FS_TYPE(Ent) mnt_names[(Ent).f_type]
14+# endif 14+# endif
15 # endif 15 # endif
16 #endif /* MOUNTED_GETFSSTAT */ 16 #endif /* MOUNTED_GETFSSTAT */
17  17
18@@ -104,6 +108,10 @@ char *strstr (); 18@@ -99,6 +103,10 @@
19 # include <sys/statfs.h> 19 # include <sys/statfs.h>
20 #endif 20 #endif
21  21
22+#ifdef HAVE_SYS_STATVFS_H 22+#ifdef HAVE_SYS_STATVFS_H
23+#include <sys/statvfs.h> 23+#include <sys/statvfs.h>
24+#endif 24+#endif
25+ 25+
26 #ifdef MOUNTED_LISTMNTENT 26 #ifdef MOUNTED_LISTMNTENT
27 # include <mntent.h> 27 # include <mntent.h>
28 #endif 28 #endif
29@@ -178,7 +186,7 @@ char *strstr (); 29@@ -169,7 +177,7 @@
30  30
31 #if MOUNTED_GETMNTINFO 31 #if MOUNTED_GETMNTINFO
32  32
33-# if ! HAVE_STRUCT_STATFS_F_FSTYPENAME 33-# if ! HAVE_STRUCT_STATFS_F_FSTYPENAME
34+# if ! HAVE_STRUCT_STATFS_F_FSTYPENAME && ! STAT_STATVFS 34+# if ! HAVE_STRUCT_STATFS_F_FSTYPENAME && ! STAT_STATVFS
35 static char * 35 static char *
36 fstype_to_string (short int t) 36 fstype_to_string (short int t)
37 { 37 {
38@@ -275,9 +283,13 @@ fstype_to_string (short int t) 38@@ -266,9 +274,13 @@ fstype_to_string (short int t)
39 # endif 39 # endif
40  40
41 static char * 41 static char *
42+#ifdef STAT_STATVFS 42+#ifdef STAT_STATVFS
43+fsp_to_string (const struct statvfs *fsp) 43+fsp_to_string (const struct statvfs *fsp)
44+#else 44+#else
45 fsp_to_string (const struct statfs *fsp) 45 fsp_to_string (const struct statfs *fsp)
46+#endif 46+#endif
47 { 47 {
48-# if HAVE_STRUCT_STATFS_F_FSTYPENAME 48-# if HAVE_STRUCT_STATFS_F_FSTYPENAME
49+# if defined HAVE_STRUCT_STATFS_F_FSTYPENAME || defined STAT_STATVFS 49+# if defined HAVE_STRUCT_STATFS_F_FSTYPENAME || defined STAT_STATVFS
50 return (char *) (fsp->f_fstypename); 50 return (char *) (fsp->f_fstypename);
51 # else 51 # else
52 return fstype_to_string (fsp->f_type); 52 return fstype_to_string (fsp->f_type);
53@@ -413,7 +425,11 @@ read_file_system_list (bool need_fs_type 53@@ -592,9 +604,17 @@ read_file_system_list (bool need_fs_type
54  
55 #ifdef MOUNTED_GETMNTINFO /* 4.4BSD. */ 
56 { 
57+#ifdef STAT_STATVFS 
58+ struct statvfs *fsp; 
59+#else 
60 struct statfs *fsp; 
61+#endif 
62 int entries; 
63  
64 entries = getmntinfo (&fsp, MNT_NOWAIT); 
65@@ -601,9 +617,17 @@ read_file_system_list (bool need_fs_type 
66 { 54 {
67 int numsys, counter; 55 int numsys, counter;
68 size_t bufsize; 56 size_t bufsize;
69+#ifdef STAT_STATVFS 57+#ifdef STAT_STATVFS
70+ struct statvfs *stats; 58+ struct statvfs *stats;
71+#else 59+#else
72 struct statfs *stats; 60 struct statfs *stats;
73+#endif 61+#endif
74  62
75+#ifdef STAT_STATVFS 63+#ifdef STAT_STATVFS
76+ numsys = getfsstat ((struct statvfs *)0, 0L, MNT_NOWAIT); 64+ numsys = getfsstat ((struct statvfs *)0, 0L, MNT_NOWAIT);
77+#else 65+#else
78 numsys = getfsstat ((struct statfs *)0, 0L, MNT_NOWAIT); 66 numsys = getfsstat ((struct statfs *)0, 0L, MNT_NOWAIT);
79+#endif 67+#endif
80 if (numsys < 0) 68 if (numsys < 0)
81 return (NULL); 69 return (NULL);
82 if (SIZE_MAX / sizeof *stats <= numsys) 70 if (SIZE_MAX / sizeof *stats <= numsys)
83@@ -666,10 +690,18 @@ read_file_system_list (bool need_fs_type 
84 # ifdef GETFSTYP /* SVR3. */ 
85 if (need_fs_type) 
86 { 
87+#ifdef STAT_STATVFS 
88+ struct statvfs fsd; 
89+#else 
90 struct statfs fsd; 
91+#endif 
92 char typebuf[FSTYPSZ]; 
93  
94+#ifdef STAT_STATVFS 
95+ if (statvfs (me->me_mountdir, &fsd, sizeof fsd, 0) != -1 
96+#else 
97 if (statfs (me->me_mountdir, &fsd, sizeof fsd, 0) != -1 
98+#endif 
99 && sysfs (GETFSTYP, fsd.f_fstyp, typebuf) != -1) 
100 { 
101 me->me_type = xstrdup (typebuf); 

cvs diff -r1.2 -r1.3 pkgsrc/net/nagios-plugin-radius/patches/Attic/patch-al (expand / switch to unified diff)

--- pkgsrc/net/nagios-plugin-radius/patches/Attic/patch-al 2008/05/27 21:22:02 1.2
+++ pkgsrc/net/nagios-plugin-radius/patches/Attic/patch-al 2011/04/08 22:49:49 1.3
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1$NetBSD: patch-al,v 1.2 2008/05/27 21:22:02 tonnerre Exp $ 1$NetBSD: patch-al,v 1.3 2011/04/08 22:49:49 morr Exp $
2 2
3--- contrib/check_axis.sh.orig 2003-05-26 12:09:23.000000000 +0200 3--- contrib/check_axis.sh.orig 2010-07-27 20:47:15.000000000 +0000
4+++ contrib/check_axis.sh 4+++ contrib/check_axis.sh
5@@ -5,7 +5,7 @@ port=$2 5@@ -5,7 +5,7 @@ port=$2
6 usr=$3 6 usr=$3
7 pass=$4 7 pass=$4
8  8
9-if [ ! "$#" == "4" ]; then 9-if [ ! "$#" == "4" ]; then
10+if [ ! "$#" = "4" ]; then 10+if [ ! "$#" = "4" ]; then
11 echo -e "\nYou did not supply enough command line arguments. \nUsage: ./check_axis.sh <host> <port> <username> <password> \n \nCheck_axis.sh checks the status of LPT ports on Axis print servers. \nIt was written by Tom De Blende (tom.deblende@village.uunet.be) in 2002. \n" && exit "3" 11 echo -e "\nYou did not supply enough command line arguments. \nUsage: ./check_axis.sh <host> <port> <username> <password> \n \nCheck_axis.sh checks the status of LPT ports on Axis print servers. \nIt was written by Tom De Blende (tom.deblende@village.uunet.be) in 2002. \n" && exit "3"
12 fi 12 fi
13  13
14@@ -27,7 +27,7 @@ fi 14@@ -27,7 +27,7 @@ fi
15  15
16 lines=`cat $tempfile | grep -i $port` 16 lines=`cat $tempfile | grep -i $port`

cvs diff -r1.1.1.1 -r1.2 pkgsrc/net/nagios-plugin-radius/patches/Attic/patch-am (expand / switch to unified diff)

--- pkgsrc/net/nagios-plugin-radius/patches/Attic/patch-am 2007/04/13 20:06:21 1.1.1.1
+++ pkgsrc/net/nagios-plugin-radius/patches/Attic/patch-am 2011/04/08 22:49:49 1.2
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1$NetBSD: patch-am,v 1.1.1.1 2007/04/13 20:06:21 bouyer Exp $ 1$NetBSD: patch-am,v 1.2 2011/04/08 22:49:49 morr Exp $
2 2
3--- contrib/check_mssql.sh.orig 2003-08-05 09:56:13.000000000 +0000 3--- contrib/check_mssql.sh.orig 2010-07-27 20:47:15.000000000 +0000
4+++ contrib/check_mssql.sh 4+++ contrib/check_mssql.sh
5@@ -35,10 +35,10 @@ pswd=$3 5@@ -35,10 +35,10 @@ pswd=$3
6 srv=$4 6 srv=$4
7  7
8  8
9-if [ ! "$#" == "4" ]; then 9-if [ ! "$#" == "4" ]; then
10+if [ ! "$#" = "4" ]; then 10+if [ ! "$#" = "4" ]; then
11 echo -e "\nYou did not supply enough arguments. \nUsage: $0 <host> <username> <password> <version> \n \n$0 checks Microsoft SQL Server connectivity. It works with versions 7 and 2000.\n\nYou need a working version of FreeTDS (http://www.freetds.org/) and tsql (included in FreeTDS 6.0+) to connect to the SQL server. \nIt was written by Tom De Blende (tom.deblende@village.uunet.be) in 2003. \n\nExample:\n $0 dbserver sa f00bar 2000\n" && exit "3" 11 echo -e "\nYou did not supply enough arguments. \nUsage: $0 <host> <username> <password> <version> \n \n$0 checks Microsoft SQL Server connectivity. It works with versions 7 and 2000.\n\nYou need a working version of FreeTDS (http://www.freetds.org/) and tsql (included in FreeTDS 6.0+) to connect to the SQL server. \nIt was written by Tom De Blende (tom.deblende@village.uunet.be) in 2003. \n\nExample:\n $0 dbserver sa f00bar 2000\n" && exit "3"
12  12
13-elif [ $tsqlcmd == "" ]; then 13-elif [ $tsqlcmd == "" ]; then
14+elif [ $tsqlcmd = "" ]; then 14+elif [ $tsqlcmd = "" ]; then
15 echo -e "tsql not found! Please verify you have a working version of tsql (included in the FreeTDS version 6.0+) and enter the full path in the script." && exit "3" 15 echo -e "tsql not found! Please verify you have a working version of tsql (included in the FreeTDS version 6.0+) and enter the full path in the script." && exit "3"
16  16