ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/mod_perl2.spec
Revision: 1.6
Committed: Thu Feb 28 17:24:12 2008 UTC (17 years, 2 months ago) by egeland
Branch: MAIN
CVS Tags: MotT0_1_0_2, MotT0_1_0_1, MotT0_1_0_0, MotT0_100531_1, MotT0_100528_1, T0Mon_100518_1, T0Mon_100503_1, T0Mon_100316_1, T0Mon_100308_2, T0Mon_100308_1, forPHEDEX-web-20100301, forPHEDEX-web-20100226, forPHEDEX-web-20100225, T0Mon_100216_1, T0Mon_100210_1, T0Mon_100204_4, T0Mon_100204_3, T0Mon_100204_1, T0Mon_100127_1, T0Mon_091111_1, forPHEDEX-web-20091020, forPHEDEX-web-20091016, forPHEDEX-web-20091014, forPHEDEX-web-20091002, forPHEDEX-web-20090929, webconddb173, condapp173, webconddb172, condapp172, T0Mon_090828_1, T0Mon_090822_1, forPHEDEX-web-20090821, webconddb171, condapp171, forPHEDEX-web-20090722, T0Mon_090715_1, webconddb170, condapp170, T0Mon_090612_1, T0Mon_090611_1, T0Mon_090610_1, condapp164b, webconddb164b, T0Mon_090601_1, T0Mon_090527_2, T0Mon_090527_1, webconddb164, conapp164, T0Mon_090522_1, forPHEDEX-web-20090520, T0Mon_090519_2, T0Mon_090519_1, T0Mon_090517_1, T0Mon_090516_1, T0Mon_090515_4, T0Mon_090515_3, T0Mon_090515_2, T0Mon_090515_1, forPHEDEX-web-20090514, T0Mon_090510_1, zx20090506, forPHEDEX-web-services-20090423, T0Mon_090406_1, forPHEDEX-web-services-20090406, T0Mon_090326_1, T0Mon_090325_1, T0Mon_090318_1, T0Mon_090315_1, forPHEDEX313a, T0Mon_090303_1, 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, T0Mon_081107_1, DBS-APPS_20081105, T0Mon_081105_1, 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, PRODAGENT_0_12_2, forPHEDEX306, forPHEDEX-datasvc120_test1, T0Mon_080926_1, WEBTOOLS-APPS_20080922, T0Mon_080920_2, T0Mon_080920_1, T0Mon_080916_2, 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, T0Mon_080905_1, T0Mon_080905_01, WEBTOOLS-APPS_20080903, T0Mon_080902_2, T0Mon_080902_1, WEBTOOLS-APPS_20080826, zx20080825, T0Mon_080824_1, T0Mon_080823_1, WEBTOOLS-APPS_20080822, WEBTOOLS-APPS_20080821, WEBTOOLS-APPS_20080818_1, WEBTOOLS-APPS_20080818, buildset_V2_8, 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, nr080714_forCRAB, WEBTOOLS-APPS_20080713, forPHEDEX304, zx20080707, forPHEDEX-web110, re20080627, forPHEDEX-web300, zx20080625, WEBTOOLS-APPS_20080624, forPHEDEX-datasvc110, re20080623, 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, SiteDB_030608_1, SiteDB_300508_1, SiteDB_280508_1, WEBTOOLS-APPS_20080527_2, WEBTOOLS-APPS_20080527, WEBTOOLS-APPS_20080523, WEBTOOLS-APPS_20080522, WEBTOOLS-APPS_20080521, WEBTOOLS-APPS_20080520, WEBTOOLS-APPS_20080519, zx20080519, forPHEDEX-datasvc100, WEBTOOLS-APPS_20080511, zx20080509b, zx20080509, pe20080508-testcvs, WEBTOOLS-APPS_20080507_1, WEBTOOLS-APPS_20080507, WEBTOOLS-APPS_20080506, dl080505, WEBTOOLS-APPS_20080501, zx20080430, dl080425_for21x, 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, forPHEDEX-datasvc002, forPHEDEX-datasvc001, 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_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.5: +3 -2 lines
Log Message:
Add dependency on p5-cgi

File Contents

# User Rev Content
1 egeland 1.1 ### RPM external mod_perl2 2.0.3
2     ## INITENV +PATH PERL5LIB %i/lib/site_perl/%perlversion
3    
4 egeland 1.2 %define perlversion %(perl -e 'printf "%%vd", $^V')
5     %define perlarch %(perl -MConfig -e 'print $Config{archname}')
6    
7 egeland 1.1 # See http://perl.apache.org/docs/2.0/user/install/install.html
8    
9     Source0: http://perl.apache.org/dist/mod_perl-%realversion.tar.gz
10    
11 egeland 1.6 # Requires apache2
12     # Requires p5-cgi -- system SLC4 system CGI.pm is broken for mod_perl2
13     Requires: apache2 p5-cgi
14 egeland 1.1
15     # Doesn't actually provide these, but supposedly not needed for
16     # non-developers of mod_perl
17     Provides: perl(Apache2::FunctionTable)
18     Provides: perl(Apache2::StructureTable)
19     Provides: perl(Apache::TestConfigParse)
20     Provides: perl(Apache::TestConfigPerl)
21     Provides: perl(BSD::Resource)
22     Provides: perl(Data::Flow)
23     Provides: perl(Module::Build)
24    
25    
26     %prep
27     %setup -n mod_perl-%realversion
28    
29     %build
30     perl Makefile.PL PREFIX=%i LIB=%i/lib/site_perl/%perlversion MP_APXS=$APACHE2_ROOT/bin/apxs MP_AP_DESTDIR=%i
31     make
32    
33     %install
34     make install
35    
36 egeland 1.3 mkdir -p %i/conf
37     cat << \EOF > %i/conf/mod_perl2.conf
38 egeland 1.4 LoadModule perl_module %i/modules/mod_perl.so
39 egeland 1.3 # Additional configuration bits go here.
40     EOF
41    
42 egeland 1.1 # By default mod_perl.so and include/ directory is moved to the
43     # $APACHE2_ROOT/modules and $APACHE2_ROOT/include, respectively, which
44     # is bad for us handling multiple versions in a rpm. With
45     # MP_AP_DESTDIR=%i this changes to %i/$APACHE2_ROOT, which will be a
46     # long directory path hardcoded at build time. Therefore, we have to
47     # move these resources back to a sane location and clean up.
48     mv %i/$APACHE2_ROOT/* %i
49     rm -r %i/$(echo $APACHE2_ROOT | sed 's|^/||' | cut -d/ -f1)
50 egeland 1.3
51 egeland 1.5 # Generates the dependencies-setup.{sh,csh} files so that
52     # sourcing init.{sh,csh} picks up also the environment of
53     # dependencies.
54    
55     rm -rf %i/etc/profile.d
56     mkdir -p %i/etc/profile.d
57     echo '#!/bin/sh' > %{i}/etc/profile.d/dependencies-setup.sh
58     echo '#!/bin/tcsh' > %{i}/etc/profile.d/dependencies-setup.csh
59     echo requiredtools `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'`
60     for tool in `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'`
61     do
62     case X$tool in
63     Xdistcc|Xccache )
64     ;;
65     * )
66     toolcap=`echo $tool | tr a-z- A-Z_`
67     eval echo ". $`echo ${toolcap}_ROOT`/etc/profile.d/init.sh" >> %{i}/etc/profile.d/dependencies-setup.sh
68     eval echo "source $`echo ${toolcap}_ROOT`/etc/profile.d/init.csh" >> %{i}/etc/profile.d/dependencies-setup.csh
69     ;;
70     esac
71     done
72    
73     perl -p -i -e 's|\. /etc/profile\.d/init\.sh||' %{i}/etc/profile.d/dependencies-setup.sh
74     perl -p -i -e 's|source /etc/profile\.d/init\.csh||' %{i}/etc/profile.d/dependencies-setup.csh
75    
76    
77 egeland 1.3 %post
78     %{relocateConfig}conf/mod_perl2.conf
79 egeland 1.5 %{relocateConfig}etc/profile.d/dependencies-setup.sh
80     %{relocateConfig}etc/profile.d/dependencies-setup.csh