]> git.pld-linux.org Git - packages/perl-String-Trigram.git/blame - perl-String-Trigram.spec
- rebuild with perl 5.28.0
[packages/perl-String-Trigram.git] / perl-String-Trigram.spec
CommitLineData
e2219f2f 1#
2# Conditional build:
db0fd4cd 3%bcond_without tests # do not perform "make test"
cac09246 4#
e2219f2f 5%include /usr/lib/rpm/macros.perl
e6563bde 6%define pdir String
7%define pnam Trigram
cac09246 8Summary: String::Trigram - find similar strings by trigram method
3536ac76 9Summary(pl.UTF-8): String::Trigram - poszukiwanie podobnych łańcuchów metodą trygramów
e2219f2f 10Name: perl-String-Trigram
4b140aab 11Version: 0.11
e2c090fe 12Release: 11
cac09246 13Epoch: 1
c075ab5d 14# same as perl
15License: GPL v1+ or Artistic
e2219f2f 16Group: Development/Languages/Perl
686c97d4 17Source0: http://www.cpan.org/modules/by-module/String/%{pdir}-%{pnam}-%{version}.tar.gz
4b140aab 18# Source0-md5: 43e5234ecfb00ab06f5f07f45043b6dc
686c97d4 19URL: http://search.cpan.org/dist/String-Trigram/
d8e322a3 20BuildRequires: perl-devel >= 1:5.8.0
13c3223c 21BuildRequires: rpm-perlprov >= 4.1-13
e2219f2f 22BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24%description
7b330706
JB
25This module computes the similarity of two strings based on the
26trigram method. This consists in splitting some string into triples of
27characters and comparing those to the trigrams of some other string.
28For example the string kangaroo has the trigrams {kan ang nga gar aro
29roo}. A wrongly typed kanagaroo has the trigrams {kan ana nag aga gar
30aro roo}. To compute the similarity we (roughly) divide the number of
31matching trigrams (tokens not types) by the number of all trigrams
32(types not tokens). For our example this means dividing 4 / 9
33resulting in 0.44.
34
e99afcc2
JR
35%description -l pl.UTF-8
36Ten moduł oblicza podobieństwo dwóch łańcuchów bazując na metodzie
37trygramów. Składa się ona z dzielenia łańcucha na trójki znaków i
38porównywanie tych trygramów z jakimś innym łańcuchem. Na przykład
39łańcuch "kangaroo" zawiera trygramy {kan ang nga gar aro roo}. Źle
7b330706 40napisane "kanagaroo" zawiera trygramy {kan ana nag aga gar aro roo}.
e99afcc2
JR
41Aby obliczyć podobieństwo, dzielimy (zgrubnie) liczbę pasujących
42trygramów (tokenów, nie typów) przez liczbę wszystkich trygramów
43(typów, nie tokenów). W naszym przykładzie oznacza to dzielenie 4 / 9,
44co daje wartość 0.44.
e2219f2f 45
46%prep
47%setup -q -n %{pdir}-%{pnam}-%{version}
48
49%build
13c3223c 50%{__perl} Makefile.PL \
b4cbd8fd 51 INSTALLDIRS=vendor
cac09246 52%{__make} \
a6dc13e5 53 CC="%{__cc}" \
cac09246 54 OPTIMIZE="%{rpmcflags}"
7b330706 55
db0fd4cd 56%{?with_tests:%{__make} test}
e2219f2f 57
58%install
59rm -rf $RPM_BUILD_ROOT
60
db0fd4cd 61%{__make} install \
62 DESTDIR=$RPM_BUILD_ROOT
e2219f2f 63
64%clean
65rm -rf $RPM_BUILD_ROOT
66
67%files
68%defattr(644,root,root,755)
cac09246
JB
69%{perl_vendorarch}/String/*.pm
70%dir %{perl_vendorarch}/auto/String/Trigram
cac09246 71%attr(755,root,root) %{perl_vendorarch}/auto/String/Trigram/*.so
e2219f2f 72%{_mandir}/man3/*
This page took 0.087385 seconds and 4 git commands to generate.