ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/dbs-client.spec
Revision: 1.63
Committed: Mon Aug 18 13:44:52 2008 UTC (16 years, 8 months ago) by valya
Branch: MAIN
CVS Tags: T0Mon_080905_1, T0Mon_080905_01, WEBTOOLS-APPS_20080903, T0Mon_080902_2, T0Mon_080902_1, WEBTOOLS-APPS_20080826, T0Mon_080824_1, T0Mon_080823_1, WEBTOOLS-APPS_20080822, WEBTOOLS-APPS_20080821, WEBTOOLS-APPS_20080818_1, WEBTOOLS-APPS_20080818
Changes since 1.62: +1 -1 lines
Log Message:
Added py2-pyxml deps

File Contents

# Content
1 ### RPM cms dbs-client DBS_1_2_4
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 cp -r Clients/Python/DBSAPI/dbsCommandLine.py %{i}/bin/dbs
25 chmod a+x %{i}/bin/dbs
26
27 (echo "#!/bin/sh"; \
28 echo "source $PYTHON_ROOT/etc/profile.d/init.sh"; \
29 echo "source $OPENSSL_ROOT/etc/profile.d/init.sh"; \
30 echo "source $PY2_ZSI_ROOT/etc/profile.d/init.sh"; \
31 echo "source $PY2_PYXML_ROOT/etc/profile.d/init.sh"; \
32 ) > %{i}/etc/profile.d/dependencies-setup.sh
33
34 (echo "#!/bin/tcsh"; \
35 echo "source $PYTHON_ROOT/etc/profile.d/init.csh"; \
36 echo "source $OPENSSL_ROOT/etc/profile.d/init.csh"; \
37 echo "source $PY2_ZSI_ROOT/etc/profile.d/init.csh"; \
38 echo "source $PY2_PYXML_ROOT/etc/profile.d/init.csh"; \
39 ) > %{i}/etc/profile.d/dependencies-setup.csh
40
41 # SCRAM ToolBox toolfile
42 mkdir -p %i/etc/scram.d
43 cat << \EOF_TOOLFILE >%i/etc/scram.d/%n
44 <doc type=BuildSystem::ToolDoc version=1.0>
45 <Tool name=dbs-client version=%v>
46 <client>
47 <Environment name=DBS_CLIENT_BASE default="%i"></Environment>
48 </client>
49 <Runtime name=PATH value="$DBS_CLIENT_BASE/bin" type=path>
50 <Runtime name=PYTHONPATH value="$DBS_CLIENT_BASE/lib" type=path>
51 <Runtime name=PYTHONPATH value="$DBS_CLIENT_BASE/lib/DBSAPI" type=path>
52 <Runtime name=DBS_CLIENT_CONFIG value="$DBS_CLIENT_BASE/lib/DBSAPI/dbs.config">
53 <Runtime name=DBSCMD_HOME value="$DBS_CLIENT_BASE/lib/DBSAPI">
54 </Tool>
55 EOF_TOOLFILE
56
57
58
59 %post
60 %{relocateConfig}etc/profile.d/dependencies-setup.sh
61 %{relocateConfig}etc/profile.d/dependencies-setup.csh
62 %{relocateConfig}etc/scram.d/%n
63
64 # hack init.csh to get around bug in current version of PKGTOOLS
65 # will have no effect with the bug fixed verion
66 perl -p -i -e 's|\. |source |' $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.csh