ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/dbs-client.spec
Revision: 1.129
Committed: Fri May 21 01:22:17 2010 UTC (14 years, 11 months ago) by valya
Branch: MAIN
CVS Tags: ge20100621-bootstrap-rpm-4-8-macosx, ge20100611-apt-rpm-4-8-gcc-4-5-0, MotT0_1_0_13, MotT0_1_0_12, MotT0_1_0_11, MotT0_1_0_10, MotT0_1_0_9, MotT0_1_0_8, MotT0_1_0_6, MotT0_1_0_5, MotT0_1_0_4, MotT0_1_0_3, dg20100521-dbs, DBS_20100520_slc5_amd64_gcc434
Changes since 1.128: +1 -1 lines
Log Message:
New DBS pre-tag

File Contents

# Content
1 ### RPM cms dbs-client DBS_2_1_0_pre1
2 ## INITENV +PATH PYTHONPATH %i/lib/
3 ## INITENV +PATH PYTHONPATH %i/bin/
4 ## INITENV +PATH PYTHONPATH %{i}/lib/
5 ## INITENV +PATH PYTHONPATH %{i}/lib/DBSAPI/
6 ## INITENV SET DBS_CLIENT_CONFIG %{i}/lib/DBSAPI/dbs.config
7 ## INITENV SET DBSCMD_HOME %{i}/lib/DBSAPI
8
9 %define cvstag %{realversion}
10 %define cvsserver cvs://:pserver:anonymous@cmscvs.cern.ch:2401/cvs_server/repositories/CMSSW?passwd=AA_:yZZ3e
11 Source: %cvsserver&strategy=checkout&module=DBS/Clients/Python&nocache=true&export=DBS&tag=-r%{cvstag}&output=/dbs-client.tar.gz
12 Requires: python openssl py2-zsi py2-pyxml
13
14 %prep
15 %setup -n DBS
16 %build
17 (make DBSHOME=%_builddir/DBS/Clients/Python )
18
19 %install
20 mkdir -p %{i}/bin
21 mkdir -p %{i}/lib
22 mkdir -p %{i}/etc/profile.d
23 cp -r Clients/Python/* %{i}/lib/
24 mv %{i}/lib/bin/* %{i}/bin/
25
26 #cp -r Clients/Python/DBSAPI/dbsCommandLine.py %{i}/bin/dbs
27 #chmod a+x %{i}/bin/dbs
28
29 (echo "#!/bin/sh"; \
30 echo "source $PYTHON_ROOT/etc/profile.d/init.sh"; \
31 echo "source $OPENSSL_ROOT/etc/profile.d/init.sh"; \
32 echo "source $PY2_ZSI_ROOT/etc/profile.d/init.sh"; \
33 echo "source $PY2_PYXML_ROOT/etc/profile.d/init.sh"; \
34 ) > %{i}/etc/profile.d/dependencies-setup.sh
35
36 (echo "#!/bin/tcsh"; \
37 echo "source $PYTHON_ROOT/etc/profile.d/init.csh"; \
38 echo "source $OPENSSL_ROOT/etc/profile.d/init.csh"; \
39 echo "source $PY2_ZSI_ROOT/etc/profile.d/init.csh"; \
40 echo "source $PY2_PYXML_ROOT/etc/profile.d/init.csh"; \
41 ) > %{i}/etc/profile.d/dependencies-setup.csh
42
43 # SCRAM ToolBox toolfile
44 mkdir -p %i/etc/scram.d
45 cat << \EOF_TOOLFILE >%i/etc/scram.d/%n.xml
46 <tool name="dbs-client" version="%v">
47 <client>
48 <environment name="DBS_CLIENT_BASE" default="%i"/>
49 </client>
50 <runtime name="PATH" value="$DBS_CLIENT_BASE/bin" type="path"/>
51 <runtime name="PYTHONPATH" value="$DBS_CLIENT_BASE/lib" type="path"/>
52 <runtime name="PYTHONPATH" value="$DBS_CLIENT_BASE/lib/DBSAPI" type="path"/>
53 <runtime name="DBS_CLIENT_CONFIG" value="$DBS_CLIENT_BASE/lib/DBSAPI/dbs.config"/>
54 <runtime name="DBSCMD_HOME" value="$DBS_CLIENT_BASE/lib/DBSAPI"/>
55 </tool>
56 EOF_TOOLFILE
57
58 %post
59 %{relocateConfig}etc/profile.d/dependencies-setup.sh
60 %{relocateConfig}etc/profile.d/dependencies-setup.csh
61 %{relocateConfig}etc/scram.d/%n.xml
62
63 # hack init.csh to get around bug in current version of PKGTOOLS
64 # will have no effect with the bug fixed verion
65 perl -p -i -e 's|\. |source |' $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.csh