ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/SCRAM.spec
Revision: 1.11
Committed: Wed Jun 14 13:33:07 2006 UTC (18 years, 10 months ago) by eulisse
Branch: MAIN
Changes since 1.10: +4 -0 lines
Log Message:
detects wether to use make or gmake. Allows usage on macosx.

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