1 |
### RPM cms dbs-client DBS_1_0_8
|
2 |
## INITENV +PATH PYTHONPATH %i/lib/
|
3 |
#
|
4 |
#
|
5 |
%define cvstag %{realversion}
|
6 |
%define cvsserver cvs://:pserver:anonymous@cmscvs.cern.ch:2401/cvs_server/repositories/CMSSW?passwd=AA_:yZZ3e
|
7 |
Source: %cvsserver&strategy=checkout&module=DBS/Clients/Python&nocache=true&export=DBS&tag=-r%{cvstag}&output=/dbs-client.tar.gz
|
8 |
Requires: python openssl py2-zsi
|
9 |
|
10 |
|
11 |
%prep
|
12 |
%setup -n DBS
|
13 |
%build
|
14 |
(make DBSHOME=%_builddir/DBS/Clients/Python )
|
15 |
|
16 |
%install
|
17 |
mkdir -p %{i}/bin
|
18 |
mkdir -p %{i}/lib
|
19 |
mkdir -p %{i}/etc/profile.d
|
20 |
cp -r Clients/Python/* %{i}/lib/
|
21 |
|
22 |
(echo "#!/bin/sh"; \
|
23 |
echo "source $PYTHON_ROOT/etc/profile.d/init.sh"; \
|
24 |
echo "source $OPENSSL_ROOT/etc/profile.d/init.sh"; \
|
25 |
echo "source $PY2_ZSI_ROOT/etc/profile.d/init.sh"; \
|
26 |
) > %{i}/etc/profile.d/dependencies-setup.sh
|
27 |
|
28 |
(echo "#!/bin/tcsh"; \
|
29 |
echo "source $PYTHON_ROOT/etc/profile.d/init.csh"; \
|
30 |
echo "source $OPENSSL_ROOT/etc/profile.d/init.csh"; \
|
31 |
echo "source $PY2_ZSI_ROOT/etc/profile.d/init.csh"; \
|
32 |
) > %{i}/etc/profile.d/dependencies-setup.csh
|
33 |
|
34 |
# SCRAM ToolBox toolfile
|
35 |
mkdir -p %i/etc/scram.d
|
36 |
cat << \EOF_TOOLFILE >%i/etc/scram.d/%n
|
37 |
<doc type=BuildSystem::ToolDoc version=1.0>
|
38 |
<Tool name=dbs-client version=%v>
|
39 |
<client>
|
40 |
<Environment name=DBS_CLIENT_BASE default="%i"></Environment>
|
41 |
</client>
|
42 |
<Runtime name=PATH value="$DBS_CLIENT_BASE/bin" type=path>
|
43 |
</Tool>
|
44 |
EOF_TOOLFILE
|
45 |
|
46 |
%post
|
47 |
%{relocateConfig}etc/profile.d/dependencies-setup.sh
|
48 |
%{relocateConfig}etc/profile.d/dependencies-setup.csh
|
49 |
%{relocateConfig}etc/scram.d/%n
|