]>
Commit | Line | Data |
---|---|---|
49af9da9 | 1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | # | |
12b6d072 | 5 | %define pdir Tree |
6 | %define pnam Trie | |
959770bc | 7 | Summary: Tree::Trie - an implementation of the Trie data structure in Perl |
5f6f5737 | 8 | Summary(pl.UTF-8): Tree::Trie - implementacja perlowa struktury danych Trie |
fe4f5817 | 9 | Name: perl-Tree-Trie |
f0254b04 | 10 | Version: 1.9 |
7a4e25ce | 11 | Release: 1 |
49af9da9 | 12 | # same as perl |
13 | License: GPL v1+ or Artistic | |
fe4f5817 | 14 | Group: Development/Languages/Perl |
e5be7abf | 15 | Source0: http://www.cpan.org/modules/by-module/Tree/%{pdir}-%{pnam}-%{version}.tar.gz |
f0254b04 | 16 | # Source0-md5: 1b823d1896e43279227d65e6ff947d98 |
e5be7abf | 17 | URL: http://search.cpan.org/dist/Tree-Trie/ |
225b1ef4 | 18 | BuildRequires: perl-devel >= 1:5.8.0 |
8a2d8bad | 19 | BuildRequires: rpm-perlprov >= 4.1-13 |
d2d30fc0 MP |
20 | %if %{with tests} |
21 | BuildRequires: perl-Test-Pod-Coverage | |
22 | %endif | |
e5d9bc5a | 23 | BuildArch: noarch |
550d67c8 | 24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
fe4f5817 | 25 | |
26 | %description | |
c2c4c98d JB |
27 | This module implements a trie data structure. The term "trie" comes |
28 | from the word re*trie*val, but is generally pronounced like "try". A | |
29 | trie is a tree structure (or directed acyclic graph), the nodes of | |
30 | which represent letters in a word. For example, the final lookup for | |
31 | the word 'bob' would look something like | |
32 | $ref->{'b'}{'o'}{'b'}{HASH(0x80c6bbc)} (the HASH being an end | |
33 | marker). Only nodes which would represent words in the trie exist, | |
34 | making the structure slightly smaller than a hash of the same data | |
35 | set. | |
36 | ||
99b97fd0 JR |
37 | %description -l pl.UTF-8 |
38 | Ten moduł jest implementacją struktury danych Trie. Termin "trie" | |
39 | pochodzi od słowa "re*trie*val" (odtwarzanie, odzyskiwanie), ale | |
40 | jest wymawiany jak angielskie słowo "try". Trie to struktura | |
41 | drzewiasta (lub skierowany graf acykliczny), której węzły reprezentują | |
42 | litery w słowie. Na przykład, końcowe wyszukiwanie słowa "bob" będzie | |
43 | wyglądać podobnie do $ref->{'b'}{'o'}{'b'}{HASH(0x80c6bbc)} (gdzie | |
44 | HASH jest znacznikiem końca). W strukturze istnieją tylko węzły | |
45 | reprezentujące słowa, co czyni strukturę mniejszą niż hasz z tego | |
c2c4c98d | 46 | samego zbioru danych. |
fe4f5817 | 47 | |
48 | %prep | |
4eef7744 | 49 | %setup -q -n %{pdir}-%{pnam}-%{version} |
fe4f5817 | 50 | |
51 | %build | |
8a2d8bad | 52 | %{__perl} Makefile.PL \ |
76f35363 | 53 | INSTALLDIRS=vendor |
d4c857aa | 54 | %{__make} |
fe4f5817 | 55 | |
49af9da9 | 56 | %{?with_tests:%{__make} test} |
57 | ||
fe4f5817 | 58 | %install |
59 | rm -rf $RPM_BUILD_ROOT | |
fe4f5817 | 60 | |
49af9da9 | 61 | %{__make} install \ |
62 | DESTDIR=$RPM_BUILD_ROOT | |
fe4f5817 | 63 | |
fe4f5817 | 64 | %clean |
65 | rm -rf $RPM_BUILD_ROOT | |
66 | ||
67 | %files | |
68 | %defattr(644,root,root,755) | |
16931d4f | 69 | %doc Changes README |
8a2d8bad | 70 | %{perl_vendorlib}/Tree/Trie.pm |
fe4f5817 | 71 | %{_mandir}/man3/* |