1 |
lat |
1.17 |
### RPM cms overview 6.0.2
|
2 |
lat |
1.18 |
## INITENV +PATH PATH %i/xbin
|
3 |
|
|
## INITENV +PATH %{dynamic_path_var} %i/xlib
|
4 |
|
|
## INITENV +PATH PYTHONPATH %i/$PYTHON_LIB_SITE_PACKAGES
|
5 |
|
|
## INITENV +PATH PYTHONPATH %i/x$PYTHON_LIB_SITE_PACKAGES
|
6 |
lat |
1.1 |
|
7 |
lat |
1.15 |
%define svn svn://svn.cern.ch/reps/CMSDMWM/Monitoring/tags/%{realversion}
|
8 |
|
|
Source: %{svn}?scheme=svn+ssh&strategy=export&module=Monitoring&output=/src.tar.gz
|
9 |
lat |
1.18 |
Requires: cherrypy py2-cheetah yui py2-cx-oracle py2-pil py2-matplotlib py2-pycurl rotatelogs
|
10 |
lat |
1.1 |
|
11 |
|
|
%prep
|
12 |
lat |
1.15 |
# Unpack sources.
|
13 |
|
|
%setup -n Monitoring
|
14 |
|
|
|
15 |
|
|
# Build
|
16 |
lat |
1.1 |
%build
|
17 |
lat |
1.15 |
python setup.py build_system -s Overview
|
18 |
|
|
|
19 |
|
|
# Install
|
20 |
|
|
%install
|
21 |
lat |
1.18 |
mkdir -p %i/etc/profile.d %i/{x,}{bin,lib,include,data} %i/{x,}$PYTHON_LIB_SITE_PACKAGES
|
22 |
lat |
1.15 |
python setup.py install_system -s Overview --prefix=%i
|
23 |
|
|
find %i -name '*.egg-info' -exec rm {} \;
|
24 |
|
|
|
25 |
|
|
# Generate dependencies-setup.{sh,csh} so init.{sh,csh} picks full environment.
|
26 |
|
|
: > %i/etc/profile.d/dependencies-setup.sh
|
27 |
|
|
: > %i/etc/profile.d/dependencies-setup.csh
|
28 |
|
|
for tool in $(echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'); do
|
29 |
|
|
root=$(echo $tool | tr a-z- A-Z_)_ROOT; eval r=\$$root
|
30 |
|
|
if [ X"$r" != X ] && [ -r "$r/etc/profile.d/init.sh" ]; then
|
31 |
|
|
echo "test X\$$root != X || . $r/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
|
32 |
|
|
echo "test X\$$root != X || source $r/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
|
33 |
|
|
fi
|
34 |
lat |
1.1 |
done
|
35 |
lat |
1.5 |
|
36 |
lat |
1.15 |
# Generate an env.sh which sets a few things more than init.sh.
|
37 |
|
|
(echo ". %i/etc/profile.d/init.sh;"
|
38 |
lat |
1.18 |
echo "export YUI_ROOT;"
|
39 |
lat |
1.15 |
echo "export MONITOR_ROOT='%i';") > %i/etc/profile.d/env.sh
|
40 |
lat |
1.1 |
|
41 |
|
|
%post
|
42 |
lat |
1.15 |
%{relocateConfig}etc/profile.d/{env,dep*}.*sh
|