]>
Commit | Line | Data |
---|---|---|
5b7ac99a AM |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | # | |
5 | %define pdir Sys | |
6 | %define pnam MemInfo | |
7 | %include /usr/lib/rpm/macros.perl | |
8 | Summary: Sys::MemInfo - query the total free and used physical memory | |
9 | Name: perl-Sys-MemInfo | |
10 | Version: 0.99 | |
19f81304 | 11 | Release: 2 |
5b7ac99a AM |
12 | License: GPL v1+ or Artistic |
13 | Group: Development/Languages/Perl | |
14 | Source0: http://www.cpan.org/modules/by-module/Sys/%{pdir}-%{pnam}-%{version}.tar.gz | |
15 | # Source0-md5: 88f0632691d7de91cbed95ba1ff29025 | |
16 | URL: https://metacpan.org/release/Sys-MemInfo/ | |
17 | BuildRequires: perl-devel >= 1:5.8.0 | |
18 | BuildRequires: rpm-perlprov >= 4.1-13 | |
19 | %if %{with tests} | |
20 | %endif | |
21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
22 | ||
23 | %description | |
24 | Sys::MemInfo return the total amount of free and used physical memory in bytes in totalmem and freemem variables. | |
25 | ||
26 | Total amount of free and user swap memory are alse returned in totalswap and freeswap variables. | |
27 | ||
28 | This module has been tested on Linux 3.13.0, UnixWare 7.1.2, AIX5, OpenBSD 3.8, | |
29 | NetBSD 2.0.2, FreBSD 5.4, HPUX11, Solaris 9, Tru64 5.1, Irix 6.5, Mac OS X 10.2 darwin and Windows XP. | |
30 | ||
31 | It should work on FreeBSD 4 and Windows 9X/ME/NT/200X/Vista. | |
32 | ||
33 | %prep | |
34 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
35 | ||
36 | %build | |
37 | %{__perl} Makefile.PL \ | |
38 | INSTALLDIRS=vendor | |
39 | %{__make} \ | |
40 | CC="%{__cc}" \ | |
41 | OPTIMIZE="%{rpmcflags}" | |
42 | ||
43 | %{?with_tests:%{__make} test} | |
44 | ||
45 | %install | |
46 | rm -rf $RPM_BUILD_ROOT | |
47 | ||
48 | %{__make} pure_install \ | |
49 | DESTDIR=$RPM_BUILD_ROOT | |
50 | ||
51 | %clean | |
52 | rm -rf $RPM_BUILD_ROOT | |
53 | ||
54 | %files | |
55 | %defattr(644,root,root,755) | |
56 | %doc Changes README | |
57 | %{perl_vendorarch}/Sys/MemInfo.pm | |
58 | %dir %{perl_vendorarch}/auto/Sys/MemInfo | |
59 | %attr(755,root,root) %{perl_vendorarch}/auto/Sys/MemInfo/MemInfo.so | |
60 | %{_mandir}/man3/Sys::MemInfo.3pm* |