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