]>
Commit | Line | Data |
---|---|---|
08cb4faa | 1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | # | |
5 | %include /usr/lib/rpm/macros.perl | |
6 | %define pdir UNIVERSAL | |
7 | %define pnam require | |
8 | Summary: UNIVERSAL::require - require() modules from a variable | |
9 | #Summary(pl): | |
10 | Name: perl-UNIVERSAL-require | |
11 | Version: 0.10 | |
12 | Release: 1 | |
13 | # same as perl | |
14 | License: GPL v1+ or Artistic | |
15 | Group: Development/Languages/Perl | |
16 | Source0: http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz | |
17 | # Source0-md5: 4ea51136ee7052bb37dc52c7cb8945b0 | |
18 | BuildRequires: perl-devel >= 1:5.8.0 | |
19 | BuildRequires: rpm-perlprov >= 4.1-13 | |
20 | Conflicts: perl-UNIVERSAL-exports <= 0.03 | |
21 | BuildArch: noarch | |
22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
23 | ||
24 | %description | |
25 | If you've ever had to do this... | |
26 | ||
27 | eval "require $module"; | |
28 | ||
29 | to get around the bareword caveats on require(), this module is for | |
30 | you. It creates a universal require() class method that will work | |
31 | with every Perl module and its secure. So instead of doing some | |
32 | arcane eval() work, you can do this: | |
33 | ||
34 | $module->require; | |
35 | ||
36 | # %description -l pl | |
37 | # TODO | |
38 | ||
39 | %prep | |
40 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
41 | ||
42 | %build | |
43 | %{__perl} Makefile.PL \ | |
44 | INSTALLDIRS=vendor | |
45 | %{__make} | |
46 | ||
47 | %{?with_tests:%{__make} test} | |
48 | ||
49 | %install | |
50 | rm -rf $RPM_BUILD_ROOT | |
51 | ||
52 | %{__make} install \ | |
53 | DESTDIR=$RPM_BUILD_ROOT | |
54 | ||
55 | %clean | |
56 | rm -rf $RPM_BUILD_ROOT | |
57 | ||
58 | %files | |
59 | %defattr(644,root,root,755) | |
60 | %doc Changes | |
61 | %{perl_vendorlib}/UNIVERSAL/*.pm | |
62 | %{_mandir}/man3/* |