summaryrefslogtreecommitdiffstats
path: root/perl-Unix-Statgrab.spec
blob: 2503fe2ec24bf9bbe61ff6360a7fc074ec98eb51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
Name:			perl-Unix-Statgrab
Summary:		Perl extension for collecting information about the machine

Version:		0.03
Release:		4%{?dist}

Group:			Development/Libraries
License:		LGPL
URL:			http://search.cpan.org/dist/Unix-Statgrab/
Source0:		http://search.cpan.org/CPAN/authors/id/V/VP/VPARSEVAL/Unix-Statgrab-%{version}.tar.gz
Source1:		http://www.fsf.org/licensing/licenses/lgpl.txt
BuildRoot:		%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Patch0:			Unix-Statgrab-0.03-compile_libstatgrab-0.12.patch

BuildRequires:	libstatgrab-devel >= 0.12
BuildRequires:	perl(Test::Pod), perl(Test::Pod::Coverage)

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

%description
Unix::Statgrab is a wrapper for libstatgrab as available from
<http://www.i-scream.org/libstatgrab/>. It is a reasonably portable attempt
to query interesting stats about your computer. It covers information on the
operating system, CPU, memory usage, network interfaces, hard-disks etc. 

%prep
%setup -q -n Unix-Statgrab-%{version}

%patch0 -p1

%{__cp} %{SOURCE1} LICENSE.TXT

%build
CFLAGS="$RPM_OPT_FLAGS" %{__perl} Makefile.PL INSTALLDIRS=vendor
%{__make} %{?_smp_mflags} OPTIMIZE="$RPM_OPT_FLAGS"

%install
%{__rm} -rf $RPM_BUILD_ROOT
%{__make} pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type f -name '*.bs' -a -size 0 -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';'
chmod -R u+w $RPM_BUILD_ROOT/*

%check
%{__make} test

%clean
%{__rm} -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc LICENSE.TXT Changes README
%{perl_vendorlib}/Unix/
%{perl_vendorarch}/auto/Unix/
%{_mandir}/man3/*.3*

%changelog
* Tue Aug 23 2005 Oliver Falk <oliver@linux-kernel.at>		- 0.03-4
- Bug #165533, thanks to Paul Howarth

* Wed Aug 10 2005 Oliver Falk <oliver@linux-kernel.at>		- 0.03-3
- Add compile fix, since libstatgrab 0.12 API changes dup to
  duplex

* Wed Aug 10 2005 Oliver Falk <oliver@linux-kernel.at>		- 0.03-2
- Cleanup specfile
- Try to make it ready for FE

* Mon May 09 2005 Oliver Falk <oliver@linux-kernel.at>		- 0.03-1.2
- Rebuild

* Wed Apr 13 2005 Oliver Falk <oliver@linux-kernel.at>		- 0.03-1.1
- Remove the pkgname define

* Wed Apr 13 2005 Oliver Falk <oliver@linux-kernel.at>		- 0.03-1
- Update

* Tue Feb 15 2005 Oliver Falk <oliver@linux-kernel.at>		- 0.02-1
- Initial build for Fedora Core
- Used cpan2rpm for initial specfile

# vim: ts=4 sw=4