wok-6.x rev 3577
Add perl-rrd-simple
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Jun 26 13:37:49 2009 +0200 (2009-06-26) |
parents | 43c66f7adf36 |
children | fa15a340f141 |
files | perl-rrd-simple/receipt perl-rrd-simple/stuff/usr/bin/rrd_addsource |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/perl-rrd-simple/receipt Fri Jun 26 13:37:49 2009 +0200 1.3 @@ -0,0 +1,31 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="perl-rrd-simple" 1.7 +VERSION="1.44" 1.8 +CATEGORY="development" 1.9 +SHORT_DESC="RRD::Simple module is a Perl extension." 1.10 +MAINTAINER="pascal.bellard@slitaz.org" 1.11 +DEPENDS="perl" 1.12 +BUILD_DEPENDS="perl" 1.13 +SUGGESTED="rrdtool" 1.14 +SOURCE="RRD-Simple" 1.15 +TARBALL="$SOURCE-$VERSION.tar.gz" 1.16 +WEB_SITE="http://www.cpan.org/modules/by-authors/id/MJD/Template.html" 1.17 +WGET_URL="http://search.cpan.org/CPAN/authors/id/N/NI/NICOLAW/$TARBALL" 1.18 + 1.19 +# Rules to configure and make the package. 1.20 +compile_rules() 1.21 +{ 1.22 + cd $src 1.23 + perl Makefile.PL && 1.24 + make && 1.25 + make DESTDIR=$PWD/_pkg install 1.26 +} 1.27 + 1.28 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.29 +genpkg_rules() 1.30 +{ 1.31 + cp -a stuff/*/ $fs 1.32 + cp -a $_pkg/usr/lib $fs/usr 1.33 +} 1.34 +
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/perl-rrd-simple/stuff/usr/bin/rrd_addsource Fri Jun 26 13:37:49 2009 +0200 2.3 @@ -0,0 +1,19 @@ 2.4 +#!/usr/bin/perl 2.5 + 2.6 +use strict; 2.7 +use warnings; 2.8 + 2.9 +use RRD::Simple(); 2.10 + 2.11 +if (@ARGV != 3) { 2.12 + print "Usage: $0 rrdfile DSname\n"; 2.13 +} 2.14 + 2.15 +my $file = $ARGV[0]; 2.16 +my $dsname = $ARGV[1]; 2.17 + 2.18 +my $rrd = RRD::Simple->new(); 2.19 + 2.20 +print "Add $dsname into $file..."; 2.21 +$rrd->add_source($file, 'DS_name' => $dsname); 2.22 +print " ok.\n";