1 |
|
### RPM lcg SCRAM V0_20_0 |
2 |
+ |
Requires: gcc-wrapper |
3 |
|
## INITENV +PATH PATH %instroot/bin |
4 |
|
|
5 |
|
# This package is somewhat unusual compared to other packages we |
32 |
|
%define cvsrepo cvs://:pserver:anonymous@spitools.cvs.cern.ch:2401/cvs/SPITOOLS?passwd=Ah<Z |
33 |
|
|
34 |
|
Source0: %{cvsrepo}&tag=-r%{v}&module=%n&output=/source.tar.gz |
35 |
+ |
Requires: p5-libwww-perl cms-env |
36 |
+ |
Patch: scram-detect-make |
37 |
+ |
Patch2: scram-no-check-env |
38 |
+ |
Provides: perl(ActiveDoc::UserInterface_basic) |
39 |
+ |
Provides: perl(ActiveDoc::UserQuery) |
40 |
+ |
Provides: perl(ActiveDoc::GroupChecker) |
41 |
+ |
Provides: perl(ObjectStore) |
42 |
+ |
Provides: perl(Utilities::AddDir) |
43 |
+ |
Provides: perl(Utilities::GroupChecker) |
44 |
+ |
Provides: perl(Utilities::SCRAMUtils) |
45 |
|
|
46 |
|
%prep |
47 |
|
%setup -n %n |
48 |
< |
|
48 |
> |
pwd |
49 |
> |
%patch -p1 |
50 |
> |
%patch2 -p1 |
51 |
> |
rm src/URL/test/test_URL_cvsfile.pm |
52 |
|
%build |
53 |
+ |
## IMPORT gcc-wrapper |
54 |
|
%install |
55 |
|
tar -cf - . | tar -C %i -xvvf - |
56 |
|
|
57 |
< |
mkdir -p %instroot/bin %instroot/share/scramdb |
58 |
< |
cat > %instroot/bin/scram << \EOF |
57 |
> |
mkdir -p %instroot/bin %instroot/share/scramdbv0 |
58 |
> |
mkdir -p %i/bin |
59 |
> |
touch %instroot/share/scramdbv0/project.lookup |
60 |
> |
[ -f %i/bin/scramv0 ] && rm %i/bin/scramv0 |
61 |
> |
cat > %i/bin/scramv0 << \EOF |
62 |
|
#!/bin/sh |
63 |
|
|
64 |
|
# FIXME: Handle -re? |
67 |
|
|
68 |
|
SCRAM=$0 |
69 |
|
: ${SCRAM_HOME=%i} |
70 |
< |
: ${SCRAM_LOOKUPDB=%instroot/share/scramdb/project.lookup} |
70 |
> |
: ${SCRAM_LOOKUPDB=%instroot/share/scramdbv0/project.lookup} |
71 |
|
: ${SCRAMPERL="/usr/bin/env perl"} |
72 |
|
PERL5LIB=$SCRAM_HOME/src${PERL5LIB+":$PERL5LIB"} |
73 |
|
: ${SITENAME=CERN} |
78 |
|
|
79 |
|
exec perl "$SCRAM_HOME/src/scramcli" ${1+"$@"} |
80 |
|
EOF |
81 |
< |
chmod 755 %instroot/bin/scram |
81 |
> |
|
82 |
> |
[ -f %instroot/bin/scramv0 ] && rm %instroot/bin/scramv0 |
83 |
> |
cat > %instroot/bin/scramv0 << \EOF_BIN_SCRAMV0 |
84 |
> |
#!/bin/sh |
85 |
> |
source %instroot/`cmsarch`/lcg/%n/%v/etc/profile.d/init.sh |
86 |
> |
%instroot/`cmsarch`/lcg/%n/%v/bin/scramv0 $@ |
87 |
> |
EOF_BIN_SCRAMV0 |
88 |
> |
|
89 |
> |
mkdir -p %{instroot}/%{cmsplatf}/etc/profile.d |
90 |
> |
mkdir -p %{i}/etc/profile.d |
91 |
> |
echo "#!/bin/sh" > %i/etc/profile.d/dependencies-setup.sh |
92 |
> |
echo "source $P5_LIBWWW_PERL_ROOT/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh |
93 |
> |
echo "#!/bin/csh" > %i/etc/profile.d/dependencies-setup.csh |
94 |
> |
echo "source $P5_LIBWWW_PERL_ROOT/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh |
95 |
> |
|
96 |
> |
chmod 755 %instroot/bin/scramv0 |
97 |
> |
chmod 755 %i/bin/scramv0 |
98 |
> |
perl -p -i -e "s|#!.*perl|#!/usr/bin/env perl|" $(find %{i}) |
99 |
> |
ln -sf scramv0 %{instroot}/bin/scram |
100 |
|
|
101 |
|
%files |
102 |
|
%i |
103 |
< |
%instroot/bin/scram |
104 |
< |
%instroot/share/scramdb |
103 |
> |
%{instroot}/bin/scram |
104 |
> |
%{instroot}/bin/scramv0 |
105 |
> |
%{instroot}/share/scramdbv0 |
106 |
> |
%exclude %instroot/share/scramdbv0/project.lookup |
107 |
> |
%exclude %i/scripts/DrDOC.sh |
108 |
> |
%post |
109 |
> |
%{relocateConfig}etc/profile.d/dependencies-setup.sh |
110 |
> |
%{relocateConfig}etc/profile.d/dependencies-setup.csh |
111 |
> |
%{relocateConfig}bin/scramv0 |
112 |
> |
perl -p -i -e "s|%instroot|$RPM_INSTALL_PREFIX|g" $RPM_INSTALL_PREFIX/bin/scramv0 |