ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/SCRAMV1.spec
Revision: 1.3
Committed: Mon Feb 27 14:11:53 2006 UTC (19 years, 2 months ago) by eulisse
Branch: MAIN
Changes since 1.2: +9 -5 lines
Log Message:
misc fixes

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