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