]>
Commit | Line | Data |
---|---|---|
ee20fd4e | 1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | # | |
5 | %include /usr/lib/rpm/macros.perl | |
6 | %define pdir Variable | |
7 | %define pnam Magic | |
8 | Summary: Variable::Magic - Associate user-defined magic to variables from Perl | |
9 | #Summary(pl.UTF-8): | |
10 | Name: perl-Variable-Magic | |
c916eacf | 11 | Version: 0.47 |
61e241ae | 12 | Release: 2 |
ee20fd4e | 13 | # same as perl |
14 | License: GPL v1+ or Artistic | |
15 | Group: Development/Languages/Perl | |
48be34ef | 16 | Source0: http://www.perl.com/CPAN/modules/by-module/Variable/%{pdir}-%{pnam}-%{version}.tar.gz |
c916eacf | 17 | # Source0-md5: ee8b101120e7971d6232aac339fb3472 |
ee20fd4e | 18 | URL: http://search.cpan.org/dist/Variable-Magic/ |
19 | BuildRequires: perl-devel >= 1:5.8.0 | |
20 | BuildRequires: rpm-perlprov >= 4.1-13 | |
21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
22 | ||
23 | %description | |
24 | Magic is Perl way of enhancing objects. | |
25 | ||
26 | This mechanism let the user add extra data to any variable and hook | |
27 | syntaxical operations (such as access, assignation or destruction) | |
28 | that can be applied to it. | |
29 | ||
30 | With this module, you can add your own magic to any variable without | |
31 | the pain of the C API. | |
32 | ||
33 | # %description -l pl.UTF-8 | |
34 | # TODO | |
35 | ||
36 | %prep | |
37 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
38 | ||
39 | %build | |
40 | %{__perl} Makefile.PL \ | |
41 | INSTALLDIRS=vendor | |
42 | %{__make} \ | |
43 | CC="%{__cc}" \ | |
44 | OPTIMIZE="%{rpmcflags}" | |
45 | ||
46 | %{?with_tests:%{__make} test} | |
47 | ||
48 | %install | |
49 | rm -rf $RPM_BUILD_ROOT | |
50 | ||
51 | %{__make} pure_install \ | |
52 | DESTDIR=$RPM_BUILD_ROOT | |
53 | ||
54 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
55 | cp -a samples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
56 | ||
57 | %clean | |
58 | rm -rf $RPM_BUILD_ROOT | |
59 | ||
60 | %files | |
61 | %defattr(644,root,root,755) | |
62 | %doc Changes README | |
63 | %{perl_vendorarch}/Variable/*.pm | |
64 | %dir %{perl_vendorarch}/auto/Variable/Magic | |
65 | %attr(755,root,root) %{perl_vendorarch}/auto/Variable/Magic/*.so | |
66 | %{_mandir}/man3/* | |
67 | %{_examplesdir}/%{name}-%{version} |