Debian package updates by Jochen Kunkel
[openxpki.git] / trunk / package / suse / external-dependencies / Net-IP.spec
blob35f7bb68f20b4dc7b6551c20cd706e1af2e97e54
2 # - Net::IP -
3 # This spec file was automatically generated by cpan2rpm [ver: 2.027]
4 # The following arguments were used:
5 # --spec-only --version=1.25 '--author=Manuel Valente' Net-IP-1.25.tar.gz
6 # For more information on cpan2rpm please visit: http://perl.arix.com/
9 %define pkgname Net-IP
10 %define filelist %{pkgname}-%{version}-filelist
11 %define NVR %{pkgname}-%{version}-%{release}
12 %define maketest 1
14 name: perl-Net-IP
15 summary: Net-IP - Perl extension for manipulating IPv4/IPv6 addresses
16 version: 1.25
17 release: 1
18 vendor: Manuel Valente
19 packager: Arix International <cpan2rpm@arix.com>
20 license: Artistic
21 group: Applications/CPAN
22 url: http://www.cpan.org
23 buildroot: %{_tmppath}/%{name}-%{version}-%(id -u -n)
24 buildarch: noarch
25 prefix: %(echo %{_prefix})
26 source: Net-IP-1.25.tar.gz
28 %description
29 This module provides functions to deal with IPv4/IPv6 addresses. The module
30 can be used as a class, allowing the user to instantiate IP objects, which can
31 be single IP addresses, prefixes, or ranges of addresses. There is also a
32 procedural way of accessing most of the functions. Most subroutines can take
33 either IPv4 or IPv6 addresses transparently.
36 # This package was generated automatically with the cpan2rpm
37 # utility. To get this software or for more information
38 # please visit: http://perl.arix.com/
41 %prep
42 %setup -q -n %{pkgname}-%{version}
43 chmod -R u+w %{_builddir}/%{pkgname}-%{version}
45 %build
46 grep -rsl '^#!.*perl' . |
47 grep -v '.bak$' |xargs --no-run-if-empty \
48 %__perl -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)'
49 CFLAGS="$RPM_OPT_FLAGS"
50 %{__perl} Makefile.PL `%{__perl} -MExtUtils::MakeMaker -e ' print qq|PREFIX=%{buildroot}%{_prefix}| if \$ExtUtils::MakeMaker::VERSION =~ /5\.9[1-6]|6\.0[0-5]/ '`
51 %{__make}
52 %if %maketest
53 %{__make} test
54 %endif
56 %install
57 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
59 %{makeinstall} `%{__perl} -MExtUtils::MakeMaker -e ' print \$ExtUtils::MakeMaker::VERSION <= 6.05 ? qq|PREFIX=%{buildroot}%{_prefix}| : qq|DESTDIR=%{buildroot}| '`
61 cmd=/usr/share/spec-helper/compress_files
62 [ -x $cmd ] || cmd=/usr/lib/rpm/brp-compress
63 [ -x $cmd ] && $cmd
65 # SuSE Linux
66 if [ -e /etc/SuSE-release -o -e /etc/UnitedLinux-release ]
67 then
68 %{__mkdir_p} %{buildroot}/var/adm/perl-modules
69 %{__cat} `find %{buildroot} -name "perllocal.pod"` \
70 | %{__sed} -e s+%{buildroot}++g \
71 > %{buildroot}/var/adm/perl-modules/%{name}
74 # remove special files
75 find %{buildroot} -name "perllocal.pod" \
76 -o -name ".packlist" \
77 -o -name "*.bs" \
78 |xargs -i rm -f {}
80 # no empty directories
81 find %{buildroot}%{_prefix} \
82 -type d -depth \
83 -exec rmdir {} \; 2>/dev/null
85 %{__perl} -MFile::Find -le '
86 find({ wanted => \&wanted, no_chdir => 1}, "%{buildroot}");
87 print "%doc Changes README";
88 for my $x (sort @dirs, @files) {
89 push @ret, $x unless indirs($x);
91 print join "\n", sort @ret;
93 sub wanted {
94 return if /auto$/;
96 local $_ = $File::Find::name;
97 my $f = $_; s|^\Q%{buildroot}\E||;
98 return unless length;
99 return $files[@files] = $_ if -f $f;
101 $d = $_;
102 /\Q$d\E/ && return for reverse sort @INC;
103 $d =~ /\Q$_\E/ && return
104 for qw|/etc %_prefix/man %_prefix/bin %_prefix/share|;
106 $dirs[@dirs] = $_;
109 sub indirs {
110 my $x = shift;
111 $x =~ /^\Q$_\E\// && $x ne $_ && return 1 for @dirs;
113 ' > %filelist
115 [ -z %filelist ] && {
116 echo "ERROR: empty %files listing"
117 exit -1
120 %clean
121 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
123 %files -f %filelist
124 %defattr(-,root,root)
126 %changelog
127 * Thu Nov 23 2006 root@dca02
128 - Initial build.