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.78 by dlange, Thu Feb 28 16:35:07 2008 UTC

# Line 1 | Line 1
1 < ### RPM lcg SCRAMV1 V1_1_0_reltag3
1 > ### RPM lcg SCRAMV1 V1_2_1
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
12 Provides: perl(SCRAM::Helper)
13 Provides: perl(Utilities::AddDir)
14 Provides: perl(Utilities::Architecture)
15 Provides: perl(Utilities::SCRAMUtils)
16 Provides: perl(ActiveDoc::GroupChecker)
17 Provides: perl(ActiveDoc::UserInterface_basic)
18 Provides: perl(ActiveDoc::UserQuery)
19 Provides: perl(Doxygen::Context)
20 Provides: perl(Graph::Graph)
21 Provides: perl(ObjectStore)
22 Provides: perl(Utilities::SVNmodule)
23 Provides: perl(URL::URL_cvsfile)
24 Provides: perl(BuildSystem::Block)
25 Provides: perl(BuildSystem::Build)
26 Provides: perl(BuildSystem::BuildClass)
27 Provides: perl(BuildSystem::BuildSetup)
28 Provides: perl(BuildSystem::DateStampRecord)
29 Provides: perl(BuildSystem::Tool)
30 Provides: perl(BuildSystem::ToolBox)
31 Provides: perl(BuildSystem::ToolDoc)
32 Provides: perl(Utilities::GroupChecker)
3  
4   # This package is somewhat unusual compared to other packages we
5   # build: we install the normally versioned product "SCRAM", but also
# Line 42 | Line 12 | Provides: perl(Utilities::GroupChecker)
12   # check this is really so -- should we use %dir, or the default is
13   # good?)
14   #
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 #
15   # FIXME: should we have more than one project database and link them
16   # together into one big one?
17  
18   %define cvsrepo  cvs://:pserver:anonymous@cmscvs.cern.ch:/cvs_server/repositories/CMSSW?passwd=AA_:yZZ3e
19 < %define cvstag V1_1_0_reltag
19 > %define cvstag %v
20   Source0: %{cvsrepo}&tag=-r%{cvstag}&module=SCRAM&output=/source.tar.gz
21  
22   %prep
23 + #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   %setup -n SCRAM
30   %build
31   %install
32   tar -cf - . | tar -C %i -xvvf -
33 < mkdir -p %instroot/%cmsplatf/lcg/SCRAMV1/scramdb %i/bin %i/Installation
33 >
34 > mkdir -p %i/src/main %instroot/%cmsplatf/lcg/SCRAMV1/scramdb
35   touch %instroot/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup
36  
37 < cat Installation/scram.pl.in | sed -e "s|@PERLEXE@|%perl|;s|@SCRAM_HOME@|%i|g;s|@INSTALLDIR@|%i/src|g" > %i/bin/scram
38 < 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
39 < chmod +x %i/src/main/scram.pl
69 < 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
37 > #SCRAM/INSTALL.txt recomendations
38 > sed -i -e "s|@SCRAM_LOOKUPDB_DIR@|%instroot/%cmsplatf/lcg/SCRAMV1/scramdb/|g;s|@SCRAM_VERSION@|%v|g" %i/bin/scram
39 > ln -s ../../bin/scram %i/src/main/scram.pl
40   chmod 755 %i/bin/scram
41  
73 mkdir -p %i/etc
74 echo $PERL5LIB > %i/etc/perl5lib.env
75
42   mkdir -p %{instroot}/%{cmsplatf}/etc/profile.d
43   mkdir -p %{i}/etc/profile.d
78 echo "#!/bin/sh" > %i/etc/profile.d/dependencies-setup.sh
79 echo "source $P5_TEMPLATE_TOOLKIT_ROOT/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
80 echo "source $P5_URI_ROOT/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
81 echo "source $P5_XML_PARSER_ROOT/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
82 echo "source $P5_LIBWWW_PERL_ROOT/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
83
84 echo "#!/bin/csh" > %i/etc/profile.d/dependencies-setup.csh
85 echo "source $P5_TEMPLATE_TOOLKIT_ROOT/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
86 echo "source $P5_URI_ROOT/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
87 echo "source $P5_XML_PARSER_ROOT/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
88 echo "source $P5_LIBWWW_PERL_ROOT/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
89
90 %perl -p -i -e "s|#!.*perl|#!%perl|" %{i}/doc/doxygen/DoxyFilt.pl
44  
45   %post
93 %{relocateConfig}etc/perl5lib.env
94 %{relocateConfig}Installation/SCRAM_SITE.pm
46   %{relocateConfig}bin/scram
47 < %{relocateConfig}src/main/scram.pl
48 < %{relocateConfig}etc/profile.d/dependencies-setup.sh
49 < %{relocateConfig}etc/profile.d/dependencies-setup.csh
50 < # If and only if there is no default-scramv1 set the default to be the version we package in this spec.
51 < OLD_VERSION=""
52 < if [ -f $RPM_INSTALL_PREFIX/%{cmsplatf}/etc/default-scramv1-version ]
53 < then
54 <    mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/etc
55 <    OLD_VERSION=`cat $RPM_INSTALL_PREFIX/%{cmsplatf}/etc/default-scramv1-version`
47 >
48 > mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/etc/default-scram
49 > # default version for SCRAM release series Vx_y_
50 > VERSION_STR="%v"
51 > if [ -f $RPM_INSTALL_PREFIX/%{cmsplatf}/etc/default-scram/%{SCRAM_REL_SERIES} ] ; then
52 >  VERSION_STR="$VERSION_STR `cat $RPM_INSTALL_PREFIX/%{cmsplatf}/etc/default-scram/%{SCRAM_REL_SERIES}`"
53 > fi
54 > echo $VERSION_STR | tr ' ' '\n' | sort | tail -1 > $RPM_INSTALL_PREFIX/%{cmsplatf}/etc/default-scram/%{SCRAM_REL_SERIES}
55 > # default version in common
56 > VERSION_STR="%v"
57 > if [ -f $RPM_INSTALL_PREFIX/%{cmsplatf}/etc/default-scramv1-version ] ; then
58 >  VERSION_STR="$VERSION_STR `cat $RPM_INSTALL_PREFIX/%{cmsplatf}/etc/default-scramv1-version`"
59   fi
60 < NEW_VERSION=%v
107 < (echo $OLD_VERSION;echo $NEW_VERSION) | sort | tail -1 > $RPM_INSTALL_PREFIX/%{cmsplatf}/etc/default-scramv1-version
60 > echo $VERSION_STR | tr ' ' '\n' | sort | tail -1 > $RPM_INSTALL_PREFIX/%{cmsplatf}/etc/default-scramv1-version
61  
62   mkdir -p $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb
63   touch $RPM_INSTALL_PREFIX/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup
# Line 121 | Line 74 | fi
74   %i
75   %instroot/%cmsplatf/lcg/SCRAMV1/scramdb
76   %exclude %instroot/%cmsplatf/lcg/SCRAMV1/scramdb/project.lookup
124 %exclude %i/scripts/DrDOC.sh

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines