1 |
|
### RPM external p5-template-toolkit 2.14 |
2 |
|
## INITENV +PATH PATH %{i}/bin |
3 |
< |
## INITENV +PATH PERL5LIB %{i}/lib/site_perl/$PERL_VERSION/%perlarch |
4 |
< |
Requires: perl |
5 |
< |
%define perlarch $($PERL_ROOT/bin/perl -e 'use Config; print $Config{archname}') |
3 |
> |
## INITENV +PATH PERL5LIB %i/lib/site_perl/%perlversion |
4 |
> |
%define perlversion %(perl -e 'printf "%%vd", $^V') |
5 |
> |
%define perlarch %(perl -MConfig -e 'print $Config{archname}') |
6 |
> |
Requires: p5-dbi |
7 |
|
%define downloadn Template-Toolkit |
8 |
+ |
|
9 |
+ |
Provides: perl(AppConfig) |
10 |
+ |
Provides: perl(GD) |
11 |
+ |
Provides: perl(GD::Graph::area) |
12 |
+ |
Provides: perl(GD::Graph::bars) |
13 |
+ |
Provides: perl(GD::Graph::bars3d) |
14 |
+ |
Provides: perl(GD::Graph::lines) |
15 |
+ |
Provides: perl(GD::Graph::lines3d) |
16 |
+ |
Provides: perl(GD::Graph::linespoints) |
17 |
+ |
Provides: perl(GD::Graph::mixed) |
18 |
+ |
Provides: perl(GD::Graph::pie) |
19 |
+ |
Provides: perl(GD::Graph::pie3d) |
20 |
+ |
Provides: perl(GD::Graph::points) |
21 |
+ |
Provides: perl(GD::Text) |
22 |
+ |
Provides: perl(GD::Text::Align) |
23 |
+ |
Provides: perl(GD::Text::Wrap) |
24 |
+ |
Provides: perl(Pod::POM) |
25 |
+ |
Provides: perl(Text::Autoformat) |
26 |
+ |
Provides: perl(XML::DOM) |
27 |
+ |
Provides: perl(XML::RSS) |
28 |
+ |
Provides: perl(XML::Simple) |
29 |
+ |
Provides: perl(XML::XPath) |
30 |
|
Source: http://www.cpan.org/modules/by-module/Template/%downloadn-%v.tar.gz |
31 |
|
|
32 |
|
%prep |
33 |
|
%setup -n %{downloadn}-%{v} |
34 |
|
%build |
35 |
< |
perl Makefile.PL TT_LIB=%{i}/lib/site_perl/$PERL_VERSION \ |
35 |
> |
perl Makefile.PL PREFIX=%i LIB=%i/lib/site_perl/%perlversion \ |
36 |
> |
TT_LIB=%{i}/lib/site_perl/%perlversion \ |
37 |
|
TT_PREFIX=%{i} \ |
38 |
|
TT_ACCEPT=y \ |
39 |
|
TT_DOCS=n \ |
40 |
|
TT_EXAMPLES=n \ |
41 |
< |
LIB=%{i}/lib/site_perl/$PERL_VERSION \ |
42 |
< |
PREFIX=%{i} |
41 |
> |
TT_SPLASH=n \ |
42 |
> |
TT_DBI=n |
43 |
> |
perl -p -i -e 's!install :: (.*) tt2_splash!install :: $1!' Makefile |
44 |
|
make |
45 |
< |
make test |
45 |
> |
perl -p -i -e 's|^#!.*perl(.*)|#!/usr/bin/env perl$1|' blib/script/tpage |
46 |
> |
perl -p -i -e 's|^#!.*perl(.*)|#!/usr/bin/env perl$1|' blib/script/ttree |
47 |
> |
case %{cmsos} in |
48 |
> |
slc4_ia32) |
49 |
> |
if ldd /usr/bin/gcc | grep -q /lib64/ |
50 |
> |
then |
51 |
> |
make install |
52 |
> |
mv %i/lib/site_perl/%perlversion/x86_64-linux-thread-multi %i/lib/site_perl/%perlversion/i386-linux-thread-multi |
53 |
> |
make clean |
54 |
> |
export PATH=/usr/bin/:$PATH |
55 |
> |
export GCC_EXEC_PREFIX=/usr/lib/gcc/ |
56 |
> |
perl Makefile.PL PREFIX=%i LIB=%i/lib/site_perl/%perlversion \ |
57 |
> |
TT_LIB=%{i}/lib/site_perl/%perlversion \ |
58 |
> |
TT_PREFIX=%{i} \ |
59 |
> |
TT_ACCEPT=y \ |
60 |
> |
TT_DOCS=n \ |
61 |
> |
TT_EXAMPLES=n \ |
62 |
> |
TT_SPLASH=n \ |
63 |
> |
TT_DBI=n |
64 |
> |
perl -p -i -e 's!install :: (.*) tt2_splash!install :: $1!' Makefile |
65 |
> |
make |
66 |
> |
perl -p -i -e 's|^#!.*perl(.*)|#!/usr/bin/env perl$1|' blib/script/tpage |
67 |
> |
perl -p -i -e 's|^#!.*perl(.*)|#!/usr/bin/env perl$1|' blib/script/ttree |
68 |
> |
fi;; |
69 |
> |
*) |
70 |
> |
;; |
71 |
> |
esac |
72 |
> |
|
73 |
|
%install |
74 |
|
make install |