ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/SCRAMV1.spec
(Generate patch)

Comparing COMP/CMSDIST/SCRAMV1.spec (file contents):
Revision 1.13 by eulisse, Mon Jun 19 09:50:24 2006 UTC vs.
Revision 1.70 by ratnik, Fri Feb 8 20:18:34 2008 UTC

# Line 1 | Line 1
1 < ### RPM lcg SCRAMV1 V1_0_2
1 > ### RPM lcg SCRAMV1 V1_0_3-p2
2   ## INITENV +PATH PATH %instroot/bin
3 ## INITENV SET SCRAM_ARCH %{cmsplatf}
3   ## INITENV +PATH PERL5LIB %{i}
4 < Requires: expat p5-template-toolkit p5-uri p5-xml-parser p5-libwww-perl
4 > Requires: p5-template-toolkit p5-uri p5-xml-parser p5-libwww-perl cms-env
5   Provides: perl(SCRAM::Helper)
6   Provides: perl(Utilities::AddDir)
7   Provides: perl(Utilities::Architecture)
# Line 13 | Line 12 | Provides: perl(ActiveDoc::UserQuery)
12   Provides: perl(Doxygen::Context)
13   Provides: perl(Graph::Graph)
14   Provides: perl(ObjectStore)
15 + Provides: perl(Utilities::SVNmodule)
16 + Provides: perl(URL::URL_cvsfile)
17 + Provides: perl(BuildSystem::Block)
18 + Provides: perl(BuildSystem::Build)
19 + Provides: perl(BuildSystem::BuildClass)
20 + Provides: perl(BuildSystem::BuildSetup)
21 + Provides: perl(BuildSystem::DateStampRecord)
22 + Provides: perl(BuildSystem::Tool)
23 + Provides: perl(BuildSystem::ToolBox)
24 + Provides: perl(BuildSystem::ToolDoc)
25 + Provides: perl(Utilities::GroupChecker)
26  
27   # This package is somewhat unusual compared to other packages we
28   # build: we install the normally versioned product "SCRAM", but also
# Line 41 | Line 51 | Provides: perl(ObjectStore)
51   # FIXME: should we have more than one project database and link them
52   # together into one big one?
53  
54 < %define cvsrepo  cvs://:pserver:anonymous@cmscvs.cern.ch:2401/cvs_server/repositories/SCRAM?passwd=AA_:yZZ3e  
54 > %define cvsrepo  cvs://:pserver:anonymous@isscvs.cern.ch:/local/reps/scram?passwd=AA_:yZZ3e
55  
56   Source0: %{cvsrepo}&tag=-r%{v}&module=SCRAM&output=/source.tar.gz
57  
# Line 51 | Line 61 | Source0: %{cvsrepo}&tag=-r%{v}&module=SC
61   %install
62   tar -cf - . | tar -C %i -xvvf -
63   rm -rf %i/cgi
64 < mkdir -p %instroot/bin %instroot/share/scramdb %i/Installation
65 < touch %instroot/share/scramdb/project.lookup
66 <
67 < cat Installation/scram.pl.in | sed -e "s|@PERLEXE@|/usr/bin/env perl|;s|@SCRAM_HOME@|%i|;s|@INSTALLDIR@|%i/src|" > %instroot/bin/scramv1
68 < cat Installation/SCRAM_SITE.pm.in | sed -e "s|@SCRAM_HOME@|%i|;s|@SCRAM_LOOKUPDB_DIR@|%instroot/share/scramdb/|;s|@PERLEXE@|/usr/bin/env perl|;s|@TT2INSTALLDIR@|$TEMPLATE_TOOLKIT_ROOT/lib|;s|@SITETEMPLATEDIR@|%i/Templates|;s|@SCRAM_SITENAME@|STANDALONE|" > %i/Installation/SCRAM_SITE.pm
64 > mkdir -p %instroot/bin %instroot/%cmsplatf/lcg/SCRAMV1/scramdb %i/Installation
65 > mkdir -p %i/bin
66 > touch %instroot/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup
67 >
68 > cat Installation/scram.pl.in | sed -e "s|@PERLEXE@|/usr/bin/env perl|;s|@SCRAM_HOME@|%i|;s|@INSTALLDIR@|%i/src|" > %i/bin/scramv1
69 > cat Installation/scram.pl.in | sed -e "s|@PERLEXE@|/usr/bin/env perl|;s|@SCRAM_HOME@|%i|;s|@INSTALLDIR@|%i/src|" > %i/src/main/scram.pl
70 > chmod +x %i/src/main/scram.pl
71 > cat Installation/SCRAM_SITE.pm.in | sed -e "s|@SCRAM_HOME@|%i|;s|@SCRAM_LOOKUPDB_DIR@|%instroot/%cmsplatf/lcg/SCRAMV1/scramdb/|;s|@PERLEXE@|/usr/bin/env perl|;s|@TT2INSTALLDIR@|$TEMPLATE_TOOLKIT_ROOT/lib|;s|@SITETEMPLATEDIR@|%i/Templates|;s|@SCRAM_SITENAME@|STANDALONE|" > %i/Installation/SCRAM_SITE.pm
72  
73   # cat > %instroot/bin/scramv1 << \EOF
74   # #!/bin/sh
# Line 66 | Line 79 | cat Installation/SCRAM_SITE.pm.in | sed
79   #
80   # SCRAM=$0
81   # : ${SCRAM_HOME=%i}
82 < # : ${SCRAM_LOOKUPDB=%instroot/share/scramdb/project.lookup}
82 > # : ${SCRAM_LOOKUPDB=%instroot/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup}
83   # : ${SCRAMPERL="/usr/bin/env perl"}
84   # PERL5LIB=$SCRAM_HOME/src${PERL5LIB+":$PERL5LIB"}
85   # : ${SITENAME=CERN}
# Line 77 | Line 90 | cat Installation/SCRAM_SITE.pm.in | sed
90   #
91   # exec perl "$SCRAM_HOME/src/scramcli" ${1+"$@"}
92   # EOF
93 < chmod 755 %instroot/bin/scramv1
94 < mkdir %i/etc
93 > chmod 755 %i/bin/scramv1
94 >
95 > mkdir -p %i/etc
96   echo $PERL5LIB > %i/etc/perl5lib.env
97  
98 + mkdir -p %{instroot}/%{cmsplatf}/etc/profile.d
99   mkdir -p %{i}/etc/profile.d
100   echo "#!/bin/sh" > %i/etc/profile.d/dependencies-setup.sh
86 echo "source $EXPAT_ROOT/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
101   echo "source $P5_TEMPLATE_TOOLKIT_ROOT/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
102   echo "source $P5_URI_ROOT/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
103   echo "source $P5_XML_PARSER_ROOT/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
104   echo "source $P5_LIBWWW_PERL_ROOT/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
105  
106   echo "#!/bin/csh" > %i/etc/profile.d/dependencies-setup.csh
93 echo "source $EXPAT_ROOT/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
107   echo "source $P5_TEMPLATE_TOOLKIT_ROOT/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
108   echo "source $P5_URI_ROOT/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
109   echo "source $P5_XML_PARSER_ROOT/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
110   echo "source $P5_LIBWWW_PERL_ROOT/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
111  
99
112   perl -p -i -e "s|#!.*perl|/usr/bin/env perl|" %{i}/doc/doxygen/DoxyFilt.pl
113  
114   %post
115   %{relocateConfig}etc/perl5lib.env
116   %{relocateConfig}Installation/SCRAM_SITE.pm
117 + %{relocateConfig}bin/scramv1
118 + %{relocateConfig}src/main/scram.pl
119 + %{relocateConfig}etc/profile.d/dependencies-setup.sh
120 + %{relocateConfig}etc/profile.d/dependencies-setup.csh
121 + # If and only if there is no default-scramv1 set the default to be the version we package in this spec.
122 + OLD_VERSION=""
123 + if [ -f $RPM_INSTALL_PREFIX/%{cmsplatf}/etc/default-scramv1-version ]
124 + then
125 +    mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/etc
126 +    OLD_VERSION=`cat $RPM_INSTALL_PREFIX/%{cmsplatf}/etc/default-scramv1-version`
127 + fi
128 + NEW_VERSION=%v
129 + (echo $OLD_VERSION;echo $NEW_VERSION) | sort | tail -1 > $RPM_INSTALL_PREFIX/%{cmsplatf}/etc/default-scramv1-version
130  
131 < if [ -f $RPM_INSTALL_PREFIX/%pkgrel/bin/scramv1 ]
131 > # Create the wrapper script.
132 > # This has to be done in the post installation script because otherwise it gets deleted when
133 > # uninstalling the old revision of scram.
134 > cat << \EOF_BIN_SCRAMV1 > $RPM_INSTALL_PREFIX/bin/scramv1
135 > #!/bin/sh
136 > CMSARCH=`cmsarch`
137 > SCRAM_VERSION=`cat %{instroot}/$CMSARCH/etc/default-scramv1-version`
138 > dir=`/bin/pwd`
139 > while [ ! -d ${dir}/.SCRAM -a "$dir" != "/" ] ; do
140 >  dir=`dirname $dir`
141 > done
142 > if [ -f ${dir}/config/scram_version ] ; then
143 >  ver=`cat ${dir}/config/scram_version`
144 >  if [ -f %{instroot}/$CMSARCH/lcg/SCRAMV1/${ver}/etc/profile.d/init.sh ] ; then
145 >    SCRAM_VERSION=$ver
146 >  fi
147 > fi
148 > source %{instroot}/$CMSARCH/lcg/SCRAMV1/$SCRAM_VERSION/etc/profile.d/init.sh
149 > # In the case we are on ia32 we prepend the linux32 command to the actual
150 > # scram command so that, no matter where the ia32 architecture is running
151 > # (i686 or x84_64) scram detects it as ia32.
152 > CMSPLAT=`echo $CMSARCH | cut -d_ -f 2`
153 > if [ "$CMSPLAT" == "ia32" ]
154   then
155 < %{relocateConfig}%{instroot}/bin/scramv1
155 >    USE_LINUX32=linux32
156 > else
157 >    USE_LINUX32=
158 > fi
159 >
160 > $USE_LINUX32 %{instroot}/$CMSARCH/lcg/SCRAMV1/$SCRAM_VERSION/bin/scramv1 $@
161 > EOF_BIN_SCRAMV1
162 >
163 > chmod +x $RPM_INSTALL_PREFIX/bin/scramv1
164 > perl -p -i -e "s|%{instroot}|$RPM_INSTALL_PREFIX|g" $RPM_INSTALL_PREFIX/bin/scramv1
165 >
166 > mkdir -p $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb
167 > touch $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup
168 > if [ -f $RPM_INSTALL_PREFIX/share/scramdb/project.lookup ] ; then
169 >  dblinked=`grep "DB $RPM_INSTALL_PREFIX/share/scramdb/project.lookup" $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup`
170 >  if [ "X$dblinked" == "X" ] ; then
171 >    echo '!DB' $RPM_INSTALL_PREFIX/share/scramdb/project.lookup > $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup.link
172 >    cat $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup >> $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup.link
173 >    mv $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup.link $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup
174 >  fi
175   fi
176  
111 %{relocateConfig}etc/profile.d/dependencies-setup.sh
112 %{relocateConfig}etc/profile.d/dependencies-setup.csh
113 perl -p -i -e "s|%{instroot}|$RPM_INSTALL_PREFIX|g" $RPM_INSTALL_PREFIX/bin/scramv1
177   %files
178   %i
179 < %instroot/bin/scramv1
180 < %instroot/share/scramdb
181 < %exclude %instroot/share/scramdb/project.lookup
179 > %instroot/%cmsplatf/lcg/SCRAMV1/scramdb
180 > %exclude %instroot/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup
181 > %exclude %i/scripts/DrDOC.sh

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines