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.41 by eulisse, Thu Sep 28 13:44:29 2006 UTC vs.
Revision 1.62 by muzaffar, Tue Jan 1 11:01:20 2008 UTC

# Line 1 | Line 1
1 < ### RPM lcg SCRAMV1 V1_0_3
2 < ## INITENV +PATH PATH %instroot/bin
1 > ### RPM lcg SCRAMV1 V1_1_0
2 > ## INITENV +PATH PATH %instroot/common
3   ## INITENV +PATH PERL5LIB %{i}
4 < Requires: expat p5-template-toolkit p5-uri p5-xml-parser p5-libwww-perl cms-env
4 > Requires: p5-template-toolkit p5-uri p5-xml-parser p5-libwww-perl
5   Provides: perl(SCRAM::Helper)
6   Provides: perl(Utilities::AddDir)
7   Provides: perl(Utilities::Architecture)
# Line 26 | Line 26 | 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
29 < # create the front-end "scram" wrapper and the package database.  The
30 < # latter do not follow the standard versioning.
31 < #
32 < # The front-end script can be overwritten by any version *PROVIDED*
33 < # the platform string comes first as is the default (i.e. the
34 < # installation tree looks like <platf>/lcg/SCRAM/<version>/src).
29 > # create the package database.  The latter do not follow the
30 > # standard versioning.
31   #
32   # The database is only created, but never changeed.  It is made part
33   # of this package, but none of the files in it are included, so if
# Line 39 | Line 35 | Provides: perl(Utilities::GroupChecker)
35   # check this is really so -- should we use %dir, or the default is
36   # good?)
37   #
42 # The front-end wrapper and the script go at the installation root,
43 # not anywhere in the package tree.  They must remain modifiable.
44 #
38   # We do the install ourselves, as "Installation/install_scram" would
39   # do, but putting the results elsewhere and using our own scram
40   # wrapper instead of using the supplied one -- mainly for easier
# Line 51 | Line 44 | Provides: perl(Utilities::GroupChecker)
44   # FIXME: should we have more than one project database and link them
45   # together into one big one?
46  
47 < %define cvsrepo  cvs://:pserver:anonymous@cmscvs.cern.ch:2401/cvs_server/repositories/SCRAM?passwd=AA_:yZZ3e  
48 <
49 < Source0: %{cvsrepo}&tag=-r%{v}&module=SCRAM&output=/source.tar.gz
47 > %define cvsrepo  cvs://:pserver:anonymous@cmscvs.cern.ch:/cvs_server/repositories/CMSSW?passwd=AA_:yZZ3e
48 > %define cvstag V1_1_0_reltag
49 > Source0: %{cvsrepo}&tag=-r%{cvstag}&module=SCRAM&output=/source.tar.gz
50  
51   %prep
52   %setup -n SCRAM
53   %build
54   %install
55   tar -cf - . | tar -C %i -xvvf -
56 < rm -rf %i/cgi
57 < mkdir -p %instroot/bin %instroot/share/scramdb %i/Installation
65 < mkdir -p %i/bin
66 < touch %instroot/share/scramdb/project.lookup
56 > mkdir -p %instroot/%cmsplatf/lcg/SCRAMV1/scramdb %i/bin %i/Installation
57 > touch %instroot/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup
58  
59 < cat Installation/scram.pl.in | sed -e "s|@PERLEXE@|/usr/bin/env perl|;s|@SCRAM_HOME@|%i|;s|@INSTALLDIR@|%i/src|" > %i/bin/scramv1
60 < 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
59 > cat Installation/scram.pl.in | sed -e "s|@PERLEXE@|/usr/bin/env perl|;s|@SCRAM_HOME@|%i|g;s|@INSTALLDIR@|%i/src|g" > %i/bin/scram
60 > cat Installation/scram.pl.in | sed -e "s|@PERLEXE@|/usr/bin/env perl|;s|@SCRAM_HOME@|%i|g;s|@INSTALLDIR@|%i/src|g" > %i/src/main/scram.pl
61   chmod +x %i/src/main/scram.pl
62 < 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
62 > cat Installation/SCRAM_SITE.pm.in | sed -e "s|@SCRAM_HOME@|%i|g;s|@SCRAM_LOOKUPDB_DIR@|%instroot/%cmsplatf/lcg/SCRAMV1/scramdb/|g;s|@PERLEXE@|/usr/bin/env perl|;s|@TT2INSTALLDIR@|$TEMPLATE_TOOLKIT_ROOT/lib|g;s|@SITETEMPLATEDIR@|%i/Templates|g;s|@SCRAM_SITENAME@|STANDALONE|g" > %i/Installation/SCRAM_SITE.pm
63 > sed -e "s|@SCRAM_VERSION@|%v|" src/SCRAM/SCRAM.pm > %i/src/SCRAM/SCRAM.pm
64 > chmod 755 %i/bin/scram
65  
66 < # cat > %instroot/bin/scramv1 << \EOF
74 < # #!/bin/sh
75 < #
76 < # # FIXME: Handle -re?
77 < # # FIXME: Since we can install the same package on many platforms in
78 < # # one tree, should the project lookup database be platform-specific?
79 < #
80 < # SCRAM=$0
81 < # : ${SCRAM_HOME=%i}
82 < # : ${SCRAM_LOOKUPDB=%instroot/share/scramdb/project.lookup}
83 < # : ${SCRAMPERL="/usr/bin/env perl"}
84 < # PERL5LIB=$SCRAM_HOME/src${PERL5LIB+":$PERL5LIB"}
85 < # : ${SITENAME=CERN}
86 < # : ${SEARCHOVRD=true}
87 < # : ${LOCTOOLS=NODEFAULT}
88 < # export SCRAM SCRAM_HOME SCRAM_LOOKUPDB SCRAMPERL
89 < # export PERL5LIB SITENAME SEARCHOVRD LOCTOOLS
90 < #
91 < # exec perl "$SCRAM_HOME/src/scramcli" ${1+"$@"}
92 < # EOF
93 < chmod 755 %i/bin/scramv1
94 <
95 < mkdir %i/etc
66 > mkdir -p %i/etc
67   echo $PERL5LIB > %i/etc/perl5lib.env
68  
69   mkdir -p %{instroot}/%{cmsplatf}/etc/profile.d
70   mkdir -p %{i}/etc/profile.d
71   echo "#!/bin/sh" > %i/etc/profile.d/dependencies-setup.sh
101 echo "source $EXPAT_ROOT/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
72   echo "source $P5_TEMPLATE_TOOLKIT_ROOT/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
73   echo "source $P5_URI_ROOT/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
74   echo "source $P5_XML_PARSER_ROOT/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
75   echo "source $P5_LIBWWW_PERL_ROOT/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
76  
77   echo "#!/bin/csh" > %i/etc/profile.d/dependencies-setup.csh
108 echo "source $EXPAT_ROOT/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
78   echo "source $P5_TEMPLATE_TOOLKIT_ROOT/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
79   echo "source $P5_URI_ROOT/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
80   echo "source $P5_XML_PARSER_ROOT/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
81   echo "source $P5_LIBWWW_PERL_ROOT/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
82  
83 < perl -p -i -e "s|#!.*perl|/usr/bin/env perl|" %{i}/doc/doxygen/DoxyFilt.pl
83 > perl -p -i -e "s|#!.*perl|#!/usr/bin/env perl|" %{i}/doc/doxygen/DoxyFilt.pl
84  
85   %post
86   %{relocateConfig}etc/perl5lib.env
87   %{relocateConfig}Installation/SCRAM_SITE.pm
88 < %{relocateConfig}bin/scramv1
88 > %{relocateConfig}bin/scram
89   %{relocateConfig}src/main/scram.pl
90   %{relocateConfig}etc/profile.d/dependencies-setup.sh
91   %{relocateConfig}etc/profile.d/dependencies-setup.csh
# Line 130 | Line 99 | fi
99   NEW_VERSION=%v
100   (echo $OLD_VERSION;echo $NEW_VERSION) | sort | tail -1 > $RPM_INSTALL_PREFIX/%{cmsplatf}/etc/default-scramv1-version
101  
102 < # Create the wrapper script.
103 < # This has to be done in the post installation script because otherwise it gets deleted when
104 < # uninstalling the old revision of scram.
105 < cat << \EOF_BIN_SCRAMV1 > $RPM_INSTALL_PREFIX/bin/scramv1
106 < #!/bin/sh
107 < CMSARCH=`cmsarch`
108 < SCRAM_VERSION=`cat %{instroot}/$CMSARCH/etc/default-scramv1-version`
109 < source %{instroot}/$CMSARCH/lcg/SCRAMV1/$SCRAM_VERSION/etc/profile.d/init.sh
110 < %{instroot}/$CMSARCH/lcg/SCRAMV1/$SCRAM_VERSION/bin/scramv1 $@
111 < EOF_BIN_SCRAMV1
143 < chmod +x $RPM_INSTALL_PREFIX/bin/scramv1
144 < perl -p -i -e "s|%{instroot}|$RPM_INSTALL_PREFIX|g" $RPM_INSTALL_PREFIX/bin/scramv1
102 > mkdir -p $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb
103 > touch $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup
104 > if [ -f $RPM_INSTALL_PREFIX/share/scramdb/project.lookup ] ; then
105 >  dblinked=`grep "DB $RPM_INSTALL_PREFIX/share/scramdb/project.lookup" $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup`
106 >  if [ "X$dblinked" = "X" ] ; then
107 >    echo '!DB' $RPM_INSTALL_PREFIX/share/scramdb/project.lookup > $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup.link
108 >    cat $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup >> $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup.link
109 >    mv $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup.link $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup
110 >  fi
111 > fi
112  
113   %files
114   %i
115 < %instroot/share/scramdb
116 < %exclude %instroot/share/scramdb/project.lookup
115 > %instroot/%cmsplatf/lcg/SCRAMV1/scramdb
116 > %exclude %instroot/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup
117   %exclude %i/scripts/DrDOC.sh

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines