]>
Commit | Line | Data |
---|---|---|
7077a6af | 1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | # | |
fb3836a1 | 5 | %define pdir Net |
6 | %define pnam Patricia | |
10219915 | 7 | Summary: Net::Patricia - Patricia Trie Perl module for fast IP address lookups |
c848b220 | 8 | Summary(pl.UTF-8): Net::Patricia - moduł Perla Patricia Trie do szybkiego wyszukiwania adresów IP |
f6e6cb39 | 9 | Name: perl-Net-Patricia |
5cdc7629 | 10 | Version: 1.22 |
41e171c7 | 11 | Release: 11 |
7077a6af | 12 | License: GPL v2+ |
f6e6cb39 | 13 | Group: Development/Languages/Perl |
96ac500c | 14 | Source0: http://www.cpan.org/modules/by-module/Net/%{pdir}-%{pnam}-%{version}.tar.gz |
5cdc7629 | 15 | # Source0-md5: ef838f7512b050ca4b35d742f9565b3b |
c0e24076 | 16 | Patch0: %{name}-link.patch |
96ac500c | 17 | URL: https://metacpan.org/release/Net-Patricia |
c0e24076 | 18 | BuildRequires: perl-Net-CIDR-Lite >= 0.20 |
796c2ecc | 19 | BuildRequires: perl-Socket6 |
8a41e6d7 | 20 | BuildRequires: perl-devel >= 1:5.8.0 |
c0e24076 JB |
21 | %if %{with tests} |
22 | BuildRequires: perl-Test-Simple >= 0.88 | |
23 | %endif | |
10219915 | 24 | BuildRequires: rpm-perlprov >= 4.1-13 |
96ac500c | 25 | BuildRequires: rpmbuild(macros) >= 1.745 |
f6e6cb39 AM |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
27 | ||
28 | %description | |
84eae822 | 29 | This module uses a Patricia Trie data structure to quickly perform IP |
30 | address prefix matching for applications such as IP subnet, network or | |
31 | routing table lookups. | |
32 | ||
33 | The data structure is based on a radix tree using a radix of two, | |
34 | so sometimes you see patricia implementations called "radix" as well. | |
35 | The term "Trie" is derived from the word "retrieval" but is pronounced | |
36 | like "try". Patricia stands for "Practical Algorithm to Retrieve | |
10219915 JB |
37 | Information Coded as Alphanumeric", and was first suggested for |
38 | routing table lookups by Van Jacobsen. Patricia Trie performance | |
39 | characteristics are well-known as it has been employed for routing | |
40 | table lookups within the BSD kernel since the 4.3 Reno release. | |
41 | ||
e5bf6b87 JR |
42 | %description -l pl.UTF-8 |
43 | Ten moduł używa struktury danych Patricia Trie do wykonywania | |
44 | szybkiego dopasowywania prefiksów IP dla zastosowań takich jak | |
10219915 | 45 | przeszukiwanie podsieci IP, sieci czy tabel routingu. |
84eae822 | 46 | |
10219915 | 47 | Struktura danych jest oparta na drzewie radix przy podstawie |
e5bf6b87 JR |
48 | wynoszącej 2 - implementacje patricia czasem są nazywane także radix. |
49 | Termin "Trie" pochodzi od słowa "retrieval" (odczytywanie), ale jest | |
50 | wymawiany jak "try". Patricia to skrót od "Practical Algorithm to | |
10219915 JB |
51 | Retrieve Information Coded as Alphanumeric" (praktyczny algorytm |
52 | odczytywania informacji zakodowanych alfanumerycznie) i jako | |
53 | pierwszy zaproponowany do przeszukiwania tabel routingu przez Van | |
e5bf6b87 JR |
54 | Jacobsena. Charakterystyki wydajności Patricia Trie są dobrze znane, |
55 | jako że struktura ta jest wykorzystywana przy przeszukiwaniu tabel | |
56 | routingu w jądrze BSD od wersji 4.3 Reno. | |
34897f4d | 57 | |
f6e6cb39 | 58 | %prep |
eafd7b72 | 59 | %setup -q -n %{pdir}-%{pnam}-%{version} |
c0e24076 | 60 | %patch0 -p1 |
f6e6cb39 AM |
61 | |
62 | %build | |
b640fd86 | 63 | %{__perl} Makefile.PL \ |
5c4e5af6 | 64 | INSTALLDIRS=vendor |
7077a6af | 65 | %{__make} \ |
7838af19 | 66 | CC="%{__cc}" \ |
7077a6af | 67 | OPTIMIZE="%{rpmcflags}" |
68 | ||
69 | %{?with_tests:%{__make} test} | |
f6e6cb39 AM |
70 | |
71 | %install | |
72 | rm -rf $RPM_BUILD_ROOT | |
73 | ||
7077a6af | 74 | %{__make} install \ |
75 | DESTDIR=$RPM_BUILD_ROOT | |
f6e6cb39 | 76 | |
f6e6cb39 AM |
77 | %clean |
78 | rm -rf $RPM_BUILD_ROOT | |
79 | ||
80 | %files | |
81 | %defattr(644,root,root,755) | |
34897f4d | 82 | %doc Changes README |
96ac500c | 83 | %{perl_vendorarch}/Net/Patricia.pm |
b640fd86 | 84 | %dir %{perl_vendorarch}/auto/Net/Patricia |
85 | %attr(755,root,root) %{perl_vendorarch}/auto/Net/Patricia/Patricia.so | |
96ac500c | 86 | %{_mandir}/man3/Net::Patricia.3pm* |