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

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

spamassassin-3.4.0

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