]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | # | |
5 | %include /usr/lib/rpm/macros.perl | |
6 | %define pdir Regexp | |
7 | %define pnam Common | |
8 | Summary: Regexp::Common Perl module - commonly requested regular expressions | |
9 | Summary(pl.UTF-8): Moduł Perla Regexp::Common - często używane wyrażenia regularne | |
10 | Name: perl-Regexp-Common | |
11 | Version: 2.120 | |
12 | Release: 2 | |
13 | License: Artistic | |
14 | Group: Development/Languages/Perl | |
15 | Source0: http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz | |
16 | # Source0-md5: a14f2a3c3f2718a567ec26f57a2bae13 | |
17 | BuildRequires: perl-devel >= 1:5.8.0 | |
18 | BuildRequires: rpm-perlprov >= 4.1-13 | |
19 | BuildArch: noarch | |
20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
21 | ||
22 | # not recognized for unknown reason | |
23 | %define _noautoreq 'perl(Regexp::Common::URI)' | |
24 | ||
25 | %description | |
26 | This package contains Regexp::Common module that stores or generates | |
27 | commonly needed regular expressions. Patterns currently provided | |
28 | include: | |
29 | * balanced parentheses and brackets | |
30 | * delimited text (with escapes) | |
31 | * integers and floating-point numbers in any base (up to 36) | |
32 | * comments in C, C++, Perl, and shell | |
33 | * offensive language | |
34 | * lists of any pattern | |
35 | * IPv4 addresses | |
36 | * URIs | |
37 | ||
38 | %description -l pl.UTF-8 | |
39 | Ten pakiet zawiera moduł Regexp::Common, który zawiera lub generuje | |
40 | często potrzebne wyrażenia regularne. Aktualnie zawiera wzorce dla: | |
41 | * zrównoważonych nawiasów | |
42 | * ograniczonego tekstu (z cytowaniem) | |
43 | * liczb całkowitych i zmiennoprzecinkowych o dowolnej podstawie (do 36) | |
44 | * komentarzy w C, C++, Perlu i shellu | |
45 | * słów obraźliwych (w języku angielskim) | |
46 | * list o dowolnym wzorcu | |
47 | * adresów IPv4. | |
48 | * URI | |
49 | ||
50 | %prep | |
51 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
52 | ||
53 | %{__perl} -pi -e 's/^(use 5.004)(73;)(.*)$/$1_$2$3/' lib/Regexp/Common.pm | |
54 | ||
55 | %build | |
56 | %{__perl} Makefile.PL \ | |
57 | INSTALLDIRS=vendor | |
58 | %{__make} | |
59 | ||
60 | %{?with_tests:%{__make} test} | |
61 | ||
62 | %install | |
63 | rm -rf $RPM_BUILD_ROOT | |
64 | ||
65 | %{__make} install \ | |
66 | DESTDIR=$RPM_BUILD_ROOT | |
67 | ||
68 | %clean | |
69 | rm -rf $RPM_BUILD_ROOT | |
70 | ||
71 | %files | |
72 | %defattr(644,root,root,755) | |
73 | %doc README TODO | |
74 | %{perl_vendorlib}/Regexp/*.pm | |
75 | %{perl_vendorlib}/Regexp/Common | |
76 | %{_mandir}/man3/* |