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

Comparing COMP/CMSDIST/mod_python.spec (file contents):
Revision 1.8 by elmer, Tue May 1 12:11:02 2007 UTC vs.
Revision 1.12 by egeland, Thu Feb 28 14:29:37 2008 UTC

# Line 1 | Line 1
1 < ### RPM external mod_python 3.2.8
1 > ### RPM external mod_python 3.2.10
2 > # See http://www.modpython.org/live/current/doc-html/installation.html
3  
4 < %define pythonv %(echo $PYTHON_VERSION | cut -d. -f 1,2)
4 < ## INITENV +PATH PYTHONPATH %{i}/lib/python%{pythonv}
5 < ## INITENV CMD ln -sf $MOD_PYTHON_ROOT/lib/mod_python.so $APACHE_ROOT/modules
4 > Requires:  apache2 python
5  
6 < Source: http://apache.osuosl.org/httpd/modpython/%{n}-%{v}.tgz
8 < Requires: python apache
6 > Source0: http://apache.mirror.testserver.li/httpd/modpython/mod_python-%realversion.tgz
7  
8 + %prep
9 + %setup -n mod_python-%realversion
10  
11 < %build
12 < ./configure --prefix=%{i} \
13 <            --with-python=$PYTHON_ROOT/bin/python \
14 <            --with-apxs=$APACHE_ROOT/bin/apxs
11 > ./configure --with-python=$PYTHON_ROOT/bin/python --with-apxs=$APACHE2_ROOT/bin/apxs --with-max-locks=32
12  
13 + %build
14   make
15  
18 cd dist
19 python setup.py build
20
16   %install
17 + make install
18  
19 < mkdir -p %i/lib
20 < cp src/mod_python.so %i/lib
21 <
22 < cd dist
23 < python setup.py install --prefix=%i
24 <
25 < mv %{i}/lib/python%{pythonv}/site-packages/mod_python \
26 <  %{i}/lib/python%{pythonv}
27 <
28 < rm -rf %{i}/lib/python%{pythonv}/site-packages
29 <
19 > mkdir -p %i/conf
20 > cat << \EOF > %i/conf/mod_python.conf
21 > LoadModule python_module %i/modules/mod_python.so
22 > # Additional configuration bits go here.
23 > EOF
24 >
25 > # By default mod_python.so and is moved to the
26 > # $APACHE2_ROOT/modules directory, which
27 > # is bad for us handling multiple versions in a rpm.
28 > mkdir -p %i/modules
29 > mv $APACHE2_ROOT/modules/mod_python.so %i/modules
30 >
31 > # Generates the dependencies-setup.{sh,csh} files so that
32 > # sourcing init.{sh,csh} picks up also the environment of
33 > # dependencies.
34 >
35 > rm -rf %i/etc/profile.d
36 > mkdir -p %i/etc/profile.d
37 > echo '#!/bin/sh' > %{i}/etc/profile.d/dependencies-setup.sh
38 > echo '#!/bin/tcsh' > %{i}/etc/profile.d/dependencies-setup.csh
39 > echo requiredtools `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'`
40 > for tool in `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'`
41 > do
42 >    case X$tool in
43 >        Xdistcc|Xccache )
44 >        ;;
45 >        * )
46 >            toolcap=`echo $tool | tr a-z- A-Z_`
47 >            eval echo ". $`echo ${toolcap}_ROOT`/etc/profile.d/init.sh" >> %{i}/etc/profile.d/dependencies-setup.sh
48 >            eval echo "source $`echo ${toolcap}_ROOT`/etc/profile.d/init.csh" >> %{i}/etc/profile.d/dependencies-setup.csh
49 >        ;;
50 >    esac
51 > done
52 >
53 > perl -p -i -e 's|\. /etc/profile\.d/init\.sh||' %{i}/etc/profile.d/dependencies-setup.sh
54 > perl -p -i -e 's|source /etc/profile\.d/init\.csh||' %{i}/etc/profile.d/dependencies-setup.csh
55 >
56 >
57 > %post
58 > %{relocateConfig}conf/mod_python.conf
59 > %{relocateConfig}etc/profile.d/dependencies-setup.sh
60 > %{relocateConfig}etc/profile.d/dependencies-setup.csh

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines