1 |
< |
### RPM external p5-template-toolkit 2.15 |
1 |
> |
### RPM external p5-template-toolkit 2.15-CMS19 |
2 |
|
## INITENV +PATH PATH %{i}/bin |
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}') |
4 |
> |
%define perl /usr/bin/env perl |
5 |
> |
%if "%(echo %cmsplatf | cut -f1 -d_ | sed -e 's|\([A-Za-z]*\)[0-9]*|\1|')" == "osx" |
6 |
> |
%define perl /usr/bin/perl |
7 |
> |
%endif |
8 |
> |
|
9 |
> |
%define perlversion %(%perl -e 'printf "%%vd", $^V') |
10 |
> |
%define perlarch %(%perl -MConfig -e 'print $Config{archname}') |
11 |
|
%define downloadn Template-Toolkit |
12 |
|
|
13 |
|
Provides: perl(AppConfig) |
31 |
|
Provides: perl(XML::RSS) |
32 |
|
Provides: perl(XML::Simple) |
33 |
|
Provides: perl(XML::XPath) |
34 |
< |
Source: http://www.cpan.org/modules/by-module/Template/%downloadn-%v.tar.gz |
34 |
> |
|
35 |
> |
Source: http://www.cpan.org/modules/by-module/Template/%downloadn-%{realversion}.tar.gz |
36 |
|
|
37 |
|
%prep |
38 |
< |
%setup -n %{downloadn}-%{v} |
38 |
> |
%setup -n %{downloadn}-%{realversion} |
39 |
|
%build |
40 |
< |
perl Makefile.PL PREFIX=%i LIB=%i/lib/site_perl/%perlversion \ |
40 |
> |
%perl Makefile.PL PREFIX=%i LIB=%i/lib/site_perl/%perlversion \ |
41 |
|
TT_LIB=%{i}/lib/site_perl/%perlversion \ |
42 |
|
TT_PREFIX=%{i} \ |
43 |
|
TT_ACCEPT=y \ |
45 |
|
TT_EXAMPLES=n \ |
46 |
|
TT_SPLASH=n \ |
47 |
|
TT_DBI=n |
48 |
< |
perl -p -i -e 's!install :: (.*) tt2_splash!install :: $1!' Makefile |
48 |
> |
%perl -p -i -e 's!install :: (.*) tt2_splash!install :: $1!' Makefile |
49 |
|
make |
50 |
< |
perl -p -i -e 's|^#!.*perl(.*)|#!/usr/bin/env perl$1|' blib/script/tpage |
51 |
< |
perl -p -i -e 's|^#!.*perl(.*)|#!/usr/bin/env perl$1|' blib/script/ttree |
50 |
> |
%perl -p -i -e 's|^#!.*perl(.*)|#!%perl$1|' blib/script/tpage |
51 |
> |
%perl -p -i -e 's|^#!.*perl(.*)|#!%perl$1|' blib/script/ttree |
52 |
|
case %{cmsos} in |
53 |
|
slc4_ia32) |
54 |
|
if ldd /usr/bin/gcc | grep -q /lib64/ |
58 |
|
make clean |
59 |
|
export PATH=/usr/bin/:$PATH |
60 |
|
export GCC_EXEC_PREFIX=/usr/lib/gcc/ |
61 |
< |
perl Makefile.PL PREFIX=%i LIB=%i/lib/site_perl/%perlversion \ |
61 |
> |
%perl Makefile.PL PREFIX=%i LIB=%i/lib/site_perl/%perlversion \ |
62 |
|
TT_LIB=%{i}/lib/site_perl/%perlversion \ |
63 |
|
TT_PREFIX=%{i} \ |
64 |
|
TT_ACCEPT=y \ |
66 |
|
TT_EXAMPLES=n \ |
67 |
|
TT_SPLASH=n \ |
68 |
|
TT_DBI=n |
69 |
< |
perl -p -i -e 's!install :: (.*) tt2_splash!install :: $1!' Makefile |
69 |
> |
%perl -p -i -e 's!install :: (.*) tt2_splash!install :: $1!' Makefile |
70 |
|
make |
71 |
< |
perl -p -i -e 's|^#!.*perl(.*)|#!/usr/bin/env perl$1|' blib/script/tpage |
72 |
< |
perl -p -i -e 's|^#!.*perl(.*)|#!/usr/bin/env perl$1|' blib/script/ttree |
71 |
> |
%perl -p -i -e 's|^#!.*perl(.*)|#!%perl$1|' blib/script/tpage |
72 |
> |
%perl -p -i -e 's|^#!.*perl(.*)|#!%perl$1|' blib/script/ttree |
73 |
|
fi;; |
74 |
|
*) |
75 |
|
;; |