perl-IP-Country-vl.spec 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. %define real_name IP-Country
  2. Summary: Classes for fast lookup of country codes from IP addresses for Perl
  3. Name: perl-IP-Country
  4. Version: 2.26
  5. Release: 1%{_dist_release}
  6. License: distributable
  7. Group: Development/Libraries
  8. URL: http://search.cpan.org/dist/IP-Country/
  9. Source: http://search.cpan.org/CPAN/authors/id/N/NW/NWETTERS/%{real_name}-%{version}.tar.gz
  10. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  11. BuildArch: noarch
  12. BuildRequires: perl >= 0:5.00503
  13. BuildRequires: perl(Geography::Countries)
  14. Requires: perl >= 0:5.00503
  15. %description
  16. Finding the home country of a client using only the IP address can be difficult.
  17. Looking up the domain name associated with that address can provide some help,
  18. but many IP address are not reverse mapped to any useful domain, and the
  19. most common domain (.com) offers no help when looking for country.
  20. This module comes bundled with a database of countries where various IP addresses
  21. have been assigned. Although the country of assignment will probably be the
  22. country associated with a large ISP rather than the client herself, this is
  23. probably good enough for most log analysis applications, and under test has proved
  24. to be as accurate as reverse-DNS and WHOIS lookup.
  25. %prep
  26. %setup -n %{real_name}-%{version}
  27. %build
  28. CFLAGS="%{optflags}" %{__perl} Makefile.PL INSTALLDIRS=vendor
  29. make
  30. %install
  31. rm -rf $RPM_BUILD_ROOT
  32. make install DESTDIR=$RPM_BUILD_ROOT
  33. find $RPM_BUILD_ROOT \( -name perllocal.pod -o -name .packlist \) -exec rm -v {} \;
  34. find $RPM_BUILD_ROOT%{_prefix} -type f -print |
  35. sed "s@^$RPM_BUILD_ROOT@@g" |
  36. grep -v ^%{_bindir} |
  37. grep -v ^%{_mandir} |
  38. grep -v "\.packlist" > %{name}.files
  39. if [ "$(cat %{name}.files)X" = "X" ] ; then
  40. echo "ERROR: EMPTY FILE LIST"
  41. exit -1
  42. fi
  43. %check
  44. make test
  45. %clean
  46. rm -rf $RPM_BUILD_ROOT
  47. %files -f %{name}.files
  48. %defattr(-, root, root, 0755)
  49. %doc CHANGES MANIFEST README
  50. %{_bindir}/ip2cc
  51. %{_mandir}/man1/ip2cc.1*
  52. %{_mandir}/man3/*.3*
  53. %dir %{perl_vendorlib}/IP
  54. %changelog
  55. * Mon Jun 29 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> - 2.26-1
  56. - new upstream release
  57. - remove BR: perl(Geography::Countries)
  58. * Mon May 06 2008 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> - 2.24-1
  59. - new upstream release
  60. * Mon May 05 2008 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> - 2.23-1
  61. - rebuild with perl 5.10
  62. - new versioning policy
  63. * Sun Feb 18 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 2.23-0vl1
  64. - new upstream release
  65. - change group to Development/Libraries
  66. * Tue Oct 17 2006 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> - 2.21-1vl3
  67. - change group to Development/Languages
  68. * Mon Oct 16 2006 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> - 2.21-1vl2
  69. - 1st release for VinePlus 4.0
  70. - change install dir (site -> vendor)
  71. - fix change log typo
  72. * Sun Oct 15 2006 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> - 2.21-1vl1
  73. - 1st release for VinePlus 3.2
  74. - change install dir (vendor -> site)
  75. - remove smp flag in make section
  76. * Mon May 29 2006 Dag Wieers <dag@wieers.com> - 2.21-1
  77. - Updated to release 2.21.
  78. * Sat Jun 18 2005 Dries Verachtert <dries@ulyssis.org> - 2.20-1
  79. - Updated to release 2.20.
  80. * Sat Nov 06 2004 Dag Wieers <dag@wieers.com> - 2.18-1
  81. - Updated to release 2.18.
  82. * Fri Jan 02 2004 Dag Wieers <dag@wieers.com> - 2.17-0
  83. - Updated to release 2.17.
  84. * Mon Jul 14 2003 Dag Wieers <dag@wieers.com> - 2.14-0
  85. - Updated to release 2.14.
  86. * Sat Feb 01 2003 Dag Wieers <dag@wieers.com> - 2.08-0
  87. - Initial package. (using DAR)