]>
Commit | Line | Data |
---|---|---|
2b15a45a MP |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
16df8f5e | 4 | |
2b15a45a MP |
5 | %define pdir Text |
6 | %define pnam DeDuper | |
16df8f5e | 7 | %include /usr/lib/rpm/macros.perl |
2b15a45a | 8 | Summary: Text::DeDuper - near duplicates detection module |
2b15a45a | 9 | Name: perl-Text-DeDuper |
f720c073 | 10 | Version: 1.01 |
2b15a45a MP |
11 | Release: 1 |
12 | # same as perl | |
13 | License: GPL v1+ or Artistic | |
14 | Group: Development/Languages/Perl | |
15 | Source0: http://www.cpan.org/modules/by-module/Text/%{pdir}-%{pnam}-%{version}.tar.gz | |
f720c073 | 16 | # Source0-md5: bb1adbc25100db21acd2ccbc9c7c7328 |
16df8f5e | 17 | URL: http://search.cpan.org/dist/Text-DeDuper/ |
2b15a45a MP |
18 | BuildRequires: perl-devel >= 1:5.8.0 |
19 | BuildRequires: rpm-perlprov >= 4.1-13 | |
20 | %if %{with tests} | |
21 | BuildRequires: perl(Digest::MD4) >= 1.5 | |
22 | BuildRequires: perl-Encode >= 2.12 | |
23 | %endif | |
24 | BuildArch: noarch | |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
26 | ||
27 | %description | |
16df8f5e ER |
28 | This module uses the resemblance measure as proposed by Andrei Z. |
29 | Broder at al | |
30 | (http://www.ra.ethz.ch/CDstore/www6/Technical/Paper205/Paper205.html) | |
31 | to detect similar (near-duplicate) documents based on their text. | |
32 | ||
33 | Note of caution: The module only works correctly with languages where | |
34 | texts can be tokenised to words by detecting alphabetical characters | |
35 | sequences. Therefore it might not provide very good results for e.g. | |
36 | Chinese. | |
2b15a45a MP |
37 | |
38 | %prep | |
39 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
40 | mv t/pod{.t,.notused} | |
41 | ||
42 | %build | |
43 | %{__perl} Makefile.PL \ | |
44 | INSTALLDIRS=vendor | |
45 | %{__make} | |
46 | ||
47 | %{?with_tests:%{__make} test} | |
48 | ||
49 | %install | |
50 | rm -rf $RPM_BUILD_ROOT | |
51 | ||
52 | %{__make} pure_install \ | |
53 | DESTDIR=$RPM_BUILD_ROOT | |
54 | ||
55 | %clean | |
56 | rm -rf $RPM_BUILD_ROOT | |
57 | ||
58 | %files | |
59 | %defattr(644,root,root,755) | |
60 | %{perl_vendorlib}/Text/*.pm | |
61 | %{_mandir}/man3/* |