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.73 by dlange, Wed Feb 20 16:39:32 2008 UTC vs.
Revision 1.83 by muzaffar, Fri Apr 18 07:33:30 2008 UTC

# Line 1 | Line 1
1 < ### RPM lcg SCRAMV1 V1_2_0-cand6
1 > ### RPM lcg SCRAMV1 V1_0_3
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
5 + Provides: perl(SCRAM::Helper)
6 + Provides: perl(Utilities::AddDir)
7 + Provides: perl(Utilities::Architecture)
8 + Provides: perl(Utilities::SCRAMUtils)
9 + Provides: perl(ActiveDoc::GroupChecker)
10 + Provides: perl(ActiveDoc::UserInterface_basic)
11 + 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
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 12 | Line 39
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
48 + # override of SCRAM_LOOKUPDB; the wrapper is really rather simple so
49 + # there is no point in trying to patch it.
50 + #
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:/cvs_server/repositories/CMSSW?passwd=AA_:yZZ3e
55 < %define cvstag %v
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 + rm -rf %i/cgi
66 + mkdir -p %i/Installation %i/bin %i/etc/profile.d
67  
68 < mkdir -p %i/src/main %instroot/%cmsplatf/lcg/SCRAMV1/scramdb
69 < touch %instroot/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup
70 <
71 < #SCRAM/INSTALL.txt recomendations
72 < sed -i -e "s|@SCRAM_LOOKUPDB_DIR@|%instroot/%cmsplatf/lcg/SCRAMV1/scramdb/|g;s|@SCRAM_VERSION@|%v|g" %i/bin/scram
73 < ln -s ../../bin/scram %i/src/main/scram.pl
74 < 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 > echo $PERL5LIB > %i/etc/perl5lib.env
74 >
75 > echo "#!/bin/sh" > %i/etc/profile.d/dependencies-setup.sh
76 > echo "source $EXPAT_ROOT/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
77 > echo "source $P5_TEMPLATE_TOOLKIT_ROOT/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
78 > echo "source $P5_URI_ROOT/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
79 > echo "source $P5_XML_PARSER_ROOT/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
80 > echo "source $P5_LIBWWW_PERL_ROOT/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
81 >
82 > echo "#!/bin/csh" > %i/etc/profile.d/dependencies-setup.csh
83 > echo "source $EXPAT_ROOT/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
84 > echo "source $P5_TEMPLATE_TOOLKIT_ROOT/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
85 > echo "source $P5_URI_ROOT/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
86 > echo "source $P5_XML_PARSER_ROOT/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
87 > echo "source $P5_LIBWWW_PERL_ROOT/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
88  
89 < mkdir -p %{instroot}/%{cmsplatf}/etc/profile.d
37 < mkdir -p %{i}/etc/profile.d
89 > perl -p -i -e "s|#!.*perl|#!/usr/bin/env perl|" %{i}/doc/doxygen/DoxyFilt.pl
90  
91   %post
92 < %{relocateConfig}bin/scram
92 > %{relocateConfig}etc/perl5lib.env
93 > %{relocateConfig}Installation/SCRAM_SITE.pm
94 > %{relocateConfig}bin/scramv1
95 > %{relocateConfig}src/main/scram.pl
96 > %{relocateConfig}etc/profile.d/dependencies-setup.sh
97 > %{relocateConfig}etc/profile.d/dependencies-setup.csh
98   # If and only if there is no default-scramv1 set the default to be the version we package in this spec.
99   OLD_VERSION=""
100 + mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/etc
101   if [ -f $RPM_INSTALL_PREFIX/%{cmsplatf}/etc/default-scramv1-version ]
102   then
45    mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/etc
103      OLD_VERSION=`cat $RPM_INSTALL_PREFIX/%{cmsplatf}/etc/default-scramv1-version`
104   fi
105   NEW_VERSION=%v
106   (echo $OLD_VERSION;echo $NEW_VERSION) | sort | tail -1 > $RPM_INSTALL_PREFIX/%{cmsplatf}/etc/default-scramv1-version
107  
108 < mkdir -p $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb
109 < touch $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup
110 < if [ -f $RPM_INSTALL_PREFIX/share/scramdb/project.lookup ] ; then
111 <  dblinked=`grep "DB $RPM_INSTALL_PREFIX/share/scramdb/project.lookup" $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup`
112 <  if [ "X$dblinked" = "X" ] ; then
113 <    echo '!DB' $RPM_INSTALL_PREFIX/share/scramdb/project.lookup > $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup.link
114 <    cat $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup >> $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup.link
115 <    mv $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup.link $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup
116 <  fi
108 > mkdir -p $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb $RPM_INSTALL_PREFIX/share/scramdb
109 > touch $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup $RPM_INSTALL_PREFIX/share/scramdb/project.lookup
110 > dblinked=`grep "DB $RPM_INSTALL_PREFIX/share/scramdb/project.lookup" $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup`
111 > if [ "X$dblinked" == "X" ] ; then
112 >  echo '!DB' $RPM_INSTALL_PREFIX/share/scramdb/project.lookup > $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup.link
113 >  cat $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup >> $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup.link
114 >  mv $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup.link $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup
115 > fi
116 > # Use slc4_ia32_gcc345 scramdb for slc4_amd64_gcc345 until we support native builds:
117 > if [ "%{cmsplatf}" == "slc4_amd64_gcc345" ]; then
118 >  ia32_db=$RPM_INSTALL_PREFIX/slc4_ia32_gcc345/lcg/SCRAMV1/scramdb/project.lookup
119 >  amd64_db=$RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup
120 >  [ "`grep -c $ia32_db $amd64_db`" == "0" ] && \
121 >  (echo '!DB' $ia32_db >> $amd64_db )
122 >  unset ia32_db amd64_db
123   fi
124  
125   %files
126   %i
64 %instroot/%cmsplatf/lcg/SCRAMV1/scramdb
65 %exclude %instroot/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines