ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/SCRAMV1.spec
Revision: 1.96
Committed: Thu Oct 2 15:03:57 2008 UTC (16 years, 6 months ago) by andreasp
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, T0Mon_100216_1, T0Mon_100210_1, T0Mon_100204_4, T0Mon_100204_3, T0Mon_100204_1, T0Mon_100127_1, DBS-APP_20100122_slc4, DBS-APP_20100121_slc4, DBS-WEB_20100120_slc4, DBS-APP_20100120_slc4, DBS-APP_20100118_slc4, DBS-WEB_20100118_slc4, DBS-APP_20100114_slc4, DBS-WEB_20100113_slc4, DAS_20091202, FILEMOVER_20091118, DBS-APPS_20090929, pe20091116a-fromDAS_20090709, T0Mon_091111_1, DAS_20091104, DBS-WEB_20091021, DAS_20091016, DAS_20091014, DBS-WEB_20091012, DBS-WEB_20090921, pe20090910-fromDAS_20090709, FILEMOVER_20090910, DBS-WEB_20090817, FILEMOVER_20090828, DBS-APPS_20090706, T0Mon_090828_1, T0Mon_090822_1, WEBTOOLS_APPS_20090817, DBS-APPS_20090804, DBS-APPS_20090730, DAS_20090709, T0Mon_090715_1, CMSSW_2_2_13_offpatch1, apFor2213offpatch1v0, DAS_20090607, CMSSW_2_2_13_FWLITE, apFor2213fwlitev0, DBS-WEB_20090618, DBS-APPS_20090619, T0Mon_090612_1, DBS-APPS_20090608, T0Mon_090611_1, T0Mon_090610_1, CMSSW_2_2_13_HLT, apFor2213hltv0, CMSSW_2_2_13, apFor2213v0, DBS-APPS_20090604_1, DAS_20090604, DBS-APPS_20090604, DAS_20090603, DBS-APPS_20090603, CMSSW_2_2_12_HLT, T0Mon_090601_1, CMSSW_2_2_12, apFor2212hltv0, apFor2212v2, apFor2212v1, apFor2212v0, DBS-APPS_20090528, apFor2211off1v0, CMSSW_2_2_11_offpatch1, T0Mon_090527_2, T0Mon_090527_1, condcore306, T0Mon_090522_1, T0Mon_090519_2, T0Mon_090519_1, DBS_APPS_20090518, T0Mon_090517_1, CMSSW_2_2_11, CMSSW_2_2_11_HLT, T0Mon_090516_1, apFor2211v1, apFor2211hltv0, apFor2211v0, T0Mon_090515_4, T0Mon_090515_3, T0Mon_090515_2, T0Mon_090515_1, DAS_20090514_3, DAS_20090514_2, DAS_20090514_1, DAS_20090514, CMSSW_2_2_10_HLT, DBS-WEB_20090512, apFor2210hltv0, T0Mon_090510_1, CMSSW_2_2_10, apFor2210v0, DBS-WEB_20090507, DBS_APPS_20090504, DBS_APPS_20090501, DBS-APPS_20090429_2, DBS-WEB_20090429, DBS-APPS_20090429, DBS-WEB_20090428, CMSSW_2_2_9, apFor229v2, apFor229v1, apFor229v0, DBS-WEB_20090422, DBS-WEB_20090420, DBS-APPS_20090417, CMSSW_2_2_8, apFor228v0, DBS-APPS_20090415, DBS-APPS_20090410, DAS_20090408, DBS-APPS_20090406, T0Mon_090406_1, DAS_20090330, CMSSW_2_2_7, apFor227v2, DBS-APPS_20090326, T0Mon_090326_1, T0Mon_090325_1, DAS_20090319_1, CMSSW_2_2_6_HLT_ONLINE1, nr090319_for226hltonl1, DBS-APPS_20090318, CMSSW_2_2_6_HLT_ONLINE, T0Mon_090318_1, apFor227v1, DBS-APPS_20090316, T0Mon_090315_1, COUCHDB_20090313, apFor227v0, CMSSW_2_2_6_onlpatch1_ONLINE, CMSSW_2_2_6_ONLINE, CMSSW_2_2_6_HLT, apFor226HLTv0, DBS-APPS_20090310, WEBTOOLS-APPS_20090310_1, WEBTOOLS-APPS_20090310, WEBTOOLS-APPS_20090309, CMSSW_2_2_6, nr090307for226_onlpatch1, DBS-APPS_20090306, apFor226v3, nr090306onl226_tkonlsw_too_new, DBS-APPS_20090304_1, DBS-APPS_20090304, DBS-APPS_20090303_1, DBS-APPS_20090303, T0Mon_090303_1, apFor226v2, apFor226v1, DBS-APPS_20090302, apFor226v0, apFor226, CMSSW_3_1_0_pre2, nr20090224_for226, CMSSW_3_1_0_pre1, DBS-APPS_20090220_1, DBS-APPS_20090220, CMSSW_3_0_0_pre10, T0M_0_0_5, MEMCACHED_20090219_1, MEMCACHED_20090219, sm080219a, pe20090218a-30Xports-432, WEBTOOLS-APPS_20090217_1, WEBTOOLS-APPS_20090217, WEBTOOLS-APPS_20090216, pe20090216b-30Xports-432, pe20090216a-30Xports-432, CMSSW_3_0_0_pre9, pe20090213b-for30X-412, pe20090213b-for30X, pe20090213-for30X-412, pe20090213-for30X, WEBTOOLS-APPS_20090212, CMSSW_2_2_5, apFor225v0, condcore305, WEBTOOLS-APPS_20090209_64bit, zx20090209, condcore304, WEBTOOLS-APPS_20090206, condcore303, T0M_0_0_4, T0M_0_0_3, pe20090205-for30X, CMSSW_2_2_4, WEBTOOLS-APPS_20090203_1, WEBTOOLS-APPS_20090203, apFor224v4, T0M_0_0_2, apFor224v3, zx20090201, pe20090202-for30X, dl090131-412, dl090131, WEBTOOLS-APPS_20090130, apFor224v2, apFor224v1, apFor224v0, WEBTOOLS-APPS_20090129, PRODAGENT_0_12_10_pre3, smFor224v0, pe20090127c-30Xports-432, pe20090127b-30Xports-432, PRODAGENT_0_12_10_pre2_20090127_V2, pe20090127a-30Xports-432, pe20090125a-30Xports-432, CMSSW_3_0_0_pre8, pe20090124b-for30X-root522-412, pe20090124b-for30X-root522, pe20090124a-for30X-root522-412, pe20090124a-for30X-root522, pe20090123b-for30X-root522-412, pe20090123b-for30X-root522, pe20090123a-for30X-root522, PRODAGENT_0_12_10_20090122, PRODAGENT_0_12_10_pre1_MISC, CMSSW_3_0_0_pre7, pe20090116a-for30X-root522, pe20090115a-for30X-root522, sw_20090115a, sw_20090115, pe20090114c-ports, pe20090114b-ports, pe20090114a-ports, pe20090109b-for30XIB-412, pe20090109b-for30XIB, pe20090109a-for30XIB-412, pe20090109a-for30XIB, CMSSW_3_0_0_pre6, CMSSW_3_0_0_pre5, pe20090107a-for30XIB-412, pe20090107a-for30XIB, CMSSW_2_2_3_FWLITE, CMSSW_3_0_0_pre4, pe20090105a-for30XIB-412, pe20090105a-for30XIB, pe20090101a-for30XIB-412, pe20090101a-for30XIB, nr081230_fwlite223, pe20081230a-for30XIB, pe20081230-for30X-newcoralpool, pe20081229-for30X-G492, pe20081218b-for30XIB-412, pe20081218b-for30XIB, pe20081218-for30XIB-412, pe20081218-for30XIB, pe20081216-for30XIB-412, pe20081216-for30XIB, pe20081216c-for30X, pe20081216b-for30X, pe20081216a-for30X, CMSSW_2_2_3, apFor223v0, pe20081214a-for30X, pe20081213c-30Xports-432, pe20081213c-30Xports, pe20081213b-30Xports, pe20081213a-30Xports, CMSSW_2_2_2, CMSSW_3_0_0_pre3, apFor222v0, pe20081209a-for30X-412, pe20081209a-for30X, smFor221v1, pe20081204a-for30X-412, pe20081204a-for30X, pe20081104a-for30X, apFor221v0, pe20081125d-30Xports-432, pe20081125d-30Xports, pe20081125c-30Xports-432, pe20081125c-30Xports, pe20081125b-30Xports, pe20081125b-30Xports-432, pe20081125a-30Xports, pe20081124d-30Xports, pe20081124a-for30X-412, pe20081124a-for30X, pe20081124c-30Xports, pe20081124b-30Xports, pe20081124a-30Xports, pe20081121a-for30X-412, pe20081121a-for30X, CMSSW_2_2_0, pe20081121b-30Xports, pe20081121a-30Xports, apFor220v0, testofc, pe20081117a-for30X-412, pe20081117a-for30X, CMSSW_3_0_0_pre2, pe20081110a-for30X, pe20081108a-for30X-412, pe20081108a-for30X, CMSSW_2_2_0_pre1, apFor220p1v1, apFor220p1v0, pe20081107a-for30X-412, pe20081107a-for30X, T0Mon_081107_1, pe20081105-noseal, T0Mon_081105_1, pe20081031b-for30X-412, pe20081031b-for30X, pe20081031-for30X-412, pe20081031-for30X, CMSSW_2_1_12, apFor2112v0, CMSSW_3_0_0_pre1, CMSSW_2_1_10_patch2, CMSSW_2_1_10_patch1, CMSSW_2_1_10, apFor2110v2-gcc412, apFor2110v2, apFor2110v1-gcc412, apFor2110v1, apFor2110v0-gcc412, apFor2110v0
Changes since 1.95: +1 -1 lines
Log Message:
update to latest version from Shahzad

File Contents

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