1 |
giffels |
1.42 |
### RPM cms dbs3 3.0.19
|
2 |
lat |
1.26 |
## INITENV +PATH PYTHONPATH %i/$PYTHON_LIB_SITE_PACKAGES
|
3 |
giffels |
1.28 |
## INITENV +PATH PYTHONPATH %i/x$PYTHON_LIB_SITE_PACKAGES
|
4 |
giffels |
1.25 |
## INITENV SET DBS3_SERVER_ROOT %i/
|
5 |
diego |
1.36 |
%define webdoc_files %{installroot}/%{pkgrel}/doc/
|
6 |
giffels |
1.42 |
%define wmcver 0.9.13
|
7 |
giffels |
1.15 |
%define cvstag %(echo %{realversion} | sed 's/[.]/_/g; s/^/DBS_/')
|
8 |
lat |
1.18 |
%define svnserver svn://svn.cern.ch/reps/CMSDMWM
|
9 |
giffels |
1.42 |
%define gitserver https://nodeload.github.com
|
10 |
|
|
Source0: %gitserver/dmwm/WMCore/tarball/%{wmcver}
|
11 |
lat |
1.18 |
Source1: %svnserver/DBS/tags/%cvstag?scheme=svn+ssh&strategy=export&module=DBS3&output=/%{n}.tar.gz
|
12 |
giffels |
1.42 |
|
13 |
lat |
1.18 |
Requires: python py2-simplejson py2-sqlalchemy py2-httplib2 cherrypy py2-cheetah yui
|
14 |
lat |
1.41 |
Requires: py2-cjson py2-mysqldb py2-cx-oracle rotatelogs
|
15 |
|
|
BuildRequires: py2-sphinx
|
16 |
diego |
1.1 |
|
17 |
|
|
%prep
|
18 |
giffels |
1.42 |
%setup -c
|
19 |
|
|
%setup -D -T -a 0
|
20 |
|
|
%setup -D -T -a 1
|
21 |
|
|
# move github directory
|
22 |
|
|
mv dmwm-WMCore* WMCore
|
23 |
diego |
1.1 |
|
24 |
|
|
%build
|
25 |
giffels |
1.42 |
cd WMCore
|
26 |
lat |
1.18 |
python setup.py build_system -s wmc-web
|
27 |
giffels |
1.25 |
cd ../DBS3
|
28 |
|
|
python setup.py build_system -s Server
|
29 |
diego |
1.1 |
|
30 |
|
|
%install
|
31 |
giffels |
1.34 |
mkdir -p %i/etc/profile.d %i/{x,}{bin,lib,data,doc} %i/{x,}$PYTHON_LIB_SITE_PACKAGES
|
32 |
giffels |
1.42 |
cd WMCore
|
33 |
lat |
1.18 |
python setup.py install_system -s wmc-web --prefix=%i
|
34 |
|
|
cd ../DBS3
|
35 |
giffels |
1.25 |
python setup.py install_system -s Server --prefix=%i
|
36 |
lat |
1.18 |
find %i -name '*.egg-info' -exec rm {} \;
|
37 |
diego |
1.1 |
|
38 |
lat |
1.18 |
# Generate dependencies-setup.{sh,csh} so init.{sh,csh} picks full environment.
|
39 |
diego |
1.1 |
mkdir -p %i/etc/profile.d
|
40 |
lat |
1.18 |
: > %i/etc/profile.d/dependencies-setup.sh
|
41 |
|
|
: > %i/etc/profile.d/dependencies-setup.csh
|
42 |
|
|
for tool in $(echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'); do
|
43 |
|
|
root=$(echo $tool | tr a-z- A-Z_)_ROOT; eval r=\$$root
|
44 |
|
|
if [ X"$r" != X ] && [ -r "$r/etc/profile.d/init.sh" ]; then
|
45 |
|
|
echo "test X\$$root != X || . $r/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
|
46 |
|
|
echo "test X\$$root != X || source $r/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
|
47 |
|
|
fi
|
48 |
diego |
1.1 |
done
|
49 |
|
|
|
50 |
|
|
%post
|
51 |
diego |
1.14 |
%{relocateConfig}etc/profile.d/dependencies-setup.*sh
|
52 |
giffels |
1.30 |
|
53 |
|
|
%files
|
54 |
diego |
1.36 |
%{installroot}/%{pkgrel}/
|
55 |
|
|
%exclude %{installroot}/%{pkgrel}/doc
|
56 |
giffels |
1.42 |
|
57 |
|
|
# Exclude Migration server from official rpms
|
58 |
|
|
%exclude %{installroot}/%{pkgrel}/lib/python2.6/site-packages/dbs/web/DBSMigrateModel.py
|
59 |
giffels |
1.30 |
## SUBPACKAGE webdoc
|