]>
Commit | Line | Data |
---|---|---|
372afb6d | 1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | # | |
5 | %include /usr/lib/rpm/macros.perl | |
6 | %define pdir Data | |
7 | %define pnam Denter | |
8 | Summary: Data::Denter - An (deprecated) alternative to Data::Dumper and Storable. | |
9 | #Summary(pl): | |
10 | Name: perl-Data-Denter | |
11 | Version: 0.15 | |
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: 819e5c05fb61e90f4c1311286b080405 | |
18 | BuildRequires: perl-devel >= 1:5.6 | |
19 | BuildRequires: rpm-perlprov >= 4.1-13 | |
20 | %if %{with tests} | |
21 | BuildRequires: perl-YAML | |
22 | %endif | |
23 | BuildArch: noarch | |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
25 | ||
26 | %description | |
27 | The main problem with Data::Dumper (one of my all-time favorite | |
28 | modules) is that you have to use C<eval()> to deserialize the data | |
29 | you've dumped. This is great if you can trust the data you're evaling, | |
30 | but horrible if you can't. A good alternative is Storable.pm. It can | |
31 | safely thaw your frozen data. But if you want to read/edit the frozen | |
32 | data, you're out of luck, because Storable uses a binary format. Even | |
33 | Data::Dumper's output can be a little cumbersome for larger data objects. | |
34 | ||
35 | # %description -l pl | |
36 | # TODO | |
37 | ||
38 | %prep | |
39 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
40 | ||
41 | %build | |
42 | %{__perl} Makefile.PL \ | |
43 | INSTALLDIRS=vendor | |
44 | %{__make} | |
45 | ||
46 | %{?with_tests:%{__make} test} | |
47 | ||
48 | %install | |
49 | rm -rf $RPM_BUILD_ROOT | |
50 | ||
51 | %{__make} install \ | |
52 | DESTDIR=$RPM_BUILD_ROOT | |
53 | ||
54 | %clean | |
55 | rm -rf $RPM_BUILD_ROOT | |
56 | ||
57 | %files | |
58 | %defattr(644,root,root,755) | |
59 | %doc Changes README | |
60 | %{perl_vendorlib}/%{pdir}/*.pm | |
61 | %{_mandir}/man3/* |