1 |
giffels |
1.22 |
### RPM cms dbs3 3.0.8
|
2 |
diego |
1.1 |
## INITENV +PATH PYTHONPATH %i/Server/Python/src
|
3 |
giffels |
1.20 |
## INITENV +PATH PYTHONPATH %i/lib/python`echo $PYTHON_VERSION | cut -d. -f 1,2`/site-packages
|
4 |
diego |
1.1 |
## INITENV SET DBS3_SERVER_ROOT %i/Server/Python
|
5 |
giffels |
1.22 |
%define wmcver WMCORE_0_7_2
|
6 |
giffels |
1.15 |
%define cvstag %(echo %{realversion} | sed 's/[.]/_/g; s/^/DBS_/')
|
7 |
lat |
1.18 |
%define svnserver svn://svn.cern.ch/reps/CMSDMWM
|
8 |
|
|
Source0: %svnserver/WMCore/tags/%{wmcver}?scheme=svn+ssh&strategy=export&module=WMCore&output=/wmcore_dbs.tar.gz
|
9 |
|
|
Source1: %svnserver/DBS/tags/%cvstag?scheme=svn+ssh&strategy=export&module=DBS3&output=/%{n}.tar.gz
|
10 |
|
|
Requires: python py2-simplejson py2-sqlalchemy py2-httplib2 cherrypy py2-cheetah yui
|
11 |
giffels |
1.21 |
Requires: py2-cjson py2-mysqldb py2-cx-oracle rotatelogs
|
12 |
diego |
1.1 |
|
13 |
|
|
%prep
|
14 |
lat |
1.18 |
%setup -T -b 0 -n WMCore
|
15 |
|
|
%setup -D -T -b 1 -n DBS3
|
16 |
diego |
1.1 |
|
17 |
|
|
%build
|
18 |
lat |
1.18 |
cd ../WMCore
|
19 |
|
|
python setup.py build_system -s wmc-web
|
20 |
diego |
1.1 |
|
21 |
|
|
%install
|
22 |
lat |
1.18 |
cd ../WMCore
|
23 |
|
|
python setup.py install_system -s wmc-web --prefix=%i
|
24 |
|
|
cd ../DBS3
|
25 |
giffels |
1.15 |
cp -rp %_builddir/DBS3/* %i/
|
26 |
lat |
1.18 |
find %i -name '*.egg-info' -exec rm {} \;
|
27 |
diego |
1.1 |
|
28 |
lat |
1.18 |
# Generate dependencies-setup.{sh,csh} so init.{sh,csh} picks full environment.
|
29 |
diego |
1.1 |
mkdir -p %i/etc/profile.d
|
30 |
lat |
1.18 |
: > %i/etc/profile.d/dependencies-setup.sh
|
31 |
|
|
: > %i/etc/profile.d/dependencies-setup.csh
|
32 |
|
|
for tool in $(echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'); do
|
33 |
|
|
root=$(echo $tool | tr a-z- A-Z_)_ROOT; eval r=\$$root
|
34 |
|
|
if [ X"$r" != X ] && [ -r "$r/etc/profile.d/init.sh" ]; then
|
35 |
|
|
echo "test X\$$root != X || . $r/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
|
36 |
|
|
echo "test X\$$root != X || source $r/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
|
37 |
|
|
fi
|
38 |
diego |
1.1 |
done
|
39 |
|
|
|
40 |
|
|
%post
|
41 |
diego |
1.14 |
%{relocateConfig}etc/profile.d/dependencies-setup.*sh
|
42 |
giffels |
1.15 |
|
43 |
|
|
%files
|
44 |
|
|
%i/
|
45 |
|
|
%exclude %i/src
|
46 |
|
|
%exclude %i/Server/JAVA
|
47 |
|
|
%exclude %i/Server/Http
|