pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/net/nagios-plugin-printer
Module Name: pkgsrc
Committed By: wiz
Date: Wed Feb 10 15:26:46 UTC 2021
Added Files:
pkgsrc/net/nagios-plugin-printer: DESCR Makefile PLIST distinfo
pkgsrc/net/nagios-plugin-printer/patches: patch-aa
Log Message:
net/nagios-plugin-printer: import nagios-plugin-printer-0.0.363nb1
Packaged for wip by Edgar Fuß.
Perl script that retrieves supply metrics from printers using the snmpwalk
command.
To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/net/nagios-plugin-printer/DESCR \
pkgsrc/net/nagios-plugin-printer/Makefile \
pkgsrc/net/nagios-plugin-printer/PLIST \
pkgsrc/net/nagios-plugin-printer/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/net/nagios-plugin-printer/patches/patch-aa
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Added files:
Index: pkgsrc/net/nagios-plugin-printer/DESCR
diff -u /dev/null pkgsrc/net/nagios-plugin-printer/DESCR:1.1
--- /dev/null Wed Feb 10 15:26:46 2021
+++ pkgsrc/net/nagios-plugin-printer/DESCR Wed Feb 10 15:26:46 2021
@@ -0,0 +1,2 @@
+Perl script that retrieves supply metrics from printers using the snmpwalk
+command.
Index: pkgsrc/net/nagios-plugin-printer/Makefile
diff -u /dev/null pkgsrc/net/nagios-plugin-printer/Makefile:1.1
--- /dev/null Wed Feb 10 15:26:46 2021
+++ pkgsrc/net/nagios-plugin-printer/Makefile Wed Feb 10 15:26:46 2021
@@ -0,0 +1,46 @@
+# $NetBSD: Makefile,v 1.1 2021/02/10 15:26:46 wiz Exp $
+
+DISTNAME= check_printer
+REVISION= 363
+PKGREVISION= 1
+PKGNAME= nagios-plugin-printer-0.0.${REVISION}
+CATEGORIES= sysutils net
+# Can this be converted to GITHUB_*?
+MASTER_SITES= ${MASTER_SITE_GITHUB:=bzed/pkg-nagios-plugins-contrib/raw/debian/25.20191015+1/check_printer/}
+EXTRACT_SUFX= # empty
+DIST_SUBDIR= check_printer-${REVISION}
+
+COMMENT= Gather supply metrics from a printer via SNMP query
+LICENSE= 2-clause-bsd
+
+USE_LANGUAGES= # empty
+USE_TOOLS+= perl:run
+
+DEPENDS+= net-snmp-[0-9]*:../../net/net-snmp
+
+WRKSRC= ${WRKDIR}
+
+PLUGINDIR= libexec/nagios
+PLIST_SUBST+= PLUGINDIR=${PLUGINDIR}
+
+INSTALLATION_DIRS+= ${PLUGINDIR}
+
+REPLACE_PERL+= check_printer
+
+SUBST_CLASSES+= paths
+SUBST_STAGE.paths= pre-configure
+SUBST_MESSAGE.paths= Fixing paths
+SUBST_FILES.paths= check_printer
+SUBST_SED.paths= -e 's;@LIBDIR@;${PREFIX}/${PLUGINDIR};'
+SUBST_VARS.paths= PREFIX
+
+NO_BUILD= yes
+
+do-extract:
+ ${CP} ${DISTDIR}/${DIST_SUBDIR}/${DISTNAME} ${WRKSRC}
+
+do-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/check_printer ${DESTDIR}${PREFIX}/${PLUGINDIR}
+
+.include "../../mk/bsd.prefs.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/net/nagios-plugin-printer/PLIST
diff -u /dev/null pkgsrc/net/nagios-plugin-printer/PLIST:1.1
--- /dev/null Wed Feb 10 15:26:46 2021
+++ pkgsrc/net/nagios-plugin-printer/PLIST Wed Feb 10 15:26:46 2021
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1 2021/02/10 15:26:46 wiz Exp $
+${PLUGINDIR}/check_printer
Index: pkgsrc/net/nagios-plugin-printer/distinfo
diff -u /dev/null pkgsrc/net/nagios-plugin-printer/distinfo:1.1
--- /dev/null Wed Feb 10 15:26:46 2021
+++ pkgsrc/net/nagios-plugin-printer/distinfo Wed Feb 10 15:26:46 2021
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2021/02/10 15:26:46 wiz Exp $
+
+SHA1 (check_printer-363/check_printer) = d2b7d0f7ca09d2813aca9d0904f069337bb6fe53
+RMD160 (check_printer-363/check_printer) = 203afd4e7dab9dc76075ee8d75dcd3b50c21637e
+SHA512 (check_printer-363/check_printer) = 6f041eb8fdc24eb37fdeed731faa5f65d12abb6e420fb32eb428249eb40462a1ac31d72523315af4e16f1381d7fce647c2c973f737631aed9afd6de0cbd02ee3
+Size (check_printer-363/check_printer) = 10325 bytes
+SHA1 (patch-aa) = 53e44cdc5f4ad8b7815a7ca6188c0b0b34b237f4
Index: pkgsrc/net/nagios-plugin-printer/patches/patch-aa
diff -u /dev/null pkgsrc/net/nagios-plugin-printer/patches/patch-aa:1.1
--- /dev/null Wed Feb 10 15:26:46 2021
+++ pkgsrc/net/nagios-plugin-printer/patches/patch-aa Wed Feb 10 15:26:46 2021
@@ -0,0 +1,36 @@
+$NetBSD: patch-aa,v 1.1 2021/02/10 15:26:46 wiz Exp $
+
+Replace 'use lib' logic by something that can be SUBST'd
+Make snmpwalk paths absolute
+
+--- check_printer.orig 2016-10-12 15:53:09.000000000 +0200
++++ check_printer 2016-10-12 16:00:37.000000000 +0200
+@@ -33,12 +33,7 @@
+ use strict;
+ use warnings;
+
+-my $OS = `uname`;
+-if ($OS =~ m/^\wBSD/){
+- use lib "/usr/local/libexec/nagios";
+-} elsif ($OS =~ m/Linux/){
+- use lib "/usr/local/nagios/libexec";
+-}
++use lib "@LIBDIR@";
+
+ use Data::Dumper;
+ use Getopt::Long;
+@@ -80,10 +75,10 @@
+
+ my $comm = $ARGV[1];
+
+-my @vars = ("snmpwalk -On -v 1 -c $community $host $base_oid.$name_oid",
+- "snmpwalk -On -v 1 -c $community $host $base_oid.$uom_oid",
+- "snmpwalk -On -v 1 -c $community $host $base_oid.$max_oid",
+- "snmpwalk -On -v 1 -c $community $host $base_oid.$curr_oid");
++my @vars = ("@PREFIX@/bin/snmpwalk -On -v 1 -c $community $host $base_oid.$name_oid",
++ "@PREFIX@/bin/snmpwalk -On -v 1 -c $community $host $base_oid.$uom_oid",
++ "@PREFIX@/bin/snmpwalk -On -v 1 -c $community $host $base_oid.$max_oid",
++ "@PREFIX@/bin/snmpwalk -On -v 1 -c $community $host $base_oid.$curr_oid");
+
+ my(@values, @names, @max, @min);
+
Home |
Main Index |
Thread Index |
Old Index