ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/mod_perl2.spec
(Generate patch)

Comparing COMP/CMSDIST/mod_perl2.spec (file contents):
Revision 1.2 by egeland, Wed Feb 6 13:21:16 2008 UTC vs.
Revision 1.5 by egeland, Thu Feb 28 14:29:37 2008 UTC

# Line 32 | Line 32 | make
32   %install
33   make install
34  
35 + mkdir -p %i/conf
36 + cat << \EOF > %i/conf/mod_perl2.conf
37 + LoadModule perl_module %i/modules/mod_perl.so
38 + # Additional configuration bits go here.
39 + EOF
40 +
41   # By default mod_perl.so and include/ directory is moved to the
42   # $APACHE2_ROOT/modules and $APACHE2_ROOT/include, respectively, which
43   # is bad for us handling multiple versions in a rpm. With
# Line 40 | Line 46 | make install
46   # move these resources back to a sane location and clean up.
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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines