3 %bcond_without tests # do not perform "make test"
7 Summary: Sys::MemInfo - query the total free and used physical memory
11 License: GPL v1+ or Artistic
12 Group: Development/Languages/Perl
13 Source0: http://www.cpan.org/modules/by-module/Sys/%{pdir}-%{pnam}-%{version}.tar.gz
14 # Source0-md5: 88f0632691d7de91cbed95ba1ff29025
15 URL: https://metacpan.org/release/Sys-MemInfo/
16 BuildRequires: perl-devel >= 1:5.8.0
17 BuildRequires: rpm-perlprov >= 4.1-13
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 Sys::MemInfo return the total amount of free and used physical memory in bytes in totalmem and freemem variables.
25 Total amount of free and user swap memory are alse returned in totalswap and freeswap variables.
27 This module has been tested on Linux 3.13.0, UnixWare 7.1.2, AIX5, OpenBSD 3.8,
28 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 It should work on FreeBSD 4 and Windows 9X/ME/NT/200X/Vista.
33 %setup -q -n %{pdir}-%{pnam}-%{version}
36 %{__perl} Makefile.PL \
40 OPTIMIZE="%{rpmcflags}"
42 %{?with_tests:%{__make} test}
45 rm -rf $RPM_BUILD_ROOT
47 %{__make} pure_install \
48 DESTDIR=$RPM_BUILD_ROOT
51 rm -rf $RPM_BUILD_ROOT
54 %defattr(644,root,root,755)
56 %{perl_vendorarch}/Sys/MemInfo.pm
57 %dir %{perl_vendorarch}/auto/Sys/MemInfo
58 %attr(755,root,root) %{perl_vendorarch}/auto/Sys/MemInfo/MemInfo.so
59 %{_mandir}/man3/Sys::MemInfo.3pm*