ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/mod_perl2.spec
Revision: 1.7
Committed: Mon Nov 17 15:56:21 2008 UTC (16 years, 5 months ago) by lat
Branch: MAIN
CVS Tags: dg-base-rev19, forPHEDEX-web-20100910-3, forPHEDEX-web-20100910-2, forPHEDEX-web-20100910-1, forPHEDEX-web-20100831-1, forPHEDEX-20100831-1, dg-base-rev18, forPHEDEX-web-20100827-3, forPHEDEX-web-20100827-2, forPHEDEX-web-20100827-1, forPHEDEX-web-20100826-1, forPHEDEX-web-20100825-4, forPHEDEX-web-20100825-3, forPHEDEX-web-20100825-2, forPHEDEX-web-20100825-1, forPHEDEX-web-20100823-3, forPHEDEX-web-20100823-2, forPHEDEX-web-20100823-1, forPHEDEX-web-20100819-3, forPHEDEX-web-20100819-2, forPHEDEX-web-20100819-1, forPHEDEX-web-20100818-5, forPHEDEX-web-20100818-4, forPHEDEX-web-20100818-3, forPHEDEX-web-20100818-2, forPHEDEX-web-20100818-1, forPHEDEX-web-20100817-4, forPHEDEX-web-20100817-3, forPHEDEX-web-20100817-2, forPHEDEX-web-20100817-1, forPHEDEX-web-20100812-6, forPHEDEX-web-20100812-5, forPHEDEX-web-20100812-4, forPHEDEX-web-20100812-3, dg-base-rev17, forPHEDEX-web-20100812-2, forPHEDEX-web-20100812-1, forPHEDEX-web-20100811-3, forPHEDEX-web-20100811-2, forPHEDEX-web-20100811-1, forPHEDEX-web-20100810-a, forPHEDEX-web-20100810-4, forPHEDEX-web-20100810-3, forPHEDEX-web-20100810-2, forPHEDEX-web-20100810-1, forPHEDEX-web-20100809-2, forPHEDEX-web-20100809-1, forPHEDEX-web-20100729-1, forPHEDEX-web-20100726-4, forPHEDEX-web-20100721-7, forPHEDEX-web-20100726-3, forPHEDEX-web-20100726-2, forPHEDEX-web-20100726-1, FRONTEND_CONF_3_30_20100724, FRONTEND_CONF_3_29_20100723, dg-base-rev16, ge20100722-rpm-osx-64-bit, forPHEDEX-web-20100721-6, forPHEDEX-web-20100721-5, forPHEDEX-web-20100721-4, forPHEDEX-web-20100721-3, forPHEDEX-web-20100721-2, forPHEDEX-web-20100721-1, builder2010_07_20_1279626381-PHEDEX-web, forPHEDEX-web-20100720-2, forPHEDEX-web-20100720-1, forPHEDEX-web-20100714-1, builder2010_07_08_1278608825-PHEDEX-combined-web, dg20100630-phedexweb, dg-base-rev15, forPHEDEX-web-20100623-1, ge20100621-bootstrap-rpm-4-8-macosx, ge20100611-apt-rpm-4-8-gcc-4-5-0, MotT0_1_0_15, MotT0_1_0_14, MotT0_1_0_13, MotT0_1_0_12, MotT0_1_0_11, MotT0_1_0_10, MotT0_1_0_9, dg20100503-phedexweb, dg-base-rev14, MotT0_1_0_8, MotT0_1_0_6, MotT0_1_0_5, MotT0_1_0_4, MotT0_1_0_3, dg-base-rev13, forPHEDEX-web-20100528-1, ge20100521b-new-rpm, ge20100521-new-rpm, ge20100519-new-apt, ge20100427-rpm-on-linux, dg-base-rev12, ge20100422-rpm-4-8-0, dg20100416-phedexweb, dg-base-rev11, dg-base-rev10, dg-base-rev9, forPHEDEX-web-20100409-1, forPHEDEX-web-20100403-1, forPHEDEX-web-20100331-1, forPHEDEX-web-20100329-1, dg-base-rev8, forPHEDEX-web-20100315-2, forPHEDEX-web-20100315, forPHEDEX-web-20100303, DAS_20100302_slc5_amd64_gcc434, forPHEDEX-web-20100302, forPHEDEX-web-20100301b, dg-base-rev7, DBS_20100226_slc5_amd64_gcc434, DBS_20100217_slc5_amd64_gcc434, FILEMOVER_20100217_slc5_amd64_gcc434, FRONTEND_CONF_3_24_20100217, DAS_20100217_slc5_amd64_gcc434, DAS_20100216b_slc5_amd64_gcc434, DAS_20100216_slc5_amd64_gcc434, forFrontend-3, T0Mon_100204_2, dg20100201-dbs3, FILEMOVER_20100201_slc5_amd64_gcc434, FILEMOVER_20100128b_slc5_amd64_gcc434, dg20100129-dbs3, dg20100128-dbs3, FILEMOVER_20100128_slc5_amd64_gcc434, DAS_20100127_slc5_amd64_gcc434, DAS_20100126_slc5_amd64_gcc434, DBS-APP_20100122_slc4, FILEMOVER_20100122_slc5_amd64_gcc434, DBS-APP_20100121_slc4, DBS-WEB_20100120_slc4, DBS-APP_20100120_slc4, DAS_20100119_slc5_amd64_gcc434, DBS-APP_20100118_slc4, DBS-WEB_20100118_slc4, DAS_20100115_slc5_amd64_gcc434, dg20100115-security, DBS_20100115_slc5_amd64_gcc434, DBS-APP_20100114_slc4, DBS-WEB_20100113_slc4, dg20100112-security, DBS_20100112_slc5_amd64_gcc434, DBS_20100111_slc5_amd64_gcc434, dg20100111-security, dg20100107b-wmcore, dg20100107-wmcore, DAS_20100105_slc5_amd64_gcc434, DAS_20091221_slc5_amd64_gcc434, DAS_20091214_slc5_amd64_gcc434, dg20091211-couchdb, dg20091210-phedex, dg20091203c-comp-base, DD_20091208_slc5_amd64_gcc434, DAS_20091208_slc5_amd64_gcc434, FILEMOVER_20091208_slc5_amd64_gcc434, DBS_20091208_slc5_amd64_gcc434, dg20091203b-comp-base, dg20091203-comp-base, DAS_20091202, DQMCATTEST_0_0_1, FILEMOVER_20091118, DBS-APPS_20090929, pe20091117a-fromDAS_20090709, DAS_20091117, pe20091116b-fromDAS_20090709, pe20091116a-fromDAS_20090709, BUILDBOT_01, CERNOIDv02, DAS_20091104, DBS-WEB_20091021, CouchDB_0_10_0, DAS_20091016, CERNOIDv01, DAS_20091014, WMCORE-before-refactor, DBS-WEB_20091012, PerfSuiteDB_20090930, DBS-WEB_20090921, PerfSuiteDB_20090916, pe20090910-fromDAS_20090709, FILEMOVER_20090910, PerfSuiteDB_20090904_almost_stable, DBS-WEB_20090817, PerfSuiteDB_20090904, FILEMOVER_20090828, PerfSuiteDB_20090901, DBS-APPS_20090706, forHEARTBEATr04, RPMVERIFY_0_2, forHEARTBEATr01, WEBTOOLS_APPS_20090817, DBS-APPS_20090804, DBS-APPS_20090730, DAS_20090709, DAS_20090607, DBS-WEB_20090618, DBS-APPS_20090619, DBS-APPS_20090608, DBS-APPS_20090604_1, DAS_20090604, DBS-APPS_20090604, DAS_20090603, DBS-APPS_20090603, DBS-APPS_20090528, condcore306, ap20090520-osx105, ap20090519-osx105, DBS_APPS_20090518, DAS_20090514_3, DAS_20090514_2, DAS_20090514_1, DAS_20090514, DBS-WEB_20090512, DBS-WEB_20090507, DBS_APPS_20090504, DBS_APPS_20090501, DBS-APPS_20090429_2, DBS-WEB_20090429, DBS-APPS_20090429, DBS-WEB_20090428, DBS-WEB_20090422, DBS-WEB_20090420, DBS-APPS_20090417, DBS-APPS_20090415, DBS-APPS_20090410, DAS_20090408, DBS-APPS_20090406, DAS_20090330, DBS-APPS_20090326, DAS_20090319_1, DAS_20090319, DBS-APPS_20090318, DBS-APPS_20090316, DAS_20090316, DAS_20090313, COUCHDB_20090313, DBS-APPS_20090310, WEBTOOLS-APPS_20090310_1, WEBTOOLS-APPS_20090310, WEBTOOLS-APPS_20090309, DBS-APPS_20090306, DBS-APPS_20090304_1, DBS-APPS_20090304, DBS-APPS_20090303_1, DBS-APPS_20090303, DBS-APPS_20090302, DBS-APPS_20090220_1, DBS-APPS_20090220, T0M_0_0_5, MEMCACHED_20090219_1, MEMCACHED_20090219, WEBTOOLS-APPS_20090217_1, WEBTOOLS-APPS_20090217, WEBTOOLS-APPS_20090216, condcore305, WEBTOOLS-APPS_20090212, WEBTOOLS-APPS_20090209_64bit, zx20090209, WEBTOOLS-APPS_20090206, T0M_0_0_4, T0M_0_0_3, WEBTOOLS-APPS_20090203_1, WEBTOOLS-APPS_20090203, T0M_0_0_2, zx20090201, WEBTOOLS-APPS_20090130, WEBTOOLS-APPS_20090129, PRODAGENT_0_12_10_pre3, PRODAGENT_0_12_10_pre2_20090127_V2, PRODAGENT_0_12_10_20090122, PRODAGENT_0_12_10_pre1_MISC, sw_20090115a, sw_20090115, testofc
Changes since 1.6: +1 -0 lines
Log Message:
Relocate build configuration data.  Needed for building perl packages based on mod_perl.

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 lat 1.7 %{relocateConfig}lib/site_perl/%perlversion/%perlarch/Apache2/BuildConfig.pm
80 egeland 1.5 %{relocateConfig}etc/profile.d/dependencies-setup.sh
81     %{relocateConfig}etc/profile.d/dependencies-setup.csh