perl-load-vl.spec 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. %define real_name load
  2. Summary: Control when subroutines will be loaded
  3. Name: perl-%{real_name}
  4. Version: 0.20
  5. Release: 1%{?_dist_release}
  6. License: Artistic or GPL+
  7. Group: Development/Libraries
  8. URL: http://search.cpan.org/dist/load/
  9. Source: http://www.cpan.org/authors/id/E/EL/ELIZABETH/load-%{version}.tar.gz
  10. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  11. BuildArch: noarch
  12. BuildRequires: perl
  13. BuildRequires: perl(ExtUtils::MakeMaker)
  14. Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
  15. %description
  16. The "load" pragma allows a module developer to give the application
  17. developer more options with regards to optimize for memory or CPU
  18. usage. The "load" pragma gives more control on the moment when
  19. subroutines are loaded and start taking up memory. This allows the
  20. application developer to optimize for CPU usage (by loading all of a
  21. module at compile time and thus reducing the amount of CPU used during
  22. the execution of an application). Or allow the application developer
  23. to optimize for memory usage, by loading subroutines only when they
  24. are actually needed, thereby however increasing the amount of CPU
  25. needed during execution.
  26. %prep
  27. %setup -n %{real_name}-%{version}
  28. %build
  29. %{expand: %%define optflags %{optflags} -fPIC}
  30. perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
  31. make %{?_smp_mflags}
  32. %install
  33. rm -rf %{buildroot}
  34. make pure_install DESTDIR=%{buildroot}
  35. find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
  36. find %{buildroot} -depth -type d -exec rmdir {} ';' 2>/dev/null
  37. %{_fixperms} %{buildroot}
  38. %check
  39. make test
  40. %clean
  41. %{__rm} -rf %{buildroot}
  42. %files
  43. %defattr(-, root, root, -)
  44. %doc MANIFEST README CHANGELOG TODO
  45. %doc %{_mandir}/man3/load.3pm*
  46. %{perl_vendorlib}/load.pm
  47. %changelog
  48. * Sat Mar 10 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.20-1
  49. - initial build for Vine Linux