ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/mod_python.spec
Revision: 1.13
Committed: Fri Feb 29 10:14:11 2008 UTC (17 years, 2 months ago) by egeland
Branch: MAIN
CVS Tags: forPHEDEX-web-20100301, forPHEDEX-web-20100226, forPHEDEX-web-20100225, forFrontend-3, forPHEDEX-web-20091020, forPHEDEX-web-20091016, forPHEDEX-web-20091014, forPHEDEX-web-20091002, forPHEDEX-web-20090929, webconddb173, condapp173, webconddb172, condapp172, forPHEDEX-web-20090821, webconddb171, condapp171, forPHEDEX-web-20090722, webconddb170, condapp170, condapp164b, webconddb164b, webconddb164, conapp164, forPHEDEX-web-20090520, forPHEDEX-web-20090514, zx20090506, forPHEDEX-web-services-20090423, forPHEDEX-web-services-20090406, forPHEDEX313a, zx20090224, zx20090219, forPHEDEX313, zx20090217, forPHEDEX-web-services-20090216, zx20090216, forPHEDEX312, zx20090115, zx20090114, WEBTOOLS-APPS_20090113, DBS-APPS_20090109, DBS-APPS_20090108, sw_20090108, WEBTOOLS-APPS_20090108, DBS-APPS_20090106, DBS-APPS_20090105, FMWS_20090103, FMWS_20081224_1, FMWS_20081224, FMWS_20081222_3, FMWS_20081222_2, FMWS_20081222, DBS-APPS_20081218, FMWS_20081212_1, FMWS_20081212, FMWS_20081211, DBS-APPS_20081211, forPHEDEX311, DBS-APPS_20081210, forPHEDEX310, DBS-APPS_20081209, WEBTOOLS-APPS_20081208, forPHEDEX310pre2, DBS-APPS_20081205, forPHEDEX-web-services-20081205, DBS-APPS_20081204, DBS-APPS_200811204, forPHEDEX310pre1, DBS-APPS_20081126_1, DBS-APPS_20081126, DBS-APPS_20081125, ofctest, DBS-APPS_20081119, DBS-APPS_20081118, DBS-APPS_20081117, DBS-APPS_20081114_1, DBS-APPS_20081114, DBS-APPS_20081112, DBS-APPS_20081111_1, DBS-APPS_20081110_2, DBS-APPS_20081110_1, WEBTOOLS-APPS_20081110, DBS-APPS_20081110, WEBTOOLS-APPS_20081107_1, WEBTOOLS-APPS_20081107, DBS-APPS_20081107, DBS-APPS_20081105, DBS-APPS_20081104, WEBTOOLS-APPS_20081031_2, DBS-APPS_20081031_2, DBS-APPS_20081031_1, WEBTOOLS-APPS_20081031_1, WEBTOOLS-APPS_20081031, forPHEDEX307, DBS-APPS_20081024, WEBTOOLS-APPS_20081020_1, WEBTOOLS-APPS_20081020, forFrontend-2, WEBTOOLS-APPS_20081016_2, WEBTOOLS-APPS_20081016_1, WEBTOOLS-APPS_20081016, WEBTOOLS-APPS_20081015, WEBTOOLS-APPS_20081013_1, WEBTOOLS-APPS_20081013, WEBTOOLS-APPS_20081009, WEBTOOLS-APPS_20081008_1, WEBTOOLS-APPS_20081008, forPHEDEX-web-services-20081008, forPHEDEX-web-services-20081007, forPHEDEX-web302_test1, forPHEDEX306, forPHEDEX-datasvc120_test1, WEBTOOLS-APPS_20080922, forFrontend-1, WEBTOOLS-APPS_20080917, WEBTOOLS-APPS_20080916, WEBTOOLS-APPS_20080915, forPHEDEX305, DBS-APPS_20080910_1, WEBTOOLS-APPS_20080910_1, WEBTOOLS-APPS_20080910, DBS-APPS_20080910, WEBTOOLS-APPS_20080909, DBS-APPS_20080908, WEBTOOLS-APPS_20080903, WEBTOOLS-APPS_20080826, zx20080825, WEBTOOLS-APPS_20080822, WEBTOOLS-APPS_20080821, WEBTOOLS-APPS_20080818_1, WEBTOOLS-APPS_20080818, forPHEDEX-web301, WEBTOOLS-APPS_20080725, WEBTOOLS-APPS_20080724, re-deps-20080722, zx20080718, WEBTOOLS-APPS_20080717, WEBTOOLS-APPS_20080716, WEBTOOLS-APPS_20080715_2, WEBTOOLS-APPS_20080715_1, WEBTOOLS-APPS_20080715, zx20080715, WEBTOOLS-APPS_20080713, forPHEDEX304, zx20080707, forPHEDEX-web110, re20080627, forPHEDEX-web300, zx20080625, WEBTOOLS-APPS_20080624, forPHEDEX-datasvc110, WEBTOOLS-APPS_20080619_1, WEBTOOLS-APPS_20080619, WEBTOOLS-APPS_20080617, zx20080611, WEBTOOLS-APPS_20080611, zx20080610, WEBTOOLS-APPS_20080609_1, WEBTOOLS-APPS_20080609, zx20080609, sw_20080509, WEBTOOLS-APPS_20080527_2, WEBTOOLS-APPS_20080527, WEBTOOLS-APPS_20080523, WEBTOOLS-APPS_20080522, WEBTOOLS-APPS_20080521, WEBTOOLS-APPS_20080520, WEBTOOLS-APPS_20080519, zx20080519, WEBTOOLS-APPS_20080511, zx20080509b, WEBTOOLS-APPS_20080507_1, WEBTOOLS-APPS_20080507, WEBTOOLS-APPS_20080506, WEBTOOLS-APPS_20080501, zx20080430, WEBTOOLS-APPS_20080422, WEBTOOLS-APPS_20080416, zx20080415-comp, webconddb_1_1_1, WEBTOOLS-APPS_20080414, WEBTOOLS-APPS_20080412, WEBTOOLS-APPS_20080411_1, WEBTOOLS-APPS_20080411, WEBTOOLS-APPS_20080410, WEBTOOLS-APPS_20080409_1, WEBTOOLS-APPS_20080409, WEBTOOLS-APPS_20080408_1, WEBTOOLS-APPS_20080408, DBS-APPS_20080407, WEBTOOLS-APPS_20080407, WEBTOOLS-APPS_20080404_2, WEBTOOLS-APPS_20080404_1, WEBTOOLS-APPS_20080404, WEBTOOLS-APPS_20080403_4, WEBTOOLS-APPS_20080403_3, WEBTOOLS-APPS_20080403_2, WEBTOOLS-APPS_20080403_1, WEBTOOLS-APPS_20080403, WEBTOOLS-APPS_20080328, WEBTOOLS-APPS_20080327_1, WEBTOOLS-APPS_20080327, WEBTOOLS-APPS_20080326_6, WEBTOOLS-APPS_20080326_5, WEBTOOLS-APPS_20080326_4, WEBTOOLS-APPS_20080326_3, WEBTOOLS-APPS_20080326_2, WEBTOOLS-APPS_20080326, DBSweb_260308_1, DBSweb_260308, forPHEDEX262_cmsbuild5, forPHEDEX262_cmsbuild4, forPHEDEX262_cmsbuild3, sw_20080319, sw20080319, DBSweb_180308_2, DBSweb_180308_1, DBSweb_180308, DBSweb_170308_8, DBSweb_170308_7, DBSweb_170308_6, DBSweb_170308_5, DBSweb_170308_4, DBSweb_170308_3, DBSweb_170308_2, DBSweb_170308, SiteDB_170308, SiteDB_1_2_1-160308_2, SiteDB_1_2_1-160308, SM_150308_DBSDisc_9, SM_150308_DBSDisc_8, SM_150308_DBSDisc_7, SM_150308_DBSDisc_6, SM_150308_DBSDisc_5, SM_150308_DBSDisc_4, SM_150308_DBSDisc_3, SM_150308_DBSDisc_2, SM_150308_DBSDisc_1, SM_150308_DBSDisc, SiteDB_140308, SiteDB_130308, ge20080304-comp
Branch point for: conddb-branch
Changes since 1.12: +15 -7 lines
Log Message:
get python libraries into rpm properly, and set python path

File Contents

# Content
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
16 make
17
18 %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
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 %post
66 %{relocateConfig}conf/mod_python.conf
67 %{relocateConfig}etc/profile.d/dependencies-setup.sh
68 %{relocateConfig}etc/profile.d/dependencies-setup.csh