1 |
< |
### RPM lcg SCRAM V1_0_2 |
1 |
> |
### RPM lcg SCRAMV1 V1_0_2 |
2 |
|
## INITENV +PATH PATH %instroot/bin |
3 |
< |
|
3 |
> |
## INITENV SET SCRAM_ARCH %{cmsplatf} |
4 |
> |
Requires: perl p5-template-toolkit p5-uri p5-xml-parser p5-libwww-perl |
5 |
|
# 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 |
29 |
|
# FIXME: should we have more than one project database and link them |
30 |
|
# together into one big one? |
31 |
|
|
32 |
< |
%define cvsrepo cvs://:pserver:anonymous@cmscvs.cern.ch:2401/cvs_server/repositories/SCRAM?passwd=AA_:yZZ3e |
32 |
> |
%define cvsrepo cvs://:pserver:anonymous@cmscvs.cern.ch:2401/cvs_server/repositories/SCRAM?passwd=AA_:yZZ3e |
33 |
|
|
34 |
< |
Source0: %{cvsrepo}&tag=-r%{v}&module=%n&output=/source.tar.gz |
34 |
> |
Source0: %{cvsrepo}&tag=-r%{v}&module=SCRAM&output=/source.tar.gz |
35 |
|
|
36 |
|
%prep |
37 |
|
%setup -n SCRAM |
40 |
|
%install |
41 |
|
tar -cf - . | tar -C %i -xvvf - |
42 |
|
|
43 |
< |
mkdir -p %instroot/bin %instroot/share/scramdb |
44 |
< |
cat > %instroot/bin/scram << \EOF |
45 |
< |
#!/bin/sh |
46 |
< |
|
46 |
< |
# FIXME: Handle -re? |
47 |
< |
# FIXME: Since we can install the same package on many platforms in |
48 |
< |
# one tree, should the project lookup database be platform-specific? |
49 |
< |
|
50 |
< |
SCRAM=$0 |
51 |
< |
: ${SCRAM_HOME=%i} |
52 |
< |
: ${SCRAM_LOOKUPDB=%instroot/share/scramdb/project.lookup} |
53 |
< |
: ${SCRAMPERL="/usr/bin/env perl"} |
54 |
< |
PERL5LIB=$SCRAM_HOME/src${PERL5LIB+":$PERL5LIB"} |
55 |
< |
: ${SITENAME=CERN} |
56 |
< |
: ${SEARCHOVRD=true} |
57 |
< |
: ${LOCTOOLS=NODEFAULT} |
58 |
< |
export SCRAM SCRAM_HOME SCRAM_LOOKUPDB SCRAMPERL |
59 |
< |
export PERL5LIB SITENAME SEARCHOVRD LOCTOOLS |
60 |
< |
|
61 |
< |
exec perl "$SCRAM_HOME/src/scramcli" ${1+"$@"} |
62 |
< |
EOF |
63 |
< |
chmod 755 %instroot/bin/scram |
43 |
> |
mkdir -p %instroot/bin %instroot/share/scramdb %i/Installation |
44 |
> |
|
45 |
> |
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 |
|
|
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 |
+ |
mkdir %i/etc |
70 |
+ |
echo $PERL5LIB > %i/etc/perl5lib.env |
71 |
+ |
%post |
72 |
+ |
%{relocateConfig}Installation/SCRAM_SITE.pm |
73 |
+ |
%{relocateConfig}etc/perl5lib.env |
74 |
|
%files |
75 |
|
%i |
76 |
< |
%instroot/bin/scram |
76 |
> |
%instroot/bin/scramv1 |
77 |
|
%instroot/share/scramdb |