summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorTobi Oetiker <tobi@oetiker.ch>2011-09-29 00:34:38 +0200
committerTobi Oetiker <tobi@oetiker.ch>2011-09-29 00:34:38 +0200
commitf05d11a794291157f39778907c698c9008cd7edf (patch)
tree42649e5fa0d81d599589344f703af2a91d3e4762 /bin
parenta0d01155dc7b2774435721aa319625c9c42d9e59 (diff)
downloadsmokeping-f05d11a794291157f39778907c698c9008cd7edf.tar.gz
smokeping-f05d11a794291157f39778907c698c9008cd7edf.tar.xz
* silent build
* add perl and library path to the scripts on install
Diffstat (limited to 'bin')
-rw-r--r--bin/Makefile.am5
-rwxr-xr-xbin/smokeinfo7
-rwxr-xr-xbin/smokeping3
-rwxr-xr-xbin/smokeping_cgi1
-rwxr-xr-xbin/tSmoke3
5 files changed, 15 insertions, 4 deletions
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;