]> git.pld-linux.org Git - packages/perl-IP-Country.git/blob - perl-IP-Country.spec
c84bb395bf275cd53815402d51ee124e4411daf2
[packages/perl-IP-Country.git] / perl-IP-Country.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # do not perform "make test"
4 #
5 %include        /usr/lib/rpm/macros.perl
6 %define pdir    IP
7 %define pnam    Country
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
10 Name:           perl-IP-Country
11 Version:        2.28
12 Release:        1
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
21 %if %{with tests}
22 BuildRequires:  perl-Geography-Countries
23 %endif
24 BuildArch:      noarch
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %description
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
32 looking for country.
33
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.
40
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.
47
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.
54
55 %prep
56 %setup -q -n %{pdir}-%{pnam}-%{version}
57
58 %build
59 %{__perl} Makefile.PL \
60         INSTALLDIRS=vendor
61 %{__make}
62
63 %{?with_tests:%{__make} test}
64
65 %install
66 rm -rf $RPM_BUILD_ROOT
67
68 %{__make} install \
69         DESTDIR=$RPM_BUILD_ROOT
70
71 rm -f $RPM_BUILD_ROOT%{perl_vendorlib}/IP/._Authority.pm
72
73 %clean
74 rm -rf $RPM_BUILD_ROOT
75
76 %files
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
84 %{_mandir}/man1/*
85 %{_mandir}/man3/*
This page took 0.047618 seconds and 2 git commands to generate.