source: projects/specs/trunk/p/perl-NetAddr-IP/perl-NetAddr-IP-vl.spec @ 8699

Revision 8699, 4.5 KB checked in by tomop, 10 years ago (diff)

spamassassin-3.4.0

Line 
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
14Name:      perl-NetAddr-IP
15Summary:   NetAddr-IP - Manages IPv4 and IPv6 addresses and subnets
16Version:   4.075
17Release:   1%{?_dist_release}
18License:   Artistic
19Group:     Development/Libraries
20Url:       http://www.cpan.org
21BuildRoot: %{_tmppath}/%{name}-%{version}-%(id -u -n)
22Prefix:    %(echo %{_prefix})
23Source:    http://search.cpan.org//CPAN/authors/id/M/MI/MIKER/%{pkgname}-%{version}.tar.gz
24
25BuildRequires:  perl(AutoLoader)
26BuildRequires:  perl(Carp)
27BuildRequires:  perl(Data::Dumper)
28BuildRequires:  perl(Exporter)
29BuildRequires:  perl(ExtUtils::MakeMaker)
30BuildRequires:  perl(Math::BigInt)
31BuildRequires:  perl(Test::More)
32BuildRequires:  perl(Socket6)
33Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
34Requires:       perl(Math::BigInt)
35
36Vendor:       Project Vine
37Distribution: Vine Linux
38Packager:     tomop, shaolin
39
40%description
41This module provides an object-oriented abstraction on top of IP
42addresses or IP subnets, that allows for easy manipulations.
43Version 4.xx of NetAdder::IP will will work older
44versions of Perl and does B<not> use Math::BigInt as in previous versions.
45
46The internal representation of all IP objects is in 128 bit IPv6 notation.
47IPv4 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}
57chmod -R u+w %{_builddir}/%{pkgname}-%{version}
58
59%build
60grep -rsl '^#!.*perl' . |
61grep -v '.bak$' |xargs --no-run-if-empty \
62%__perl -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)'
63CFLAGS="$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
75cmd=/usr/share/spec-helper/compress_files
76[ -x $cmd ] || cmd=/usr/lib/rpm/brp-compress
77[ -x $cmd ] && $cmd
78
79# SuSE Linux
80if [ -e /etc/SuSE-release -o -e /etc/UnitedLinux-release ]
81then
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}
86fi
87
88# remove special files
89find %{buildroot} -name "perllocal.pod" \
90    -o -name ".packlist"                \
91    -o -name "*.bs"                     \
92    |xargs -i rm -f {}
93
94# no empty directories
95find %{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}");
101    print "%doc  Artistic Changes Copying TODO docs/rfc1884.txt";
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
141* Mon Jun 30 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.075-1
142- new upstream release.
143
144* Thu Mar 27 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 4.072-1
145- new upstream release.
146
147* Thu Mar 01 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 4.058-1
148- updated to 4.058: minor fix to the spec
149
150* Thu Apr 07 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.042-1
151- Initial build.
Note: See TracBrowser for help on using the repository browser.