47 |
|
mv %i/$APACHE2_ROOT/* %i |
48 |
|
rm -r %i/$(echo $APACHE2_ROOT | sed 's|^/||' | cut -d/ -f1) |
49 |
|
|
50 |
+ |
# Generates the dependencies-setup.{sh,csh} files so that |
51 |
+ |
# sourcing init.{sh,csh} picks up also the environment of |
52 |
+ |
# dependencies. |
53 |
+ |
|
54 |
+ |
rm -rf %i/etc/profile.d |
55 |
+ |
mkdir -p %i/etc/profile.d |
56 |
+ |
echo '#!/bin/sh' > %{i}/etc/profile.d/dependencies-setup.sh |
57 |
+ |
echo '#!/bin/tcsh' > %{i}/etc/profile.d/dependencies-setup.csh |
58 |
+ |
echo requiredtools `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'` |
59 |
+ |
for tool in `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'` |
60 |
+ |
do |
61 |
+ |
case X$tool in |
62 |
+ |
Xdistcc|Xccache ) |
63 |
+ |
;; |
64 |
+ |
* ) |
65 |
+ |
toolcap=`echo $tool | tr a-z- A-Z_` |
66 |
+ |
eval echo ". $`echo ${toolcap}_ROOT`/etc/profile.d/init.sh" >> %{i}/etc/profile.d/dependencies-setup.sh |
67 |
+ |
eval echo "source $`echo ${toolcap}_ROOT`/etc/profile.d/init.csh" >> %{i}/etc/profile.d/dependencies-setup.csh |
68 |
+ |
;; |
69 |
+ |
esac |
70 |
+ |
done |
71 |
+ |
|
72 |
+ |
perl -p -i -e 's|\. /etc/profile\.d/init\.sh||' %{i}/etc/profile.d/dependencies-setup.sh |
73 |
+ |
perl -p -i -e 's|source /etc/profile\.d/init\.csh||' %{i}/etc/profile.d/dependencies-setup.csh |
74 |
+ |
|
75 |
+ |
|
76 |
|
%post |
77 |
|
%{relocateConfig}conf/mod_perl2.conf |
78 |
+ |
%{relocateConfig}etc/profile.d/dependencies-setup.sh |
79 |
+ |
%{relocateConfig}etc/profile.d/dependencies-setup.csh |