perl-NetAddr-IP-vl.spec 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. #
  2. # - NetAddr::IP -
  3. # This spec file was automatically generated by cpan2rpm [ver: 2.028]
  4. # The following arguments were used:
  5. # NetAddr::IP
  6. # For more information on cpan2rpm please visit: http://perl.arix.com/
  7. #
  8. %define pkgname NetAddr-IP
  9. %define filelist %{pkgname}-%{version}-filelist
  10. %define NVR %{pkgname}-%{version}-%{release}
  11. %define maketest 1
  12. Name: perl-NetAddr-IP
  13. Summary: NetAddr-IP - Manages IPv4 and IPv6 addresses and subnets
  14. Version: 4.079
  15. Release: 1%{?_dist_release}
  16. License: Artistic
  17. Group: Development/Libraries
  18. Url: http://www.cpan.org
  19. BuildRoot: %{_tmppath}/%{name}-%{version}-%(id -u -n)
  20. Prefix: %(echo %{_prefix})
  21. Source: http://search.cpan.org//CPAN/authors/id/M/MI/MIKER/%{pkgname}-%{version}.tar.gz
  22. BuildRequires: perl(AutoLoader)
  23. BuildRequires: perl(Carp)
  24. BuildRequires: perl(Data::Dumper)
  25. BuildRequires: perl(Exporter)
  26. BuildRequires: perl(ExtUtils::MakeMaker)
  27. BuildRequires: perl(Math::BigInt)
  28. BuildRequires: perl(Test::More)
  29. BuildRequires: perl(Socket6)
  30. Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
  31. Requires: perl(Math::BigInt)
  32. Vendor: Project Vine
  33. Distribution: Vine Linux
  34. Packager: tomop, shaolin
  35. %description
  36. This module provides an object-oriented abstraction on top of IP
  37. addresses or IP subnets, that allows for easy manipulations.
  38. Version 4.xx of NetAdder::IP will will work older
  39. versions of Perl and does B<not> use Math::BigInt as in previous versions.
  40. The internal representation of all IP objects is in 128 bit IPv6 notation.
  41. IPv4 and IPv6 objects may be freely mixed.
  42. #
  43. # This package was generated automatically with the cpan2rpm
  44. # utility. To get this software or for more information
  45. # please visit: http://perl.arix.com/
  46. #
  47. %prep
  48. %setup -q -n %{pkgname}-%{version}
  49. chmod -R u+w %{_builddir}/%{pkgname}-%{version}
  50. %build
  51. grep -rsl '^#!.*perl' . |
  52. grep -v '.bak$' |xargs --no-run-if-empty \
  53. %__perl -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)'
  54. CFLAGS="$RPM_OPT_FLAGS"
  55. %{__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]/ '`
  56. %{__make}
  57. %if %maketest
  58. %{__make} test
  59. %endif
  60. %install
  61. [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
  62. %{makeinstall} `%{__perl} -MExtUtils::MakeMaker -e ' print \$ExtUtils::MakeMaker::VERSION <= 6.05 ? qq|PREFIX=%{buildroot}%{_prefix}| : qq|DESTDIR=%{buildroot}| '`
  63. cmd=/usr/share/spec-helper/compress_files
  64. [ -x $cmd ] || cmd=/usr/lib/rpm/brp-compress
  65. [ -x $cmd ] && $cmd
  66. # SuSE Linux
  67. if [ -e /etc/SuSE-release -o -e /etc/UnitedLinux-release ]
  68. then
  69. %{__mkdir_p} %{buildroot}/var/adm/perl-modules
  70. %{__cat} `find %{buildroot} -name "perllocal.pod"` \
  71. | %{__sed} -e s+%{buildroot}++g \
  72. > %{buildroot}/var/adm/perl-modules/%{name}
  73. fi
  74. # remove special files
  75. find %{buildroot} -name "perllocal.pod" \
  76. -o -name ".packlist" \
  77. -o -name "*.bs" \
  78. |xargs -i rm -f {}
  79. # no empty directories
  80. find %{buildroot}%{_prefix} \
  81. -type d -depth \
  82. -exec rmdir {} \; 2>/dev/null
  83. %{__perl} -MFile::Find -le '
  84. find({ wanted => \&wanted, no_chdir => 1}, "%{buildroot}");
  85. print "%doc Artistic Changes Copying TODO docs/rfc1884.txt";
  86. for my $x (sort @dirs, @files) {
  87. push @ret, $x unless indirs($x);
  88. }
  89. print join "\n", sort @ret;
  90. sub wanted {
  91. return if /auto$/;
  92. local $_ = $File::Find::name;
  93. my $f = $_; s|^\Q%{buildroot}\E||;
  94. return unless length;
  95. return $files[@files] = $_ if -f $f;
  96. $d = $_;
  97. /\Q$d\E/ && return for reverse sort @INC;
  98. $d =~ /\Q$_\E/ && return
  99. for qw|/etc %_prefix/man %_prefix/bin %_prefix/share|;
  100. $dirs[@dirs] = $_;
  101. }
  102. sub indirs {
  103. my $x = shift;
  104. $x =~ /^\Q$_\E\// && $x ne $_ && return 1 for @dirs;
  105. }
  106. ' > %filelist
  107. [ -z %filelist ] && {
  108. echo "ERROR: empty %files listing"
  109. exit -1
  110. }
  111. %clean
  112. [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
  113. %files -f %filelist
  114. %defattr(-,root,root)
  115. %changelog
  116. * Sun May 19 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 4.079-1
  117. - new upstream release.
  118. - rebuilt with perl-5.26.
  119. * Mon Jun 30 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 4.075-1
  120. - new upstream release.
  121. * Thu Mar 27 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 4.072-1
  122. - new upstream release.
  123. * Thu Mar 01 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 4.058-1
  124. - updated to 4.058: minor fix to the spec
  125. * Thu Apr 07 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.042-1
  126. - Initial build.