]>
Commit | Line | Data |
---|---|---|
6ab2eed0 JB |
1 | # |
2 | # Conditional build: | |
36b2a9e2 | 3 | %bcond_without tests # do not perform "make test" |
08cece21 | 4 | |
c377e3a0 | 5 | %define pdir Regexp |
6 | %define pnam Tr | |
08cece21 | 7 | %include /usr/lib/rpm/macros.perl |
6ab2eed0 | 8 | Summary: Regexp::Tr - run-time-compiled tr/// objects |
06151760 | 9 | Summary(pl.UTF-8): Regexp::Tr - obiekty tr/// kompilowane w czasie wykonywania |
6ab2eed0 JB |
10 | Name: perl-Regexp-Tr |
11 | Version: 0.05 | |
0374dc24 | 12 | Release: 2 |
c02e2e01 | 13 | # same as perl |
6ab2eed0 JB |
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: 1c01cb427ae8cfeba5d92fb392336510 | |
08cece21 | 18 | URL: http://search.cpan.org/dist/Regexp-Tr/ |
ff56397d | 19 | BuildRequires: perl-devel >= 1:5.8.0 |
6ab2eed0 JB |
20 | BuildRequires: rpm-perlprov >= 4.1-13 |
21 | BuildArch: noarch | |
22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
23 | ||
24 | %description | |
25 | One very useful ability of Perl is to do relatively cheap | |
26 | transliteration via the tr/// regex operator. Unfortunately, Perl | |
27 | requires tr/// to be known at compile-time. The common solution has | |
28 | been to put an eval around any dynamic tr/// operations, but that is | |
29 | very expensive to be used often (for instance, within a loop). This | |
30 | module solves that problem by compiling the tr/// a single time and | |
31 | allowing the user to use it repeatedly and delete it when it it no | |
32 | longer useful. | |
33 | ||
63a59b0b JR |
34 | %description -l pl.UTF-8 |
35 | Jedna z bardzo przydatnych możliwości Perla to w miarę tania zamiana | |
36 | znaków przez operator tr///. Niestety Perl wymaga, aby tr/// było | |
37 | znane w czasie kompilacji. Popularne rozwiązanie to otoczenie przez | |
38 | eval wszystkich dynamicznych operacji tr///, ale ma to bardzo duży | |
39 | narzut czasowy, jeśli jest używane często (na przykład w pętli). Ten | |
40 | moduł rozwiązuje problem poprzez kompilowanie wyrażenia tr/// jeden | |
08cece21 ER |
41 | raz, a następnie pozwolenie użytkownikowi na wielokrotne używanie go i |
42 | usunięcie, kiedy przestaje być potrzebne. | |
6ab2eed0 JB |
43 | |
44 | %prep | |
45 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
46 | ||
47 | %build | |
48 | %{__perl} Makefile.PL \ | |
49 | INSTALLDIRS=vendor | |
6ab2eed0 JB |
50 | %{__make} |
51 | ||
36b2a9e2 | 52 | %{?with_tests:%{__make} test} |
6ab2eed0 JB |
53 | |
54 | %install | |
55 | rm -rf $RPM_BUILD_ROOT | |
56 | ||
57 | %{__make} install \ | |
58 | DESTDIR=$RPM_BUILD_ROOT | |
59 | ||
60 | %clean | |
61 | rm -rf $RPM_BUILD_ROOT | |
62 | ||
63 | %files | |
64 | %defattr(644,root,root,755) | |
65 | %doc README | |
66 | %{perl_vendorlib}/Regexp/Tr.pm | |
67 | %{_mandir}/man3/* |