ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/SCRAM.spec
Revision: 1.10
Committed: Wed May 17 14:45:18 2006 UTC (18 years, 11 months ago) by eulisse
Branch: MAIN
CVS Tags: CRABSERVER_TEST_BUILD_V4, CRABSERVER_TEST_BUILD_V3, CRABSERVER_TEST_BUILD_V2, CRABSERVER_TEST_BUILD_V1, forCRABSERVER104test, forCRABSERVER103, PRODAGENT_0_10_12_V10, PRODAGENT_0_10_12_V9, PRODAGENT_0_10_12_V8, PRODAGENT_0_10_12_V7, PRODAGENT_0_10_12_V6, PRODAGENT_0_10_12_V5, PRODAGENT_0_10_12_V4, forCS102pre4, PRODAGENT_0_10_12_V3, PRODAGENT_0_10_12_V2, PRODAGENT_0_10_12, PRODAGENT_0_10_3, PRODAGENT_0_10_3_20080521, PRODAGENT_0_8_3_SL4, forPA070pre3-slc3, forPA070pre3-slc4, forPA070pre3-slc, forPA061, forPA060pre7-slc4, forPA060pre3, forDBS106, forPA050pre3, WEBTOOLS_CONFIG_1_pre2, WEBTOOLS_CONFIG_1_pre1, forPA030, forPA020, PR_0_5_4, PR_0_5_0, PR_0_4_21, PRODREQUEST_0_4_0, PR0_3_13, PR0_3_12, PR0-3-11, forPR034, forPR033, forPIL116, forPR032, forPR030, forPR020, forPA011, forPR010, forPA010, af20060928, ProdAgent_pa17, phedex_2_3_series, V00-00-10, V00-00-09, V00-00-08, V00-00-07, V00-00-06, V00-00-05
Changes since 1.9: +5 -0 lines
Log Message:
Fixes after Lassi removed all the fake provides from apt.conf.

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.10 Provides: perl(ActiveDoc::UserInterface_basic)
35     Provides: perl(ActiveDoc::UserQuery)
36     Provides: perl(ObjectStore)
37     Provides: perl(Utilities::AddDir)
38 eulisse 1.4 Provides: perl(Utilities::GroupChecker)
39 eulisse 1.10 Provides: perl(Utilities::SCRAMUtils)
40 argiro 1.1
41     %prep
42     %setup -n %n
43 eulisse 1.4 rm src/URL/test/test_URL_cvsfile.pm
44 argiro 1.1 %build
45     %install
46     tar -cf - . | tar -C %i -xvvf -
47    
48     mkdir -p %instroot/bin %instroot/share/scramdb
49     cat > %instroot/bin/scram << \EOF
50     #!/bin/sh
51    
52     # FIXME: Handle -re?
53     # FIXME: Since we can install the same package on many platforms in
54     # one tree, should the project lookup database be platform-specific?
55    
56     SCRAM=$0
57     : ${SCRAM_HOME=%i}
58     : ${SCRAM_LOOKUPDB=%instroot/share/scramdb/project.lookup}
59     : ${SCRAMPERL="/usr/bin/env perl"}
60     PERL5LIB=$SCRAM_HOME/src${PERL5LIB+":$PERL5LIB"}
61     : ${SITENAME=CERN}
62     : ${SEARCHOVRD=true}
63     : ${LOCTOOLS=NODEFAULT}
64     export SCRAM SCRAM_HOME SCRAM_LOOKUPDB SCRAMPERL
65     export PERL5LIB SITENAME SEARCHOVRD LOCTOOLS
66    
67     exec perl "$SCRAM_HOME/src/scramcli" ${1+"$@"}
68     EOF
69     chmod 755 %instroot/bin/scram
70 eulisse 1.4 perl -p -i -e "s|#!.*perl|#!/usr/bin/env perl|" $(find %{i})
71 argiro 1.1 %files
72     %i
73     %instroot/bin/scram
74     %instroot/share/scramdb
75 eulisse 1.5 %post
76 eulisse 1.8 perl -p -i -e "s|%instroot|$RPM_INSTALL_PREFIX|g" $RPM_INSTALL_PREFIX/bin/scram