From f05d11a794291157f39778907c698c9008cd7edf Mon Sep 17 00:00:00 2001 From: Tobi Oetiker Date: Wed, 28 Sep 2011 22:34:38 +0000 Subject: * silent build * add perl and library path to the scripts on install --- bin/Makefile.am | 5 +++++ bin/smokeinfo | 7 +++++-- bin/smokeping | 3 ++- bin/smokeping_cgi | 1 + bin/tSmoke | 3 ++- 5 files changed, 15 insertions(+), 4 deletions(-) (limited to 'bin') diff --git a/bin/Makefile.am b/bin/Makefile.am index 81a47df..01030c8 100644 --- a/bin/Makefile.am +++ b/bin/Makefile.am @@ -16,3 +16,8 @@ dist_bin_SCRIPTS = smokeinfo smokeping smokeping_cgi tSmoke + +install-exec-hook: + [ x$PERL5LIB != x ] && cd "$(bindir)" && $(PERL) -i -p -e 's{^#!.*}{#!$(PERL)}; s{.*# PERL5LIB}{use lib qw($(PERL5LIB)); # PERL5LIB}' smokeinfo smokeping smokeping_cgi tSmoke + +# EOF diff --git a/bin/smokeinfo b/bin/smokeinfo index 48439c8..caf77d2 100755 --- a/bin/smokeinfo +++ b/bin/smokeinfo @@ -1,9 +1,12 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl use strict; +use warnings; -use lib qw(/usr/pack/rrdtool-1.3.2-to/lib/perl); use FindBin; +# PERL5LIB +use lib "$FindBin::Bin/../thirdparty/lib/perl5"; use lib "$FindBin::Bin/../lib"; + use Smokeping::Info; use Getopt::Long 2.25 qw(:config no_ignore_case); use Pod::Usage 1.14; diff --git a/bin/smokeping b/bin/smokeping index 29be044..f6b95b8 100755 --- a/bin/smokeping +++ b/bin/smokeping @@ -5,10 +5,11 @@ use strict; use warnings; use FindBin; +# PERL5LIB use lib "$FindBin::Bin/../thirdparty/lib/perl5"; use lib "$FindBin::Bin/../lib"; -use Smokeping 2.005000; +use Smokeping; Smokeping::main("$FindBin::Bin/../etc/config"); diff --git a/bin/smokeping_cgi b/bin/smokeping_cgi index f7e2744..bedc6ff 100755 --- a/bin/smokeping_cgi +++ b/bin/smokeping_cgi @@ -5,6 +5,7 @@ use strict; use warnings; use FindBin; +# PERL5LIB use lib "$FindBin::Bin/../thirdparty/lib/perl5"; use lib "$FindBin::Bin/../lib"; diff --git a/bin/tSmoke b/bin/tSmoke index fc0d74f..d7d98bd 100755 --- a/bin/tSmoke +++ b/bin/tSmoke @@ -52,10 +52,11 @@ use warnings; # # Point the lib variables to your implementation use FindBin; +# PERL5LIB use lib "$FindBin::Bin/../thirdparty/lib/perl5"; use lib "$FindBin::Bin/../lib"; -use Smokeping 2.004002; +use Smokeping; use Net::SMTP; use Getopt::Long; use Pod::Usage; -- cgit v1.2.3-24-g4f1b