[8699] | 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 | |
---|
| 14 | Name: perl-Geo-IP |
---|
| 15 | Summary: Geo::IP - Perl module |
---|
| 16 | Version: 1.43 |
---|
| 17 | Release: 2%{?_dist_release} |
---|
| 18 | Vendor: Project Vine |
---|
| 19 | Packager: tomop |
---|
| 20 | Distribution: Vine Linux |
---|
| 21 | License: Artistic |
---|
| 22 | Group: Development/Languages |
---|
| 23 | Url: http://www.cpan.org |
---|
| 24 | Buildroot: %{_tmppath}/%{name}-%{version}-%(id -u -n) |
---|
| 25 | Prefix: %(echo %{_prefix}) |
---|
| 26 | Source: http://search.cpan.org//CPAN/authors/id/B/BO/BORISZ/Geo-IP-%{version}.tar.gz |
---|
| 27 | BuildRequires: GeoIP-devel |
---|
| 28 | |
---|
| 29 | %description |
---|
| 30 | None. |
---|
| 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} |
---|
| 40 | chmod -R u+w %{_builddir}/Geo-IP-%{version} |
---|
| 41 | |
---|
| 42 | %build |
---|
| 43 | grep -rsl '^#!.*perl' . | |
---|
| 44 | grep -v '.bak$' |xargs --no-run-if-empty \ |
---|
| 45 | %__perl -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)' |
---|
| 46 | CFLAGS="$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 |
---|
| 50 | if [ -f /usr/share/GeoIP/GeoIP.dat ]; then |
---|
| 51 | %{__make} test |
---|
| 52 | fi |
---|
| 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 | |
---|
| 60 | cmd=/usr/share/spec-helper/compress_files |
---|
| 61 | [ -x $cmd ] || cmd=/usr/lib/rpm/brp-compress |
---|
| 62 | [ -x $cmd ] && $cmd |
---|
| 63 | |
---|
| 64 | # SuSE Linux |
---|
| 65 | if [ -e /etc/SuSE-release -o -e /etc/UnitedLinux-release ] |
---|
| 66 | then |
---|
| 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} |
---|
| 71 | fi |
---|
| 72 | |
---|
| 73 | # remove special files |
---|
| 74 | find %{buildroot} -name "perllocal.pod" \ |
---|
| 75 | -o -name ".packlist" \ |
---|
| 76 | -o -name "*.bs" \ |
---|
| 77 | |xargs -i rm -f {} |
---|
| 78 | |
---|
| 79 | # no empty directories |
---|
| 80 | find %{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. |
---|