ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/SCRAMV1.spec
Revision: 1.99
Committed: Wed Mar 18 17:16:40 2009 UTC (16 years, 1 month ago) by elmer
Branch: MAIN
CVS Tags: CMSSW_3_1_6, bhFor316v0, CMSSW_3_1_5, CMSSW_3_3_2_ONLINE-slc5, bhFor315v0, bhFor314v0, sm091112c-slc5onl, sm091112b-slc5onl, sm091112a-slc5onl, sm091112-slc5onl, CMSSW_3_3_2_onlpatch2_ONLINE, CMSSW_3_3_2_ONLINE, CMSSW_3_3_2_onlpatch1_ONLINE, ap20091107-slc5onl, ap-20091103a-slc5onl-bootstrap, ap-20091103-slc5onl-bootstrap, sm091023b-slc5onl, sm091023a-slc5onl, CMSSW_3_3_0_onlpatch2_ONLINE, CMSSW_3_2_7_onlpatch6_ONLINE, for330op2, for327op6, CMSSW_3_3_0_onlpatch1_ONLINE, CMSSW_3_2_7_onlpatch5_ONLINE, CMSSW_3_2_7_onlpatch4_ONLINE, CMSSW_3_4_0_pre2-432, CMSSW_3_4_0_pre1-432, CMSSW_3_4_0_pre2, pe20091018a-ports5, ge20091019, sm327op4, sm340p2, CMSSW_3_2_8, CERNOIDv01, ge20091015-comp-bootstrap, CMSSW_3_3_0-slc5, CMSSW_3_3_0-432, WMCORE-before-refactor, CMSSW_3_3_0_ONLINE, sm091013a, sm091012c, sm091012b, sm091012a, CMSSW_3_2_7_onlpatch3_ONLINE, CMSSW_3_3_0, eskFor328, apFor330v0, pe20091009a-for33X, pe20091008d-ports5, pe20091008d-ports, pe20091008d-for33X, pe20091008c-ports5, ge20091008-fix-rpm-relocation, CMSSW_3_4_0_pre1, pe20091008b-ports5, pe20091008a-ports5, sm091007a, ge20091010-bootstrap, pe20091006e-ports5, ge20091006-bootstrap-3, pe20091006d-ports5, ge20091006-bootstrap-2, CMSSW_3_3_0_pre6-432, pe20091006c-ports5, ge20091006, pe20091006b-ports5, pe20091006a-ports5, pe20091006a-ports, pe20091006a-for33X, CMSSW_3_1_4, CMSSW_3_3_0_pre6, apFor330pre6v0, PerfSuiteDB_20090930, pe20090929a-ports, pe20090929a-for33X, ge20090929-amd64, ge20090929-ia32, ap20090929a-ports, ap20090929a-for33X, ap20090929-for33X, CMSSW_3_3_0_pre5-432, CMSSW_3_2_7_onlpatch2_ONLINE, sm090928a, CMSSW_3_3_0_pre5, apFor330pre5v0, pe20090925a-ports, pe20090925a-for33X, pe20090924b-for33X, pe20090924a-ports, pe20090924a-for33X, CMSSW_3_1_3, pe20090923b-for33X, pe20090923b-ports, CMSSW_3_2_7_onlpatch1_ONLINE, CMSSW_3_2_7_ONLINE, sm090923a, pe20090923a-ports, pe20090923a-for33X, pe20090922e-ports, pe20090922e-for33X, pe20090922d-ports, pe20090922c-ports, pe20090922c-for33X, pe20090922b-ports, pe20090922a-ports, pe20090922a-for33X, ge20090922-ports, sm090922a, CMSSW_3_2_7, pe20090921d-ports, pe20090921d-for33X, ge20090921-ports, pe20090921c-ports, pe20090921c-for33X, pe20090921b-for33X, pe20090921a-ports, CMSSW_3_3_0_pre4, apFor330pre4v0, eskFor327, pe20090918a-ports, PerfSuiteDB_20090916, pe20090912a-ports-xdaq, pe20090911a-ports-xdaq, CMSSW_3_3_0_pre3, apFor330pre3v0, pe20090907a-ports, pe20090907a-for33X, CMSSW_3_3_0_pre2, apFor330pre2v1, apFor330pre2v0, CMSSW_3_2_6, PerfSuiteDB_20090904_almost_stable, pe20090904a-ports, pe20090904a-for33X, PerfSuiteDB_20090904, pe20090903b-for33X, eskFor326, pe20090903b-ports, pe20090903a-ports, pe20090903-for33X, PerfSuiteDB_20090901, CMSSW_3_3_0_pre1, CMSSW_3_2_1_onlpatch6_ONLINE, sm090829a, forHEARTBEATr04, esk090827, pe20090827a-ports, pe20090827a-33X, pe20090826a-33X, CMSSW_3_2_1_onlpatch5_ONLINE, pe20090826a-ports, RPMVERIFY_0_2, sm090826a, forHEARTBEATr01, CMSSW_3_2_5, smFor325v0, eskFor325, CMSSW_3_2_1_onlpatch4_ONLINE, sm090818a, CMSSW_3_2_4_ONLINE, sm090813e, CMSSW_3_2_4_patch1, CMSSW_3_2_4, sm090813d, sm090813c, sm090813b, sm324p1a, sm090813a, CMSSW_3_2_1_onlpatch3_ONLINE, sm090810a, CMSSW_3_2_1_onlpatch2_ONLINE, sm090806a, CMSSW_3_2_3, apFor323v1, apFor323v0, DQMGUI_5_0_2, DQMGUI_5_0_1, DQMGUI_5_0_0, CMSSW_3_2_1_onlpatch1_ONLINE, CMSSW_3_2_2_patch2, apFor321onlp1v1, apFor321onlp1v0, apFor322patch2v0, CMSSW_3_2_2_patch1, apFor322pa1v0, CMSSW_3_2_2, CMSSW_3_1_2, CMSSW_3_2_1-432, apFor322v0, dl090723, pe20090722b-31Xports-432, pe20090722a-31Xports-432, CMSSW_3_2_1_ONLINE, CMSSW_3_2_1, sm090721b, sm090721a, apFor321v0, sm090720b, sm090720a, apFor320onlv1, apFor320onlv0, CMSSW_3_2_0, apFor320v1, apFor320v0, CMSSW_3_1_1_patch1, sm090716a_off, CMSSW_3_1_1_onlpatch3_ONLINE, sm090716a, CMSSW_3_1_1_onlpatch2_ONLINE, sm090715c, sm090715b, sm090715a, CMSSW_3_ONLINE_BOOTSTRAP, sm090709a, CMSSW_3_1_1_onlpatch1_ONLINE, sm090708g, CMSSW_3_1_1_ONLINE, CMSSW_3_1_1_reallyThisTime, sm090708f, sm090708e, sm090708d, sm090708c, sm090708b, CMSSW_3_1_0_ONLINE2, sm090708a, CMSSW_3_1_1, dl090707, pe20090707c-31Xports-432, pe20090707b-31Xports-432, pe20090707a-31Xports-432, pe20090706b-31Xports-432, pe20090706a-31Xports-432, CMSSW_3_1_0_onlpatch1_ONLINE, sm090703a, CMSSW_3_1_0_patch1, pe20090701a-31Xports-432, CMSSW_3_1_0_ONLINE, sm090701b, CMSSW_3_1_0, sm090701a, CMSSW_3_1_0_pre11, dl090623, CMSSW_3_1_0_pre10_ONLINE, sm090621b, sm090621a, sm090620b, sm090620a, sm090619e, sm090619d, sm090619c, sm090619b, sm090619a, sm090618a, CMSSW_3_1_0_pre10-432, pe20090616a-31Xports-432, pe20090615a-31Xports-432, CMSSW_3_1_0_pre10, dl090611, CMSSW_3_1_0_pre9, pe20090611c-31Xports-432, pe20090611b-31Xports-432, pe20090611a-31Xports-432, pe20090610d-31Xports-432, pe20090610c-31Xports-432, pe20090610b-31Xports-432, pe20090610a-31Xports-432, pe20090604a-31Xports-432, CMSSW_3_1_0_pre8, pe20090526a-31Xports-432, pe20090525b-31Xports-432, pe20090525a-31Xports-432, dl090520t2, dl090520, ap20090520-osx105, ap20090519-osx105, CMSSW_3_1_0_pre7, pe20090514b-31Xports-432, dl090514t3, dl090514t2, pe20090514a-31Xports-432, dl090514, pe20090512a-31Xports-432, pe20090511a-31Xports-432, dl090509, dl090504gcc41, pe20090505b-31Xports-432, pe20090505a-31Xports-432, dl090504, pe20090504a-31Xports-432, CMSSW_3_1_0_pre6, dl090425, dl090421, apFor2119v1, apFor2119v0, CMSSW_3_1_0_pre5, dl090416, pe20090414a-31Xports-432, dl090410, dl090409t2, dl090409, pe20090407a-31Xports-432, dl090406t2, dl090406, pe20090406b-31Xports-432, pe20090406a-31Xports-432, dl090403, pe20090403a-31Xports-432, dl090401t2, dl090401, dl090330, dl090329, dl0903029, CMSSW_3_1_0_pre4, DAS_20090319, pe20090318b-for31X-412, pe20090318b-for31X, pe20090318-for31X
Changes since 1.98: +1 -1 lines
Log Message:
Update to SCRAMV1 V2_1_2

File Contents

# Content
1 ### RPM lcg SCRAMV1 V2_1_2
2 ## INITENV +PATH PATH %instroot/common
3 ## NOCOMPILER
4
5 # This package is somewhat unusual compared to other packages we
6 # build: we install the normally versioned product "SCRAM", but also
7 # create the package database. The latter do not follow the
8 # standard versioning.
9 #
10 # The database is only created, but never changeed. It is made part
11 # of this package, but none of the files in it are included, so if
12 # the package is removed, the directory will left intact. (FIXME:
13 # check this is really so -- should we use %dir, or the default is
14 # good?)
15 #
16 # FIXME: should we have more than one project database and link them
17 # together into one big one?
18
19 %define cvsrepo cvs://:pserver:anonymous@cmscvs.cern.ch:/cvs_server/repositories/CMSSW?passwd=AA_:yZZ3e
20 %define cvstag %v
21 Source0: %{cvsrepo}&tag=-r%{cvstag}&module=SCRAM&output=/source.tar.gz
22
23 %prep
24 #SCRAM version policy check
25 %define SCRAM_REL_SERIES %(echo %v | grep '^V[0-9]\\+_[0-9]\\+_[0-9]\\+' | sed 's|^\\(V[0-9]\\+_[0-9]\\+\\)_.*|\\1|')
26 if [ "X%{SCRAM_REL_SERIES}" == "X" ] ; then
27 echo "You are trying to build SCRAM version %v which does not follow the SCRAM version policy. Valid SCRAM versions should be of the form V[0-9]+_[0-9]+_[0-9].*"
28 exit 1
29 fi
30 %setup -n SCRAM
31 %build
32 %install
33 tar -cf - . | tar -C %i -xvvf -
34 mkdir -p %i/src/main %{i}/etc/profile.d
35
36 #SCRAM/INSTALL.txt recomendations
37 sed -i -e "s|@SCRAM_LOOKUPDB_DIR@|%instroot/%cmsplatf/lcg/SCRAMV1/scramdb/|g;s|@SCRAM_VERSION@|%v|g" %i/bin/scram
38 ln -s ../../bin/scram %i/src/main/scram.pl
39 chmod 755 %i/bin/scram
40
41 %post
42 %{relocateConfig}bin/scram
43
44 mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/etc/default-scram
45 # default version for SCRAM release series Vx_y_
46 VERSION_STR="%v"
47 if [ -f $RPM_INSTALL_PREFIX/%{cmsplatf}/etc/default-scram/%{SCRAM_REL_SERIES} ] ; then
48 VERSION_STR="$VERSION_STR `cat $RPM_INSTALL_PREFIX/%{cmsplatf}/etc/default-scram/%{SCRAM_REL_SERIES}`"
49 fi
50 echo $VERSION_STR | tr ' ' '\n' | sort | tail -1 > $RPM_INSTALL_PREFIX/%{cmsplatf}/etc/default-scram/%{SCRAM_REL_SERIES}
51 # default version in common
52 VERSION_STR="%v"
53 if [ -f $RPM_INSTALL_PREFIX/%{cmsplatf}/etc/default-scramv1-version ] ; then
54 VERSION_STR="$VERSION_STR `cat $RPM_INSTALL_PREFIX/%{cmsplatf}/etc/default-scramv1-version`"
55 fi
56 echo $VERSION_STR | tr ' ' '\n' | sort | tail -1 > $RPM_INSTALL_PREFIX/%{cmsplatf}/etc/default-scramv1-version
57
58 mkdir -p $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb
59 touch $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup
60 if [ -f $RPM_INSTALL_PREFIX/share/scramdb/project.lookup ] ; then
61 dblinked=`grep "DB $RPM_INSTALL_PREFIX/share/scramdb/project.lookup" $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup`
62 if [ "X$dblinked" = "X" ] ; then
63 echo '!DB' $RPM_INSTALL_PREFIX/share/scramdb/project.lookup > $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup.link
64 cat $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup >> $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup.link
65 mv $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup.link $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup
66 fi
67 fi
68
69 %files
70 %i