Blob Blame History Raw
Name:     perl-RRD-Simple
Version:  1.44
Release:  1%{?dist}
Summary:  Simple interface to create and store data in RRD files

Group:    Development/Libraries
License:  ASL 2.0
URL:      http://search.cpan.org/dist/RRD-Simple
Source0:  http://search.cpan.org/CPAN/authors/id/N/NI/NICOLAW/RRD-Simple-%{version}.tar.gz

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:      noarch  
BuildRequires:  perl(Module::Build), perl(Test::Deep)
BuildRequires:  perl(RRDs)
BuildRequires:  perl(Test::More)

# For improved tests:
BuildRequires:  perl(Test::Pod::Coverage)
BuildRequires:  perl(Test::Pod)

Requires:  perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))

%description
RRD::Simple provides a simple interface to RRDTool's RRDs module. This module
does not currently offer the fetch method that is available in the RRDs 
module.  It does however create RRD files with a sensible set of default RRA
Round Robin Archive) definitions, and can dynamically add new data source 
names to an existing RRD file.

This module is ideal for quick and simple storage of data within an RRD file
if you do not need to, nor want to, bother defining custom RRA definitions.

%prep
%setup -q -n RRD-Simple-%{version}

# note we first filter out the bits in _docdir...
cat << \EOF > %{name}-prov
#!/bin/sh
FOO=`perl -p -e 's|%{_docdir}/%{name}-%{version}\S+||'`
%{__perl_provides} $FOO
EOF

%define __perl_provides %{_builddir}/RRD-Simple-%{version}/%{name}-prov
chmod +x %{__perl_provides}

cat << \EOF > %{name}-req
#!/bin/sh
%{__perl_requires} `perl -p -e 's|\S+%{_docdir}/%{name}-%{version}\S+||'`
EOF

%define __perl_requires %{_builddir}/RRD-Simple-%{version}/%{name}-req
chmod +x %{__perl_requires}


%build
# prevent call-home query/timeout.  not strictly necessary
AUTOMATED_TESTING=1 %{__perl} Build.PL installdirs=vendor
./Build


%install
rm -rf %{buildroot}

./Build install destdir=%{buildroot} create_packlist=0
find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null ';'

%{_fixperms} %{buildroot}/*


%check
./Build test


%clean
rm -rf %{buildroot}


%files
%defattr(-,root,root,-)
%doc Changes INSTALL LICENSE NOTICE README examples/ t/
%{perl_vendorlib}/*
%{_mandir}/man3/*.3*


%changelog
* Sun Aug 03 2008 Chris Weyl <cweyl@alumni.drew.edu> 1.44-1
- update to 1.44

* Thu Mar 06 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.43-3
Rebuild for new perl

* Fri Jan 11 2008 Ralf Cors├ępius <rc040203@freenet.de> 1.43-2
- BR: perl(Test::More) (BZ 419631).
- BR: perl(Test::Pod), perl(Test::Pod::Coverage).

* Wed Mar 21 2007 Chris Weyl <cweyl@alumni.drew.edu> 1.43-1
- update to 1.43

* Tue Feb 13 2007 Chris Weyl <cweyl@alumni.drew.edu> 1.41-1
- update to 1.41
- use Build.PL directly

* Thu Aug 31 2006 Chris Weyl <cweyl@alumni.drew.edu> 1.40-2
- bump for mass rebuild

* Fri Aug 25 2006 Chris Weyl <cweyl@alumni.drew.edu> 1.40-1
- update to 1.40
- minor spec cleanups

* Tue Jun 27 2006 Chris Weyl <cweyl@alumni.drew.edu> 1.39-1
- bump release for extras build

* Tue Jun 27 2006 Chris Weyl <cweyl@alumni.drew.edu> 1.39-0
- Initial spec file for F-E