# HG changeset patch # User Pascal Bellard # Date 1246016269 -7200 # Node ID 682806abeaec134b89f62844cee6c447a6855178 # Parent 43c66f7adf361c787b6993dd8749eff8961b3f1a Add perl-rrd-simple diff -r 43c66f7adf36 -r 682806abeaec perl-rrd-simple/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/perl-rrd-simple/receipt Fri Jun 26 13:37:49 2009 +0200 @@ -0,0 +1,31 @@ +# SliTaz package receipt. + +PACKAGE="perl-rrd-simple" +VERSION="1.44" +CATEGORY="development" +SHORT_DESC="RRD::Simple module is a Perl extension." +MAINTAINER="pascal.bellard@slitaz.org" +DEPENDS="perl" +BUILD_DEPENDS="perl" +SUGGESTED="rrdtool" +SOURCE="RRD-Simple" +TARBALL="$SOURCE-$VERSION.tar.gz" +WEB_SITE="http://www.cpan.org/modules/by-authors/id/MJD/Template.html" +WGET_URL="http://search.cpan.org/CPAN/authors/id/N/NI/NICOLAW/$TARBALL" + +# Rules to configure and make the package. +compile_rules() +{ + cd $src + perl Makefile.PL && + make && + make DESTDIR=$PWD/_pkg install +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + cp -a stuff/*/ $fs + cp -a $_pkg/usr/lib $fs/usr +} + diff -r 43c66f7adf36 -r 682806abeaec perl-rrd-simple/stuff/usr/bin/rrd_addsource --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/perl-rrd-simple/stuff/usr/bin/rrd_addsource Fri Jun 26 13:37:49 2009 +0200 @@ -0,0 +1,19 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +use RRD::Simple(); + +if (@ARGV != 3) { + print "Usage: $0 rrdfile DSname\n"; +} + +my $file = $ARGV[0]; +my $dsname = $ARGV[1]; + +my $rrd = RRD::Simple->new(); + +print "Add $dsname into $file..."; +$rrd->add_source($file, 'DS_name' => $dsname); +print " ok.\n";