1 |
< |
### RPM cms dbs-client DBS_1_5_1 |
1 |
> |
### RPM cms dbs-client DBS_1_2_4 |
2 |
|
## INITENV +PATH PYTHONPATH %i/lib/ |
3 |
|
|
4 |
|
%define cvstag %{realversion} |
6 |
|
Source: %cvsserver&strategy=checkout&module=DBS/Clients/Python&nocache=true&export=DBS&tag=-r%{cvstag}&output=/dbs-client.tar.gz |
7 |
|
Requires: python openssl py2-zsi |
8 |
|
|
9 |
– |
|
9 |
|
%prep |
10 |
|
%setup -n DBS |
11 |
|
%build |
16 |
|
mkdir -p %{i}/lib |
17 |
|
mkdir -p %{i}/etc/profile.d |
18 |
|
cp -r Clients/Python/* %{i}/lib/ |
19 |
+ |
cp -r Clients/Python/DBSAPI/dbsCommandLine.py %{i}/bin/ |
20 |
+ |
chmod a+x %{i}/bin/dbsCommandLine.py |
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 |
+ |
echo "export PYTHONPATH=\$DBS_CLIENT_ROOT/lib:\$PYTHONPATH"; \ |
27 |
+ |
echo "export PYTHONPATH=\$DBS_CLIENT_ROOT/lib/DBSAPI:\$PYTHONPATH"; \ |
28 |
+ |
echo "alias dbs='python \$DBS_CLIENT_ROOT/bin/dbsCommandLine.py'"; \ |
29 |
+ |
echo "export DBS_CLIENT_CONFIG=\$DBS_CLIENT_ROOT/lib/DBSAPI/dbs.config"; \ |
30 |
+ |
echo "export DBSCMD_HOME=\$DBS_CLIENT_ROOT/lib/DBSAPI";\ |
31 |
|
) > %{i}/etc/profile.d/dependencies-setup.sh |
32 |
|
|
33 |
|
(echo "#!/bin/tcsh"; \ |
34 |
|
echo "source $PYTHON_ROOT/etc/profile.d/init.csh"; \ |
35 |
|
echo "source $OPENSSL_ROOT/etc/profile.d/init.csh"; \ |
36 |
|
echo "source $PY2_ZSI_ROOT/etc/profile.d/init.csh"; \ |
37 |
+ |
echo "setenv PYTHONPATH \$DBS_CLIENT_ROOT/lib:\$PYTHONPATH"; \ |
38 |
+ |
echo "setenv PYTHONPATH \$DBS_CLIENT_ROOT/lib/DBSAPI:\$PYTHONPATH"; \ |
39 |
+ |
echo "alias dbs 'python \$DBS_CLIENT_ROOT/bin/dbsCommandLine.py'"; \ |
40 |
+ |
echo "setenv DBS_CLIENT_CONFIG \$DBS_CLIENT_ROOT/lib/DBSAPI/dbs.config"; \ |
41 |
+ |
echo "setenv DBSCMD_HOME \$DBS_CLIENT_ROOT/lib/DBSAPI";\ |
42 |
|
) > %{i}/etc/profile.d/dependencies-setup.csh |
43 |
|
|
44 |
|
# SCRAM ToolBox toolfile |