]>
Commit | Line | Data |
---|---|---|
16693300 | 1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | # | |
16693300 | 5 | %define pdir IP |
6 | %define pnam Country | |
7 | Summary: IP::Country - fast lookup of country codes from IP addresses | |
727a47ee | 8 | Summary(pl.UTF-8): IP::Country - szybkie określanie kodów państw na podstawie adresu IP |
16693300 | 9 | Name: perl-IP-Country |
b176b478 | 10 | Version: 2.28 |
042597ca | 11 | Release: 1 |
04feff72 | 12 | # "same as perl" but read pod, some parts are licensed by APNIC/LARNIC/ARIN/AFRNIC/RIPE databases |
880a5fc0 | 13 | License: GPL v1+ or Artistic |
16693300 | 14 | Group: Development/Languages/Perl |
eb732794 | 15 | Source0: http://www.cpan.org/authors/id/N/NW/NWETTERS/%{pdir}-%{pnam}-%{version}.tar.gz |
b176b478 | 16 | # Source0-md5: dcca005cee156935b34a16e1bbddb00e |
880a5fc0 | 17 | URL: http://search.cpan.org/dist/IP-Country/ |
16693300 | 18 | BuildRequires: perl-devel >= 1:5.8.0 |
19 | BuildRequires: rpm-perlprov >= 4.1-13 | |
20 | %if %{with tests} | |
eb732794 | 21 | BuildRequires: perl-Geography-Countries |
16693300 | 22 | %endif |
23 | BuildArch: noarch | |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
25 | ||
26 | %description | |
eb732794 JB |
27 | Finding the home country of a client using only the IP address can be |
28 | difficult. Looking up the domain name associated with that address can | |
29 | provide some help, but many IP address are not reverse mapped to any | |
30 | useful domain, and the most common domain (.com) offers no help when | |
31 | looking for country. | |
16693300 | 32 | |
eb732794 JB |
33 | This module comes bundled with a database of countries where various |
34 | IP addresses have been assigned. Although the country of assignment | |
35 | will probably be the country associated with a large ISP rather than | |
36 | the client herself, this is probably good enough for most log analysis | |
37 | applications, and under test has proved to be as accurate as | |
38 | reverse-DNS and WHOIS lookup. | |
16693300 | 39 | |
5a4fbc79 JR |
40 | %description -l pl.UTF-8 |
41 | Określanie kraju pochodzenia klienta przy użyciu samego adresu IP może | |
42 | być trudne. Sprawdzanie nazwy domeny związanej z adresem może być | |
43 | trochę pomocne, ale wiele adresów IP nie mają odwrotnego odwzorowania | |
44 | na żadną użyteczną domenę, a najpopularniejsza domena (.com) nie | |
45 | pomaga w określeniu kraju. | |
eb732794 | 46 | |
5a4fbc79 JR |
47 | Ten moduł jest dostarczany wraz z bazą danych krajów, do których |
48 | przypisano różne adresy IP. Choć kraj przypisania będzie | |
49 | prawdopodobnie krajem związanym raczej z dużym ISP niż samym klientem, | |
50 | jest to zwykle wystarczające do większości analiz logów aplikacji, a | |
51 | testy dowiodły, że jest to tak samo dokładne, jak odwzorowania | |
eb732794 | 52 | odwrotnego DNS i WHOIS. |
16693300 | 53 | |
54 | %prep | |
55 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
56 | ||
57 | %build | |
58 | %{__perl} Makefile.PL \ | |
59 | INSTALLDIRS=vendor | |
60 | %{__make} | |
61 | ||
62 | %{?with_tests:%{__make} test} | |
63 | ||
64 | %install | |
65 | rm -rf $RPM_BUILD_ROOT | |
66 | ||
67 | %{__make} install \ | |
68 | DESTDIR=$RPM_BUILD_ROOT | |
69 | ||
30b2fc30 | 70 | rm -f $RPM_BUILD_ROOT%{perl_vendorlib}/IP/._Authority.pm |
71 | ||
16693300 | 72 | %clean |
73 | rm -rf $RPM_BUILD_ROOT | |
74 | ||
75 | %files | |
76 | %defattr(644,root,root,755) | |
77 | %doc CHANGES INSTALL README | |
880a5fc0 | 78 | %attr(755,root,root) %{_bindir}/ip2cc |
eb732794 | 79 | %dir %{perl_vendorlib}/IP |
16693300 | 80 | %{perl_vendorlib}/IP/*.pm |
a6e838c7 | 81 | %{perl_vendorlib}/IP/Authority |
16693300 | 82 | %{perl_vendorlib}/IP/Country |
04feff72 | 83 | %{_mandir}/man1/* |
880a5fc0 | 84 | %{_mandir}/man3/* |