3 %bcond_without tests # do not perform "make test"
6 %define pnam Similarity
7 Summary: String::Similarity - calculate the similarity of two strings
8 Summary(pl.UTF-8): String::Similarity - obliczanie podobieństwa dwóch łańcuchów
9 Name: perl-String-Similarity
14 Group: Development/Languages/Perl
15 Source0: http://www.cpan.org/modules/by-module/String/%{pdir}-%{pnam}-%{version}.tar.gz
16 # Source0-md5: 84936c1d393e92680a5d58039dcb9fd9
17 URL: https://metacpan.org/release/String-Similarity
18 %{?with_tests:BuildRequires: perl-Encode}
19 BuildRequires: perl-devel >= 1:5.8.0
20 BuildRequires: rpm-perlprov >= 4.1-13
21 BuildRequires: rpmbuild(macros) >= 1.745
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 The 'similarity'-function calculates the similarity index of its two
26 arguments. A value of '0' means that the strings are entirely
27 different. A value of '1' means that the strings are identical.
28 Everything else lies between 0 and 1 and describes the amount of
29 similarity between the strings.
31 %description -l pl.UTF-8
32 Funkcja similarity oblicza indeks podobieństwa pomiędzy dwoma
33 parametrami. Wartość '0' oznacza, że łańcuchy są całkowicie różne.
34 Wartość '1' oznacza, że są identyczne. Wszystko inne zawiera się
35 między 0 a 1 i opisuje stopień podobieństwa pomiędzy łańcuchami.
38 %setup -q -n %{pdir}-%{pnam}-%{version}
41 %{__perl} Makefile.PL \
45 OPTIMIZE="%{rpmcflags}"
47 %{?with_tests:%{__make} test}
50 rm -rf $RPM_BUILD_ROOT
53 DESTDIR=$RPM_BUILD_ROOT
56 rm -rf $RPM_BUILD_ROOT
59 %defattr(644,root,root,755)
60 %{perl_vendorarch}/String/Similarity.pm
61 %dir %{perl_vendorarch}/auto/String/Similarity
62 %attr(755,root,root) %{perl_vendorarch}/auto/String/Similarity/Similarity.so
63 %{_mandir}/man3/String::Similarity.3pm*