ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/SCRAMV1.spec
Revision: 1.4
Committed: Mon Mar 13 11:06:50 2006 UTC (19 years, 1 month ago) by eulisse
Branch: MAIN
CVS Tags: test2, test1, NataliaStart
Changes since 1.3: +1 -3 lines
Log Message:
template-toolkit renamed p5-template-toolkit

File Contents

# User Rev Content
1 eulisse 1.3 ### RPM lcg SCRAMV1 V1_0_2
2 argiro 1.1 ## INITENV +PATH PATH %instroot/bin
3 eulisse 1.3 ## INITENV SET SCRAM_ARCH %{cmsplatf}
4 eulisse 1.4 Requires: perl p5-template-toolkit p5-uri p5-xml-parser p5-libwww-perl
5 argiro 1.1 # This package is somewhat unusual compared to other packages we
6     # build: we install the normally versioned product "SCRAM", but also
7     # create the front-end "scram" wrapper and the package database. The
8     # latter do not follow the standard versioning.
9     #
10     # The front-end script can be overwritten by any version *PROVIDED*
11     # the platform string comes first as is the default (i.e. the
12     # installation tree looks like <platf>/lcg/SCRAM/<version>/src).
13     #
14     # The database is only created, but never changeed. It is made part
15     # of this package, but none of the files in it are included, so if
16     # the package is removed, the directory will left intact. (FIXME:
17     # check this is really so -- should we use %dir, or the default is
18     # good?)
19     #
20     # The front-end wrapper and the script go at the installation root,
21     # not anywhere in the package tree. They must remain modifiable.
22     #
23     # We do the install ourselves, as "Installation/install_scram" would
24     # do, but putting the results elsewhere and using our own scram
25     # wrapper instead of using the supplied one -- mainly for easier
26     # override of SCRAM_LOOKUPDB; the wrapper is really rather simple so
27     # there is no point in trying to patch it.
28     #
29     # FIXME: should we have more than one project database and link them
30     # together into one big one?
31    
32 eulisse 1.2 %define cvsrepo cvs://:pserver:anonymous@cmscvs.cern.ch:2401/cvs_server/repositories/SCRAM?passwd=AA_:yZZ3e
33 argiro 1.1
34 eulisse 1.2 Source0: %{cvsrepo}&tag=-r%{v}&module=SCRAM&output=/source.tar.gz
35 argiro 1.1
36     %prep
37     %setup -n SCRAM
38    
39     %build
40     %install
41     tar -cf - . | tar -C %i -xvvf -
42    
43 eulisse 1.2 mkdir -p %instroot/bin %instroot/share/scramdb %i/Installation
44    
45 eulisse 1.3 cat Installation/scram.pl.in | sed -e "s|@PERLEXE@|$PERL_ROOT/bin/perl|;s|@SCRAM_HOME@|%i|;s|@INSTALLDIR@|%i/src|" > %instroot/bin/scramv1
46     cat Installation/SCRAM_SITE.pm.in | sed -e "s|@SCRAM_HOME@|%i|;s|@SCRAM_LOOKUPDB_DIR@|%instroot/share/scramdb/|;s|@PERLEXE@|$PERL_ROOT/bin/perl|;s|@TT2INSTALLDIR@|$TEMPLATE_TOOLKIT_ROOT/lib|;s|@SITETEMPLATEDIR@|%i/Templates|;s|@SCRAM_SITENAME@|STANDALONE|" > %i/Installation/SCRAM_SITE.pm
47 eulisse 1.2
48     # cat > %instroot/bin/scramv1 << \EOF
49     # #!/bin/sh
50     #
51     # # FIXME: Handle -re?
52     # # FIXME: Since we can install the same package on many platforms in
53     # # one tree, should the project lookup database be platform-specific?
54     #
55     # SCRAM=$0
56     # : ${SCRAM_HOME=%i}
57     # : ${SCRAM_LOOKUPDB=%instroot/share/scramdb/project.lookup}
58     # : ${SCRAMPERL="/usr/bin/env perl"}
59     # PERL5LIB=$SCRAM_HOME/src${PERL5LIB+":$PERL5LIB"}
60     # : ${SITENAME=CERN}
61     # : ${SEARCHOVRD=true}
62     # : ${LOCTOOLS=NODEFAULT}
63     # export SCRAM SCRAM_HOME SCRAM_LOOKUPDB SCRAMPERL
64     # export PERL5LIB SITENAME SEARCHOVRD LOCTOOLS
65     #
66     # exec perl "$SCRAM_HOME/src/scramcli" ${1+"$@"}
67     # EOF
68     chmod 755 %instroot/bin/scramv1
69 eulisse 1.3 mkdir %i/etc
70     echo $PERL5LIB > %i/etc/perl5lib.env
71 argiro 1.1 %files
72     %i
73 eulisse 1.2 %instroot/bin/scramv1
74 argiro 1.1 %instroot/share/scramdb