]>
Commit | Line | Data |
---|---|---|
8c988e5c JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | # | |
5 | %define pdir Text | |
6 | %define pnam Soundex | |
8c988e5c JB |
7 | Summary: Text::Soundex - Implementation of the soundex algorithm |
8 | Summary(pl.UTF-8): Text::Soundex - implementacja algorytmu soundex | |
9 | Name: perl-Text-Soundex | |
d81991bc | 10 | Version: 3.05 |
065017c5 | 11 | Release: 3 |
8c988e5c JB |
12 | License: free (see COPYING) |
13 | Group: Development/Languages/Perl | |
14 | Source0: http://www.cpan.org/modules/by-module/Text/%{pdir}-%{pnam}-%{version}.tar.gz | |
d81991bc | 15 | # Source0-md5: cb40ded7a5d27aa3a411d274d6ec18ae |
8c988e5c JB |
16 | URL: http://search.cpan.org/dist/Text-Soundex/ |
17 | BuildRequires: perl-devel >= 1:5.8.0 | |
18 | BuildRequires: rpm-perlprov >= 4.1-13 | |
19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
20 | ||
21 | %description | |
22 | Soundex is a phonetic algorithm for indexing names by sound, as | |
23 | pronounced in English. The goal is for names with the same | |
24 | pronunciation to be encoded to the same representation so that they | |
25 | can be matched despite minor differences in spelling. Soundex is the | |
26 | most widely known of all phonetic algorithms and is often used | |
27 | (incorrectly) as a synonym for "phonetic algorithm". Improvements to | |
28 | Soundex are the basis for many modern phonetic algorithms. (Wikipedia, | |
29 | 2007) | |
30 | ||
31 | This module implements the original soundex algorithm developed by | |
32 | Robert Russell and Margaret Odell, patented in 1918 and 1922, as well | |
33 | as a variation called "American Soundex" used for US census data, and | |
34 | current maintained by the National Archives and Records Administration | |
35 | (NARA). | |
36 | ||
37 | The soundex algorithm may be recognized from Donald Knuth's | |
38 | The Art of Computer Programming. The algorithm described by | |
39 | Knuth is the NARA algorithm. | |
40 | ||
41 | %description -l pl.UTF-8 | |
42 | Soundex to algorytm fonetyczny do indeksowania nazw według brzmienia w | |
43 | języku angielskim. Celem jest, aby nazwy o tej samej wymowie miały | |
44 | taką samą reprezentację, przez co mogą być dopasowane niezależnie od | |
45 | niewielkich różnic w pisowni. Soundex to najbardziej znany algorytm | |
46 | fonetyczny, zwykle używany (niewłaściwie) jako synonim algorytmu | |
47 | fonetycznego. (Wikipedia angielska, 2007) | |
48 | ||
49 | Ten moduł implementuje oryginalny algorytm soundex opracowany przez | |
50 | Roberta Russella oraz Margaret Odell, opatentowany w 1918 i 1922, oraz | |
51 | wariację o nazwie "soundex amerykański" używany dla danych ludności w | |
52 | USA, obecnie zarządzany przez NARA (National Archives and Records | |
53 | Administration). | |
54 | ||
55 | Algorytm soundex można znaleźć w "The Art of Computer Programming" | |
56 | Donalda Knutha. Algorytm opisany przez Knutha to algorytm NARA. | |
57 | ||
58 | %prep | |
59 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
60 | ||
61 | # extract copyright information | |
62 | %{__sed} -n -e '3,12p' Soundex.pm > COPYING | |
63 | ||
64 | %build | |
65 | %{__perl} Makefile.PL \ | |
66 | INSTALLDIRS=vendor | |
67 | %{__make} \ | |
68 | CC="%{__cc}" \ | |
69 | OPTIMIZE="%{rpmcflags}" | |
70 | ||
71 | %{?with_tests:%{__make} test} | |
72 | ||
73 | %install | |
74 | rm -rf $RPM_BUILD_ROOT | |
75 | ||
76 | %{__make} pure_install \ | |
77 | DESTDIR=$RPM_BUILD_ROOT | |
78 | ||
79 | %clean | |
80 | rm -rf $RPM_BUILD_ROOT | |
81 | ||
82 | %files | |
83 | %defattr(644,root,root,755) | |
84 | %doc COPYING Changes | |
85 | %{perl_vendorarch}/Text/Soundex.pm | |
86 | %dir %{perl_vendorarch}/auto/Text/Soundex | |
87 | %attr(755,root,root) %{perl_vendorarch}/auto/Text/Soundex/Soundex.so | |
88 | %{_mandir}/man3/Text::Soundex.3pm* |