3 %bcond_without tests # do not perform "make test"
7 Summary: IP::Country - fast lookup of country codes from IP addresses
8 Summary(pl.UTF-8): IP::Country - szybkie określanie kodów państw na podstawie adresu IP
12 # "same as perl" but read pod, some parts are licensed by APNIC/LARNIC/ARIN/AFRNIC/RIPE databases
13 License: GPL v1+ or Artistic
14 Group: Development/Languages/Perl
15 Source0: http://www.cpan.org/authors/id/N/NW/NWETTERS/%{pdir}-%{pnam}-%{version}.tar.gz
16 # Source0-md5: dcca005cee156935b34a16e1bbddb00e
17 URL: http://search.cpan.org/dist/IP-Country/
18 BuildRequires: perl-devel >= 1:5.8.0
19 BuildRequires: rpm-perlprov >= 4.1-13
21 BuildRequires: perl-Geography-Countries
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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
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.
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.
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
52 odwrotnego DNS i WHOIS.
55 %setup -q -n %{pdir}-%{pnam}-%{version}
58 %{__perl} Makefile.PL \
62 %{?with_tests:%{__make} test}
65 rm -rf $RPM_BUILD_ROOT
68 DESTDIR=$RPM_BUILD_ROOT
70 rm -f $RPM_BUILD_ROOT%{perl_vendorlib}/IP/._Authority.pm
73 rm -rf $RPM_BUILD_ROOT
76 %defattr(644,root,root,755)
77 %doc CHANGES INSTALL README
78 %attr(755,root,root) %{_bindir}/ip2cc
79 %dir %{perl_vendorlib}/IP
80 %{perl_vendorlib}/IP/*.pm
81 %{perl_vendorlib}/IP/Authority
82 %{perl_vendorlib}/IP/Country