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.3 by elmer, Tue Apr 25 02:34:56 2006 UTC vs.
Revision 1.13 by egeland, Fri Feb 29 10:14:11 2008 UTC

# Line 1 | Line 1
1 < ### RPM external mod_python 3.2.8
2 < Source: http://apache.mirror.testserver.li/httpd/modpython/%{n}-%{v}.tgz
3 < ## INITENV +PATH PYTHONPATH %{i}/lib
4 < ## INITENV CMD ln -sf $MOD_PYTHON_ROOT/lib/mod_python.so $APACHE_ROOT/modules
5 < Requires: python apache
1 > ### RPM external mod_python 3.2.10
2 > ## INITENV +PATH PYTHONPATH %i/lib/python`echo $PYTHON_VERSION | cut -d. -f 1,2`/site-packages
3 >
4 > # See http://www.modpython.org/live/current/doc-html/installation.html
5 >
6 > Requires:  apache2 python
7 > Source0: http://apache.mirror.testserver.li/httpd/modpython/mod_python-%realversion.tgz
8 >
9 > %prep
10 > %setup -n mod_python-%realversion
11 >
12 > # note: --prefix and --exec-prefix mean nothing to this package...
13 > ./configure --with-python=$PYTHON_ROOT/bin/python --with-apxs=$APACHE2_ROOT/bin/apxs --with-max-locks=32
14 >
15   %build
7 ./configure --prefix=%{i} \
8            --with-python=$PYTHON_ROOT/bin/python \
9            --with-apxs=$APACHE_ROOT/bin/apxs
16   make
17  
18   %install
19 < mkdir -p %i/lib
20 < install -m 0644 src/mod_python.so %i/lib
21 < cp -rp lib/python/mod_python %i/lib
19 > # note:  need undocumented DESTDIR to move the install area
20 > DESTDIR=%i make install
21 >
22 > mkdir -p %i/conf
23 > cat << \EOF > %i/conf/mod_python.conf
24 > LoadModule python_module %i/modules/mod_python.so
25 > # Additional configuration bits go here.
26 > EOF
27 >
28 > # By default mod_perl.so and include/ directory is moved to the
29 > # $APACHE2_ROOT/modules and $APACHE2_ROOT/include, respectively, which
30 > # is bad for us handling multiple versions in a rpm. With
31 > # --with-apxs set this changes to %i/$APACHE2_ROOT, which will be a
32 > # long directory path hardcoded at build time.  Therefore, we have to
33 > # move these resources back to a sane location and clean up.  The same
34 > # goes for the python libraries.
35 > mv %i/$APACHE2_ROOT/* %i
36 > mv %i/$PYTHON_ROOT/* %i
37 > rm -r %i/build
38 >
39 > # Generates the dependencies-setup.{sh,csh} files so that
40 > # sourcing init.{sh,csh} picks up also the environment of
41 > # dependencies.
42 >
43 > rm -rf %i/etc/profile.d
44 > mkdir -p %i/etc/profile.d
45 > echo '#!/bin/sh' > %{i}/etc/profile.d/dependencies-setup.sh
46 > echo '#!/bin/tcsh' > %{i}/etc/profile.d/dependencies-setup.csh
47 > echo requiredtools `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'`
48 > for tool in `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'`
49 > do
50 >    case X$tool in
51 >        Xdistcc|Xccache )
52 >        ;;
53 >        * )
54 >            toolcap=`echo $tool | tr a-z- A-Z_`
55 >            eval echo ". $`echo ${toolcap}_ROOT`/etc/profile.d/init.sh" >> %{i}/etc/profile.d/dependencies-setup.sh
56 >            eval echo "source $`echo ${toolcap}_ROOT`/etc/profile.d/init.csh" >> %{i}/etc/profile.d/dependencies-setup.csh
57 >        ;;
58 >    esac
59 > done
60 >
61 > perl -p -i -e 's|\. /etc/profile\.d/init\.sh||' %{i}/etc/profile.d/dependencies-setup.sh
62 > perl -p -i -e 's|source /etc/profile\.d/init\.csh||' %{i}/etc/profile.d/dependencies-setup.csh
63 >
64  
65 < %files
66 < %i
65 > %post
66 > %{relocateConfig}conf/mod_python.conf
67 > %{relocateConfig}etc/profile.d/dependencies-setup.sh
68 > %{relocateConfig}etc/profile.d/dependencies-setup.csh

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines