LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File perl-Sys-Statistics-Linux.spec of Package perl-Sys-Statistics-Linux (Project home:csbuild:Perl)

#
#   - .	Sys::Statistics::Linux -
#

%define real_name Sys-Statistics-Linux
%define perl_vendorlib %(eval "`perl -V:installvendorlib`"; echo $installvendorlib)
%define perl_vendorarch %(eval "`perl -V:installvendorarch`"; echo $installvendorarch)
%define perl_archlib %(eval "`perl -V:archlib`"; echo $archlib)
%define perl_privlib %(eval "`perl -V:privlib`"; echo $privlib)
%define maketest 0

%bcond_with pod

Name:           perl-%{real_name}
Summary:	Sys::Statistics::Linux - Front-end module to collect system statistics
Version:	0.66
Release:	1
Url:		http://www.cpan.org
Source:		http://search.cpan.org/CPAN/authors/id/B/BL/BLOONIX/%{real_name}-%{version}.tar.gz
License:	Artistic
Group:		Applications/CPAN
Buildarch:	noarch
Buildroot:	%{_tmppath}/%{name}-%{version}-%(id -u -n)

BuildRequires:  perl(ExtUtils::MakeMaker)
%if 0%{?fedora_version}
BuildRequires:  perl-devel
%endif


%description
Sys::Statistics::Linux is a front-end module and gather different linux system information like processor 
workload, memory usage, network and disk statistics and a lot more. Refer the documentation of the
distribution modules to get more information about all possible statistics.


%prep
%setup -q -n %{real_name}-%{version} 
chmod -R u+w %{_builddir}/%{real_name}-%{version}


%build
CFLAGS="$RPM_OPT_FLAGS"
%{__perl} Makefile.PL `%{__perl} -MExtUtils::MakeMaker -e ' print qq|PREFIX=%{buildroot}%{_prefix}| if \$ExtUtils::MakeMaker::VERSION =~ /5
\.9[1-6]|6\.0[0-5]/ '`
%{__make} %{?_smp_mflags}


%check
%if %maketest
%{__make} test
%endif


%install
%if 0%{?suse_version}
%perl_make_install
%perl_process_packlist
%else
make DESTDIR=$RPM_BUILD_ROOT install_vendor
find $RPM_BUILD_ROOT/usr -type f -name perllocal.pod |xargs -i rm -f {}
find $RPM_BUILD_ROOT/usr -type d -depth -exec rmdir {} \; 2>/dev/null
%endif
find %{buildroot} -name "perllocal.pod" -o -name ".packlist" -o -name "*.bs" |xargs -i rm -f {}
find %{buildroot} -type f |xargs -i chmod 644 {}


%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}


%files
%defattr(-,root,root,-)
%doc INSTALL README examples
%doc %{_mandir}/man?/*
%dir %{perl_vendorlib}/Sys
%{perl_vendorlib}/Sys
%if 0%{?suse_version}
/var/adm/perl-modules/%{name}
%endif


%changelog
* Fri Aug 23 2013 Holger Manthey <holger.manthey@bertelsmann.de>
- initial package