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