perl-Geo-IP-vl.spec 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. #
  2. # - Geo::IP -
  3. # This spec file was automatically generated by cpan2rpm [ver: 2.028]
  4. # The following arguments were used:
  5. # --author 'Project Vine' --distribution 'Vine Linux' --packager tomop --spec-only --name perl-Geo-IP --version 1.43 Geo::IP
  6. # For more information on cpan2rpm please visit: http://perl.arix.com/
  7. #
  8. %define pkgname perl-Geo-IP
  9. %define filelist %{pkgname}-%{version}-filelist
  10. %define NVR %{pkgname}-%{version}-%{release}
  11. %define maketest 1
  12. Name: perl-Geo-IP
  13. Summary: Geo::IP - Perl module
  14. Version: 1.43
  15. Release: 2%{?_dist_release}
  16. Vendor: Project Vine
  17. Packager: tomop
  18. Distribution: Vine Linux
  19. License: Artistic
  20. Group: Development/Languages
  21. Url: http://www.cpan.org
  22. Buildroot: %{_tmppath}/%{name}-%{version}-%(id -u -n)
  23. Prefix: %(echo %{_prefix})
  24. Source: http://search.cpan.org//CPAN/authors/id/B/BO/BORISZ/Geo-IP-%{version}.tar.gz
  25. BuildRequires: GeoIP-devel
  26. %description
  27. None.
  28. #
  29. # This package was generated automatically with the cpan2rpm
  30. # utility. To get this software or for more information
  31. # please visit: http://perl.arix.com/
  32. #
  33. %prep
  34. %setup -q -n Geo-IP-%{version}
  35. chmod -R u+w %{_builddir}/Geo-IP-%{version}
  36. %build
  37. grep -rsl '^#!.*perl' . |
  38. grep -v '.bak$' |xargs --no-run-if-empty \
  39. %__perl -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)'
  40. CFLAGS="$RPM_OPT_FLAGS"
  41. %{__perl} Makefile.PL INSTALLDIRS="vendor" `%{__perl} -MExtUtils::MakeMaker -e ' print qq|PREFIX=%{buildroot}%{_prefix}| if \$ExtUtils::MakeMaker::VERSION =~ /5\.9[1-6]|6\.0[0-5]/ '`
  42. %{__make}
  43. %if %maketest
  44. if [ -f /usr/share/GeoIP/GeoIP.dat ]; then
  45. %{__make} test
  46. fi
  47. %endif
  48. %install
  49. [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
  50. %{makeinstall} `%{__perl} -MExtUtils::MakeMaker -e ' print \$ExtUtils::MakeMaker::VERSION <= 6.05 ? qq|PREFIX=%{buildroot}%{_prefix}| : qq|DESTDIR=%{buildroot}| '`
  51. cmd=/usr/share/spec-helper/compress_files
  52. [ -x $cmd ] || cmd=/usr/lib/rpm/brp-compress
  53. [ -x $cmd ] && $cmd
  54. # SuSE Linux
  55. if [ -e /etc/SuSE-release -o -e /etc/UnitedLinux-release ]
  56. then
  57. %{__mkdir_p} %{buildroot}/var/adm/perl-modules
  58. %{__cat} `find %{buildroot} -name "perllocal.pod"` \
  59. | %{__sed} -e s+%{buildroot}++g \
  60. > %{buildroot}/var/adm/perl-modules/%{name}
  61. fi
  62. # remove special files
  63. find %{buildroot} -name "perllocal.pod" \
  64. -o -name ".packlist" \
  65. -o -name "*.bs" \
  66. |xargs -i rm -f {}
  67. # no empty directories
  68. find %{buildroot}%{_prefix} \
  69. -type d -depth \
  70. -exec rmdir {} \; 2>/dev/null
  71. %{__perl} -MFile::Find -le '
  72. find({ wanted => \&wanted, no_chdir => 1}, "%{buildroot}");
  73. print "%doc example Changes INSTALL README";
  74. for my $x (sort @dirs, @files) {
  75. push @ret, $x unless indirs($x);
  76. }
  77. print join "\n", sort @ret;
  78. sub wanted {
  79. return if /auto$/;
  80. local $_ = $File::Find::name;
  81. my $f = $_; s|^\Q%{buildroot}\E||;
  82. return unless length;
  83. return $files[@files] = $_ if -f $f;
  84. $d = $_;
  85. /\Q$d\E/ && return for reverse sort @INC;
  86. $d =~ /\Q$_\E/ && return
  87. for qw|/etc %_prefix/man %_prefix/bin %_prefix/share|;
  88. $dirs[@dirs] = $_;
  89. }
  90. sub indirs {
  91. my $x = shift;
  92. $x =~ /^\Q$_\E\// && $x ne $_ && return 1 for @dirs;
  93. }
  94. ' > %filelist
  95. [ -z %filelist ] && {
  96. echo "ERROR: empty %files listing"
  97. exit -1
  98. }
  99. %clean
  100. [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
  101. %files -f %filelist
  102. %defattr(-,root,root)
  103. %changelog
  104. * Mon Jun 30 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.43-1
  105. - rebuilt with perl-5.16.3.
  106. * Thu Mar 27 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.43-1
  107. - Initial build.