]> git.pld-linux.org Git - packages/perl-IP-Country.git/blob - perl-IP-Country.spec
- drop obsolete and outdated manual inclusion of rpm macros
[packages/perl-IP-Country.git] / perl-IP-Country.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # do not perform "make test"
4 #
5 %define pdir    IP
6 %define pnam    Country
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
9 Name:           perl-IP-Country
10 Version:        2.28
11 Release:        1
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
20 %if %{with tests}
21 BuildRequires:  perl-Geography-Countries
22 %endif
23 BuildArch:      noarch
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %description
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.
32
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.
39
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.
46
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.
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
70 rm -f $RPM_BUILD_ROOT%{perl_vendorlib}/IP/._Authority.pm
71
72 %clean
73 rm -rf $RPM_BUILD_ROOT
74
75 %files
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
83 %{_mandir}/man1/*
84 %{_mandir}/man3/*
This page took 0.115111 seconds and 4 git commands to generate.