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 |
5 |
– |
|
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 |
16 |
|
make |
17 |
|
|
18 |
|
%install |
19 |
< |
make install |
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 |
25 |
|
# Additional configuration bits go here. |
26 |
|
EOF |
27 |
|
|
28 |
< |
# By default mod_python.so and is moved to the |
29 |
< |
# $APACHE2_ROOT/modules directory, which |
30 |
< |
# is bad for us handling multiple versions in a rpm. |
31 |
< |
mkdir -p %i/modules |
32 |
< |
mv $APACHE2_ROOT/modules/mod_python.so %i/modules |
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 |