8 |
|
|
9 |
|
Source0: http://perl.apache.org/dist/mod_perl-%realversion.tar.gz |
10 |
|
|
11 |
< |
# Only require apache2 since perl is seeded from the system. |
12 |
< |
Requires: apache2 |
11 |
> |
# Requires apache2 |
12 |
> |
# Requires p5-cgi -- system SLC4 system CGI.pm is broken for mod_perl2 |
13 |
> |
Requires: apache2 p5-cgi |
14 |
|
|
15 |
|
# Doesn't actually provide these, but supposedly not needed for |
16 |
|
# non-developers of mod_perl |
48 |
|
mv %i/$APACHE2_ROOT/* %i |
49 |
|
rm -r %i/$(echo $APACHE2_ROOT | sed 's|^/||' | cut -d/ -f1) |
50 |
|
|
51 |
+ |
# Generates the dependencies-setup.{sh,csh} files so that |
52 |
+ |
# sourcing init.{sh,csh} picks up also the environment of |
53 |
+ |
# dependencies. |
54 |
+ |
|
55 |
+ |
rm -rf %i/etc/profile.d |
56 |
+ |
mkdir -p %i/etc/profile.d |
57 |
+ |
echo '#!/bin/sh' > %{i}/etc/profile.d/dependencies-setup.sh |
58 |
+ |
echo '#!/bin/tcsh' > %{i}/etc/profile.d/dependencies-setup.csh |
59 |
+ |
echo requiredtools `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'` |
60 |
+ |
for tool in `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'` |
61 |
+ |
do |
62 |
+ |
case X$tool in |
63 |
+ |
Xdistcc|Xccache ) |
64 |
+ |
;; |
65 |
+ |
* ) |
66 |
+ |
toolcap=`echo $tool | tr a-z- A-Z_` |
67 |
+ |
eval echo ". $`echo ${toolcap}_ROOT`/etc/profile.d/init.sh" >> %{i}/etc/profile.d/dependencies-setup.sh |
68 |
+ |
eval echo "source $`echo ${toolcap}_ROOT`/etc/profile.d/init.csh" >> %{i}/etc/profile.d/dependencies-setup.csh |
69 |
+ |
;; |
70 |
+ |
esac |
71 |
+ |
done |
72 |
+ |
|
73 |
+ |
perl -p -i -e 's|\. /etc/profile\.d/init\.sh||' %{i}/etc/profile.d/dependencies-setup.sh |
74 |
+ |
perl -p -i -e 's|source /etc/profile\.d/init\.csh||' %{i}/etc/profile.d/dependencies-setup.csh |
75 |
+ |
|
76 |
+ |
|
77 |
|
%post |
78 |
|
%{relocateConfig}conf/mod_perl2.conf |
79 |
+ |
%{relocateConfig}etc/profile.d/dependencies-setup.sh |
80 |
+ |
%{relocateConfig}etc/profile.d/dependencies-setup.csh |