1 |
# |
2 |
# - HTML::Tabulate - |
3 |
# This spec file was automatically generated by cpan2rpm [ver: 2.026] |
4 |
# The following arguments were used: |
5 |
# HTML::Tabulate |
6 |
# For more information on cpan2rpm please visit: http://perl.arix.com/ |
7 |
# |
8 |
|
9 |
%define pkgname HTML-Tabulate |
10 |
%define filelist %{pkgname}-%{version}-filelist |
11 |
%define NVR %{pkgname}-%{version}-%{release} |
12 |
%define maketest 1 |
13 |
|
14 |
name: perl-HTML-Tabulate |
15 |
summary: HTML-Tabulate - HTML table rendering class |
16 |
version: 0.23 |
17 |
release: 1%{?dist} |
18 |
license: Artistic |
19 |
group: Applications/CPAN |
20 |
url: http://www.cpan.org |
21 |
buildroot: %{_tmppath}/%{name}-%{version}-%(id -u -n) |
22 |
buildarch: noarch |
23 |
prefix: %(echo %{_prefix}) |
24 |
source: http://search.cpan.org/dist/G/GA/GAVINC/HTML-Tabulate-0.23.tar.gz |
25 |
buildrequires: perl(URI::Escape) |
26 |
|
27 |
%description |
28 |
HTML::Tabulate is used to render/display a given set of data in an |
29 |
HTML table. It takes a data set and a presentation definition and |
30 |
applies the presentation to the data set to produce the HTML table |
31 |
output. The presentation definition accepts arguments corresponding |
32 |
to HTML table tags ('table', 'tr', 'th', 'td' etc.), to define |
33 |
attributes for those tags, plus additional arguments for other |
34 |
aspects of the presentation. HTML::Tabulate supports advanced |
35 |
features like automatic striping, arbitrary cell formatting, |
36 |
link creation, etc. |
37 |
|
38 |
Presentation definitions can be defined in multiple passes, which |
39 |
are progressively merged, allowing general defaults to be defined |
40 |
in common and then overridden by more specific requirements. |
41 |
Presentation definitions are stored in the current object, except |
42 |
for those defined for a specific 'render', which are temporary. |
43 |
|
44 |
Supported data sets include arrayrefs of arrayrefs (DBI |
45 |
selectall_arrayref, for example), arrayrefs of hashrefs, a simple |
46 |
hashref (producing single row tables), or iterator objects that |
47 |
support first() and next() methods (like DBIx::Recordset objects or |
48 |
Class::DBI iterators). |
49 |
|
50 |
By default arrayref-based datasets are interpreted as containing |
51 |
successive table rows; a column-based interpretation can be forced |
52 |
using style => 'across'. |
53 |
|
54 |
The primary interface is object-oriented, but a procedural |
55 |
interface is also available where the extra flexibility of the OO |
56 |
interface is not required. |
57 |
|
58 |
# |
59 |
# This package was generated automatically with the cpan2rpm |
60 |
# utility. To get this software or for more information |
61 |
# please visit: http://perl.arix.com/ |
62 |
# |
63 |
|
64 |
%prep |
65 |
%setup -q -n %{pkgname}-%{version} |
66 |
chmod -R u+w %{_builddir}/%{pkgname}-%{version} |
67 |
|
68 |
%build |
69 |
grep -rsl '^#!.*perl' . | |
70 |
grep -v '.bak$' |xargs --no-run-if-empty \ |
71 |
%__perl -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)' |
72 |
CFLAGS="$RPM_OPT_FLAGS" |
73 |
%{__perl} Makefile.PL `%{__perl} -MExtUtils::MakeMaker -e ' print qq|PREFIX=%{buildroot}%{_prefix}| if \$ExtUtils::MakeMaker::VERSION =~ /5\.9[1-6]|6\.0[0-5]/ '` |
74 |
%{__make} |
75 |
%if %maketest |
76 |
%{__make} test |
77 |
%endif |
78 |
|
79 |
%install |
80 |
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot} |
81 |
|
82 |
%{makeinstall} `%{__perl} -MExtUtils::MakeMaker -e ' print \$ExtUtils::MakeMaker::VERSION <= 6.05 ? qq|PREFIX=%{buildroot}%{_prefix}| : qq|DESTDIR=%{buildroot}| '` |
83 |
|
84 |
[ -x /usr/lib/rpm/brp-compress ] && /usr/lib/rpm/brp-compress |
85 |
|
86 |
# SuSE Linux |
87 |
if [ -e /etc/SuSE-release -o -e /etc/UnitedLinux-release ] |
88 |
then |
89 |
%{__mkdir_p} %{buildroot}/var/adm/perl-modules |
90 |
%{__cat} `find %{buildroot} -name "perllocal.pod"` \ |
91 |
| %{__sed} -e s+%{buildroot}++g \ |
92 |
> %{buildroot}/var/adm/perl-modules/%{name} |
93 |
fi |
94 |
|
95 |
# remove special files |
96 |
find %{buildroot} -name "perllocal.pod" \ |
97 |
-o -name ".packlist" \ |
98 |
-o -name "*.bs" \ |
99 |
|xargs -i rm -f {} |
100 |
|
101 |
# no empty directories |
102 |
find %{buildroot}%{_prefix} \ |
103 |
-type d -depth \ |
104 |
-exec rmdir {} \; 2>/dev/null |
105 |
|
106 |
%{__perl} -MFile::Find -le ' |
107 |
find({ wanted => \&wanted, no_chdir => 1}, "%{buildroot}"); |
108 |
print "%doc README"; |
109 |
for my $x (sort @dirs, @files) { |
110 |
push @ret, $x unless indirs($x); |
111 |
} |
112 |
print join "\n", sort @ret; |
113 |
|
114 |
sub wanted { |
115 |
return if /auto$/; |
116 |
|
117 |
local $_ = $File::Find::name; |
118 |
my $f = $_; s|^\Q%{buildroot}\E||; |
119 |
return unless length; |
120 |
return $files[@files] = $_ if -f $f; |
121 |
|
122 |
$d = $_; |
123 |
/\Q$d\E/ && return for reverse sort @INC; |
124 |
$d =~ /\Q$_\E/ && return |
125 |
for qw|/etc %_prefix/man %_prefix/bin %_prefix/share|; |
126 |
|
127 |
$dirs[@dirs] = $_; |
128 |
} |
129 |
|
130 |
sub indirs { |
131 |
my $x = shift; |
132 |
$x =~ /^\Q$_\E\// && $x ne $_ && return 1 for @dirs; |
133 |
} |
134 |
' > %filelist |
135 |
|
136 |
[ -z %filelist ] && { |
137 |
echo "ERROR: empty %files listing" |
138 |
exit -1 |
139 |
} |
140 |
|
141 |
%clean |
142 |
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot} |
143 |
|
144 |
%files -f %filelist |
145 |
%defattr(-,root,root) |
146 |
|
147 |
%changelog |
148 |
* Sun Apr 29 2007 Shad L. Lords <slords@mail.com> |
149 |
- Clean up spec so package can be built by koji/plague |
150 |
|
151 |
* Thu Dec 07 2006 Shad L. Lords <slords@mail.com> |
152 |
- Update to new release naming. No functional changes. |
153 |
- Make Packager generic |
154 |
|
155 |
* Tue Aug 23 2005 gordonr@bigted |
156 |
- Initial build. |