1 | # Only need manual requires for "use base XXX;" prior to rpm 4.9 |
---|
2 | %global rpm49 %(rpm --version | perl -pi -e 's/^.* (\\d+)\\.(\\d+).*/sprintf("%d.%03d",$1,$2) ge 4.009 ? 1 : 0/e') |
---|
3 | |
---|
4 | Name: perl-Sub-Name |
---|
5 | Version: 0.05 |
---|
6 | Release: 1%{?_dist_release} |
---|
7 | Summary: Name - or rename - a sub |
---|
8 | License: GPL+ or Artistic |
---|
9 | Group: Development/Libraries |
---|
10 | URL: http://search.cpan.org/dist/Sub-Name/ |
---|
11 | Source0: http://search.cpan.org/CPAN/authors/id/F/FL/FLORA/Sub-Name-%{version}.tar.gz |
---|
12 | Patch0: Sub-Name-0.05-cpan50524.patch |
---|
13 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu) |
---|
14 | BuildRequires: perl(base) |
---|
15 | BuildRequires: perl(DynaLoader) |
---|
16 | BuildRequires: perl(Exporter) |
---|
17 | BuildRequires: perl(ExtUtils::MakeMaker) |
---|
18 | BuildRequires: perl(strict) |
---|
19 | BuildRequires: perl(Test::More) |
---|
20 | BuildRequires: perl(warnings) |
---|
21 | Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) |
---|
22 | %if ! %{rpm49} |
---|
23 | Requires: perl(DynaLoader) |
---|
24 | Requires: perl(Exporter) |
---|
25 | %endif |
---|
26 | |
---|
27 | # Don't "provide" private perl objects |
---|
28 | %{?perl_default_filter} |
---|
29 | |
---|
30 | %description |
---|
31 | This module allows one to "name" or rename subroutines, including anonymous |
---|
32 | ones. |
---|
33 | |
---|
34 | Note that this is mainly for aid in debugging; you still cannot call the sub |
---|
35 | by the new name (without some deep magic). |
---|
36 | |
---|
37 | %prep |
---|
38 | %setup -q -n Sub-Name-%{version} |
---|
39 | |
---|
40 | # Copy the contents of the %%DB::sub entry if it exists (CPAN RT#50524) |
---|
41 | %patch0 -p1 |
---|
42 | |
---|
43 | %build |
---|
44 | perl Makefile.PL INSTALLDIRS=vendor optimize="%{optflags}" |
---|
45 | make %{?_smp_mflags} |
---|
46 | |
---|
47 | %install |
---|
48 | rm -rf %{buildroot} |
---|
49 | make pure_install DESTDIR=%{buildroot} |
---|
50 | find %{buildroot} -type f -name .packlist -exec rm -f {} \; |
---|
51 | find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; |
---|
52 | find %{buildroot} -depth -type d -exec rmdir {} \; 2>/dev/null |
---|
53 | %{_fixperms} %{buildroot} |
---|
54 | |
---|
55 | %check |
---|
56 | make test |
---|
57 | |
---|
58 | %clean |
---|
59 | rm -rf %{buildroot} |
---|
60 | |
---|
61 | %files |
---|
62 | %defattr(-,root,root,-) |
---|
63 | %doc Changes README |
---|
64 | %{perl_vendorarch}/auto/Sub/ |
---|
65 | %{perl_vendorarch}/Sub/ |
---|
66 | %{_mandir}/man3/Sub::Name.3pm* |
---|
67 | |
---|
68 | %changelog |
---|
69 | * Mon Mar 05 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.05-1 |
---|
70 | - initial build for Vine Linux |
---|
71 | |
---|
72 | * Sat Feb 18 2012 Paul Howarth <paul@city-fan.org> - 0.05-6 |
---|
73 | - Add patch for CPAN RT#50524 (copy contents of %%DB::sub entry if it exists) |
---|
74 | - Reinstate compatibility with old distributions like EL-5 |
---|
75 | - Add BuildRoot definition |
---|
76 | - Clean buildroot in %%install |
---|
77 | - Restore %%clean section |
---|
78 | - Restore %%defattr |
---|
79 | - Don't use + to terminate find -exec commands |
---|
80 | - Spec clean-up |
---|
81 | - Make %%files list more explicit |
---|
82 | - Use DESTDIR rather than PERL_INSTALL_ROOT |
---|
83 | - Don't use macros for commands |
---|
84 | - Use tabs |
---|
85 | - Add buildreqs for Perl core modules that might be dual-lived |
---|
86 | - Explicit requires for "use base XXX;" only required prior to rpm 4.9 |
---|
87 | |
---|
88 | * Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.05-5 |
---|
89 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild |
---|
90 | |
---|
91 | * Fri Jun 17 2011 Marcela Mašláňová <mmaslano@redhat.com> - 0.05-4 |
---|
92 | - Perl mass rebuild |
---|
93 | |
---|
94 | * Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.05-3 |
---|
95 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild |
---|
96 | |
---|
97 | * Wed Dec 22 2010 Marcela Maslanova <mmaslano@redhat.com> - 0.05-2 |
---|
98 | - Rebuild to fix problems with vendorarch/lib (#661697) |
---|
99 | |
---|
100 | * Sat Dec 18 2010 Iain Arnell <iarnell@gmail.com> - 0.05-1 |
---|
101 | - Update to latest upstream version |
---|
102 | - Clean up spec for modern rpmbuild |
---|
103 | - BR perl(Test::More) |
---|
104 | - Requires perl(DynaLoader) and perl(Exporter) |
---|
105 | |
---|
106 | * Thu May 06 2010 Marcela Maslanova <mmaslano@redhat.com> - 0.04-6 |
---|
107 | - Mass rebuild with perl-5.12.0 |
---|
108 | |
---|
109 | * Mon Dec 7 2009 Stepan Kasal <skasal@redhat.com> - 0.04-5 |
---|
110 | - Rebuild against perl 5.10.1 |
---|
111 | |
---|
112 | * Thu Aug 27 2009 Chris Weyl <cweyl@alumni.drew.edu> - 0.04-4 |
---|
113 | - Filtering errant private provides |
---|
114 | |
---|
115 | * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.04-3 |
---|
116 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild |
---|
117 | |
---|
118 | * Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.04-2 |
---|
119 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild |
---|
120 | |
---|
121 | * Sun Aug 03 2008 Chris Weyl <cweyl@alumni.drew.edu> - 0.04-1 |
---|
122 | - Update to 0.04 |
---|
123 | |
---|
124 | * Sat Mar 15 2008 Chris Weyl <cweyl@alumni.drew.edu> - 0.03-1 |
---|
125 | - Update to 0.03 |
---|
126 | |
---|
127 | * Tue Mar 4 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.02-5 |
---|
128 | - Rebuild for new perl |
---|
129 | |
---|
130 | * Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.02-4.1 |
---|
131 | - Autorebuild for GCC 4.3 |
---|
132 | |
---|
133 | * Tue Oct 16 2007 Tom "spot" Callaway <tcallawa@redhat.com> - 0.02-3.1 |
---|
134 | - Correct license tag |
---|
135 | - Add BR: perl(ExtUtils::MakeMaker) |
---|
136 | |
---|
137 | * Tue Aug 21 2007 Chris Weyl <cweyl@alumni.drew.edu> - 0.02-3 |
---|
138 | - Bump |
---|
139 | |
---|
140 | * Wed Sep 06 2006 Chris Weyl <cweyl@alumni.drew.edu> - 0.02-2 |
---|
141 | - Bump |
---|
142 | |
---|
143 | * Sat Sep 02 2006 Chris Weyl <cweyl@alumni.drew.edu> - 0.02-1 |
---|
144 | - Specfile autogenerated by cpanspec 1.69.1 |
---|