ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/SCRAM.spec
Revision: 1.27
Committed: Tue May 1 10:57:27 2007 UTC (18 years ago) by elmer
Branch: MAIN
CVS Tags: ge20070629, pe20070628d-ports, pe20070628c-ports, pe20070628b-ports, pe20070628a-ports, pe20070627b-ports, pe20070627a-ports, pe20070626c-ports, ge20070625, pe20070626b-ports, sm20070626a-ports, pe20070626a-ports, pe20070625b-ports, pe20070625a-ports, pe20070624a-ports, ge20070622, pe20070607a-ports, pe20070522a-ports, pe20070519a-ports, pe20070512a-ports, pe20070508a-ports, pe20070507a-ports, pe20070501c-ports, pe20070501b-ports, pe20070501a-ports
Changes since 1.26: +0 -2 lines
Log Message:
Remove gcc-wrappers. scramv1-build.file still needs more work, will do in
a bit.

File Contents

# User Rev Content
1 argiro 1.3 ### RPM lcg SCRAM V0_20_0
2 argiro 1.1 ## INITENV +PATH PATH %instroot/bin
3    
4     # This package is somewhat unusual compared to other packages we
5     # build: we install the normally versioned product "SCRAM", but also
6     # create the front-end "scram" wrapper and the package database. The
7     # latter do not follow the standard versioning.
8     #
9     # The front-end script can be overwritten by any version *PROVIDED*
10     # the platform string comes first as is the default (i.e. the
11     # installation tree looks like <platf>/lcg/SCRAM/<version>/src).
12     #
13     # The database is only created, but never changeed. It is made part
14     # of this package, but none of the files in it are included, so if
15     # the package is removed, the directory will left intact. (FIXME:
16     # check this is really so -- should we use %dir, or the default is
17     # good?)
18     #
19     # The front-end wrapper and the script go at the installation root,
20     # not anywhere in the package tree. They must remain modifiable.
21     #
22     # We do the install ourselves, as "Installation/install_scram" would
23     # do, but putting the results elsewhere and using our own scram
24     # wrapper instead of using the supplied one -- mainly for easier
25     # override of SCRAM_LOOKUPDB; the wrapper is really rather simple so
26     # there is no point in trying to patch it.
27     #
28     # FIXME: should we have more than one project database and link them
29     # together into one big one?
30    
31 argiro 1.3 %define cvsrepo cvs://:pserver:anonymous@spitools.cvs.cern.ch:2401/cvs/SPITOOLS?passwd=Ah<Z
32 argiro 1.1
33     Source0: %{cvsrepo}&tag=-r%{v}&module=%n&output=/source.tar.gz
34 eulisse 1.25 Requires: p5-libwww-perl cms-env
35 eulisse 1.11 Patch: scram-detect-make
36 eulisse 1.13 Patch2: scram-no-check-env
37 eulisse 1.10 Provides: perl(ActiveDoc::UserInterface_basic)
38     Provides: perl(ActiveDoc::UserQuery)
39 eulisse 1.12 Provides: perl(ActiveDoc::GroupChecker)
40 eulisse 1.10 Provides: perl(ObjectStore)
41     Provides: perl(Utilities::AddDir)
42 eulisse 1.4 Provides: perl(Utilities::GroupChecker)
43 eulisse 1.10 Provides: perl(Utilities::SCRAMUtils)
44 argiro 1.1
45     %prep
46     %setup -n %n
47 eulisse 1.11 pwd
48     %patch -p1
49 eulisse 1.13 %patch2 -p1
50 eulisse 1.4 rm src/URL/test/test_URL_cvsfile.pm
51 argiro 1.1 %build
52     %install
53     tar -cf - . | tar -C %i -xvvf -
54    
55 eulisse 1.14 mkdir -p %instroot/bin %instroot/share/scramdbv0
56 eulisse 1.24 mkdir -p %i/bin
57 eulisse 1.14 touch %instroot/share/scramdbv0/project.lookup
58 eulisse 1.24 [ -f %i/bin/scramv0 ] && rm %i/bin/scramv0
59     cat > %i/bin/scramv0 << \EOF
60 argiro 1.1 #!/bin/sh
61    
62     # FIXME: Handle -re?
63     # FIXME: Since we can install the same package on many platforms in
64     # one tree, should the project lookup database be platform-specific?
65    
66     SCRAM=$0
67     : ${SCRAM_HOME=%i}
68 eulisse 1.14 : ${SCRAM_LOOKUPDB=%instroot/share/scramdbv0/project.lookup}
69 argiro 1.1 : ${SCRAMPERL="/usr/bin/env perl"}
70     PERL5LIB=$SCRAM_HOME/src${PERL5LIB+":$PERL5LIB"}
71     : ${SITENAME=CERN}
72     : ${SEARCHOVRD=true}
73     : ${LOCTOOLS=NODEFAULT}
74     export SCRAM SCRAM_HOME SCRAM_LOOKUPDB SCRAMPERL
75     export PERL5LIB SITENAME SEARCHOVRD LOCTOOLS
76    
77     exec perl "$SCRAM_HOME/src/scramcli" ${1+"$@"}
78     EOF
79 eulisse 1.12
80 eulisse 1.24 [ -f %instroot/bin/scramv0 ] && rm %instroot/bin/scramv0
81     cat > %instroot/bin/scramv0 << \EOF_BIN_SCRAMV0
82     #!/bin/sh
83 eulisse 1.25 source %instroot/`cmsarch`/lcg/%n/%v/etc/profile.d/init.sh
84     %instroot/`cmsarch`/lcg/%n/%v/bin/scramv0 $@
85 eulisse 1.24 EOF_BIN_SCRAMV0
86    
87 eulisse 1.16 mkdir -p %{instroot}/%{cmsplatf}/etc/profile.d
88 eulisse 1.12 mkdir -p %{i}/etc/profile.d
89     echo "#!/bin/sh" > %i/etc/profile.d/dependencies-setup.sh
90     echo "source $P5_LIBWWW_PERL_ROOT/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
91     echo "#!/bin/csh" > %i/etc/profile.d/dependencies-setup.csh
92     echo "source $P5_LIBWWW_PERL_ROOT/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
93    
94 eulisse 1.23 chmod 755 %instroot/bin/scramv0
95 eulisse 1.24 chmod 755 %i/bin/scramv0
96 eulisse 1.4 perl -p -i -e "s|#!.*perl|#!/usr/bin/env perl|" $(find %{i})
97 eulisse 1.23 ln -sf scramv0 %{instroot}/bin/scram
98 eulisse 1.16
99 argiro 1.1 %files
100     %i
101 eulisse 1.16 %{instroot}/bin/scram
102 eulisse 1.21 %{instroot}/bin/scramv0
103 eulisse 1.16 %{instroot}/share/scramdbv0
104 eulisse 1.14 %exclude %instroot/share/scramdbv0/project.lookup
105 eulisse 1.20 %exclude %i/scripts/DrDOC.sh
106 eulisse 1.5 %post
107 eulisse 1.12 %{relocateConfig}etc/profile.d/dependencies-setup.sh
108     %{relocateConfig}etc/profile.d/dependencies-setup.csh
109 eulisse 1.24 %{relocateConfig}bin/scramv0
110 eulisse 1.23 perl -p -i -e "s|%instroot|$RPM_INSTALL_PREFIX|g" $RPM_INSTALL_PREFIX/bin/scramv0