pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/net/nagios-plugin-printer net/nagios-plugin-printer: i...
details: https://anonhg.NetBSD.org/pkgsrc/rev/3316ff278f38
branches: trunk
changeset: 446546:3316ff278f38
user: wiz <wiz%pkgsrc.org@localhost>
date: Wed Feb 10 15:26:46 2021 +0000
description:
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.
diffstat:
net/nagios-plugin-printer/DESCR | 2 +
net/nagios-plugin-printer/Makefile | 46 ++++++++++++++++++++++++++++++
net/nagios-plugin-printer/PLIST | 2 +
net/nagios-plugin-printer/distinfo | 7 ++++
net/nagios-plugin-printer/patches/patch-aa | 36 +++++++++++++++++++++++
5 files changed, 93 insertions(+), 0 deletions(-)
diffs (113 lines):
diff -r f84e7d3b3301 -r 3316ff278f38 net/nagios-plugin-printer/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/nagios-plugin-printer/DESCR Wed Feb 10 15:26:46 2021 +0000
@@ -0,0 +1,2 @@
+Perl script that retrieves supply metrics from printers using the snmpwalk
+command.
diff -r f84e7d3b3301 -r 3316ff278f38 net/nagios-plugin-printer/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/nagios-plugin-printer/Makefile Wed Feb 10 15:26:46 2021 +0000
@@ -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"
diff -r f84e7d3b3301 -r 3316ff278f38 net/nagios-plugin-printer/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/nagios-plugin-printer/PLIST Wed Feb 10 15:26:46 2021 +0000
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1 2021/02/10 15:26:46 wiz Exp $
+${PLUGINDIR}/check_printer
diff -r f84e7d3b3301 -r 3316ff278f38 net/nagios-plugin-printer/distinfo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/nagios-plugin-printer/distinfo Wed Feb 10 15:26:46 2021 +0000
@@ -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
diff -r f84e7d3b3301 -r 3316ff278f38 net/nagios-plugin-printer/patches/patch-aa
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/nagios-plugin-printer/patches/patch-aa Wed Feb 10 15:26:46 2021 +0000
@@ -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