3 %bcond_without tests # do not perform "make test"
5 %include /usr/lib/rpm/macros.perl
7 %define pnam KeyboardDistance
8 Summary: String::KeyboardDistance - string comparison algorithm
9 Summary(pl.UTF-8): String::KeyboardDistance - algorytm porównywania łańcuchów
10 Name: perl-String-KeyboardDistance
14 Group: Development/Languages/Perl
15 Source0: http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
16 # Source0-md5: 366c4b5641725eb833cca800ee85e352
17 BuildRequires: perl-devel >= 1:5.8.0
18 BuildRequires: rpm-perlprov >= 4.1-13
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 This module implemements a version of keyboard distance for fuzzy
24 string matching. Keyboard distance is a measure of the physical
25 distance between two keys on a keyboard. For example, 'g' has a
26 distance of 1 from the keys 'r', 't', 'y', 'f', 'h', 'v', 'b', and
27 'n'. Immediate diagonals (like 'r', 'y', 'v', and 'n') are considered
28 to have a distance of 1 instead of 1.414 to help to prevent
29 horizontal/vertical bias.
31 %description -l pl.UTF-8
32 Ten moduł jest implementacją pewnej wersji odległości klawiaturowej
33 do rozmytego dopasowywania łańcuchów. Odległość klawiaturowa to miara
34 fizycznej odległości pomiędzy dwoma klawiszami na klawiaturze. Na
35 przykład, 'g' ma odległość 1 od klawiszy 'r', 't', 'y', 'f', 'h', 'v',
36 'b' i 'n'. Dla bezpośrednich sąsiadów po przekątnej (jak 'r', 'y', 'v'
37 i 'n') uznaje się odległość 1 zamiast 1.414, aby zapobiec skłonnościom
41 %setup -q -n %{pdir}-%{pnam}-%{version}
44 %{__perl} Makefile.PL \
48 %{?with_tests:%{__make} test}
51 rm -rf $RPM_BUILD_ROOT
54 DESTDIR=$RPM_BUILD_ROOT
57 rm -rf $RPM_BUILD_ROOT
60 %defattr(644,root,root,755)
61 %{perl_vendorlib}/%{pdir}/*.pm