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.64 by elmer, Fri Jan 11 11:27:18 2008 UTC vs.
Revision 1.85 by muzaffar, Fri Apr 18 07:38:50 2008 UTC

# Line 1 | Line 1
1 < ### RPM lcg SCRAMV1 V1_1_0_reltag3
1 > ### RPM lcg SCRAMV1 V1_0_3-p2
2   ## INITENV +PATH PATH %instroot/common
3   ## INITENV +PATH PERL5LIB %{i}
4 <
5 < %define perl /usr/bin/env perl
6 < %if "%(echo %cmsplatf | cut -f1 -d_ | sed -e 's|\([A-Za-z]*\)[0-9]*|\1|')" == "osx"
7 < %define perl /usr/bin/perl
8 < %endif
9 <
10 <
11 < Requires: 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 33 | 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 package database.  The latter do not follow the
30 < # standard versioning.
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).
35   #
36   # The database is only created, but never changeed.  It is made part
37   # of this package, but none of the files in it are included, so if
# Line 42 | Line 39 | Provides: perl(Utilities::GroupChecker)
39   # check this is really so -- should we use %dir, or the default is
40   # good?)
41   #
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 + #
45   # We do the install ourselves, as "Installation/install_scram" would
46   # do, but putting the results elsewhere and using our own scram
47   # wrapper instead of using the supplied one -- mainly for easier
# Line 52 | Line 52 | Provides: perl(Utilities::GroupChecker)
52   # together into one big one?
53  
54   %define cvsrepo  cvs://:pserver:anonymous@cmscvs.cern.ch:/cvs_server/repositories/CMSSW?passwd=AA_:yZZ3e
55 < %define cvstag V1_1_0_reltag
56 < Source0: %{cvsrepo}&tag=-r%{cvstag}&module=SCRAM&output=/source.tar.gz
55 >
56 > Source0: %{cvsrepo}&tag=-r%{v}&module=SCRAM&output=/source.tar.gz
57 > Patch: %n-%realversion
58  
59   %prep
60   %setup -n SCRAM
61 + %patch -p1
62   %build
63   %install
64   tar -cf - . | tar -C %i -xvvf -
65 < mkdir -p %instroot/%cmsplatf/lcg/SCRAMV1/scramdb %i/bin %i/Installation
66 < touch %instroot/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup
65 > rm -rf %i/cgi
66 > mkdir -p %i/Installation %i/bin %i/etc/profile.d
67  
68 < cat Installation/scram.pl.in | sed -e "s|@PERLEXE@|%perl|;s|@SCRAM_HOME@|%i|g;s|@INSTALLDIR@|%i/src|g" > %i/bin/scram
69 < cat Installation/scram.pl.in | sed -e "s|@PERLEXE@|%perl|;s|@SCRAM_HOME@|%i|g;s|@INSTALLDIR@|%i/src|g" > %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|g;s|@SCRAM_LOOKUPDB_DIR@|%instroot/%cmsplatf/lcg/SCRAMV1/scramdb/|g;s|@PERLEXE@|%perl|;s|@TT2INSTALLDIR@|$TEMPLATE_TOOLKIT_ROOT/lib|g;s|@SITETEMPLATEDIR@|%i/Templates|g;s|@SCRAM_SITENAME@|STANDALONE|g" > %i/Installation/SCRAM_SITE.pm
70 < sed -e "s|@SCRAM_VERSION@|%v|" src/SCRAM/SCRAM.pm > %i/src/SCRAM/SCRAM.pm
71 < chmod 755 %i/bin/scram
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_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
70 > chmod 755 %i/bin/scramv1
71 > cp %i/bin/scramv1 %i/src/main/scram.pl
72  
73 mkdir -p %i/etc
73   echo $PERL5LIB > %i/etc/perl5lib.env
74  
76 mkdir -p %{instroot}/%{cmsplatf}/etc/profile.d
77 mkdir -p %{i}/etc/profile.d
75   echo "#!/bin/sh" > %i/etc/profile.d/dependencies-setup.sh
76   echo "source $P5_TEMPLATE_TOOLKIT_ROOT/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
77   echo "source $P5_URI_ROOT/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
# Line 87 | Line 84 | echo "source $P5_URI_ROOT/etc/profile.d/
84   echo "source $P5_XML_PARSER_ROOT/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
85   echo "source $P5_LIBWWW_PERL_ROOT/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
86  
87 < %perl -p -i -e "s|#!.*perl|#!%perl|" %{i}/doc/doxygen/DoxyFilt.pl
87 > perl -p -i -e "s|#!.*perl|#!/usr/bin/env perl|" %{i}/doc/doxygen/DoxyFilt.pl
88  
89   %post
90   %{relocateConfig}etc/perl5lib.env
91   %{relocateConfig}Installation/SCRAM_SITE.pm
92 < %{relocateConfig}bin/scram
92 > %{relocateConfig}bin/scramv1
93   %{relocateConfig}src/main/scram.pl
94   %{relocateConfig}etc/profile.d/dependencies-setup.sh
95   %{relocateConfig}etc/profile.d/dependencies-setup.csh
96   # If and only if there is no default-scramv1 set the default to be the version we package in this spec.
97   OLD_VERSION=""
98 + mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/etc
99   if [ -f $RPM_INSTALL_PREFIX/%{cmsplatf}/etc/default-scramv1-version ]
100   then
103    mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/etc
101      OLD_VERSION=`cat $RPM_INSTALL_PREFIX/%{cmsplatf}/etc/default-scramv1-version`
102   fi
103   NEW_VERSION=%v
104   (echo $OLD_VERSION;echo $NEW_VERSION) | sort | tail -1 > $RPM_INSTALL_PREFIX/%{cmsplatf}/etc/default-scramv1-version
105  
106 < mkdir -p $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb
107 < touch $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup
108 < if [ -f $RPM_INSTALL_PREFIX/share/scramdb/project.lookup ] ; then
109 <  dblinked=`grep "DB $RPM_INSTALL_PREFIX/share/scramdb/project.lookup" $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup`
110 <  if [ "X$dblinked" = "X" ] ; then
111 <    echo '!DB' $RPM_INSTALL_PREFIX/share/scramdb/project.lookup > $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup.link
112 <    cat $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup >> $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup.link
116 <    mv $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup.link $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup
117 <  fi
106 > mkdir -p $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb $RPM_INSTALL_PREFIX/share/scramdb
107 > touch $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup $RPM_INSTALL_PREFIX/share/scramdb/project.lookup
108 > dblinked=`grep "DB $RPM_INSTALL_PREFIX/share/scramdb/project.lookup" $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup`
109 > if [ "X$dblinked" == "X" ] ; then
110 >  echo '!DB' $RPM_INSTALL_PREFIX/share/scramdb/project.lookup > $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup.link
111 >  cat $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup >> $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup.link
112 >  mv $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup.link $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup
113   fi
114  
115   %files
116   %i
122 %instroot/%cmsplatf/lcg/SCRAMV1/scramdb
123 %exclude %instroot/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup
124 %exclude %i/scripts/DrDOC.sh

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines