forked from cms-sw/cmsdist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcmsweb-analytics.spec
30 lines (25 loc) · 1.16 KB
/
cmsweb-analytics.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
### RPM cms cmsweb-analytics 2.3
## INITENV +PATH PYTHONPATH %i/${PYTHON_LIB_SITE_PACKAGES}
Source: git://github.com/dmwm/analytics?obj=master/%{realversion}&export=analytics&output=/analytics.tar.gz
#Source: git:/build/lat/comp/analytics?obj=master/%{realversion}&export=analytics&output=/analytics.tar.gz
Requires: python py2-adns py2-geoip py2-netaddr py2-yaml py2-cjson
%prep
%setup -n analytics
%build
python setup.py build
%install
python setup.py install --prefix=%i
find %i -name '*.egg-info' -exec rm {} \;
# Generate dependencies-setup.{sh,csh} so init.{sh,csh} picks full environment.
mkdir -p %i/etc/profile.d
: > %i/etc/profile.d/dependencies-setup.sh
: > %i/etc/profile.d/dependencies-setup.csh
for tool in $(echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'); do
root=$(echo $tool | tr a-z- A-Z_)_ROOT; eval r=\$$root
if [ X"$r" != X ] && [ -r "$r/etc/profile.d/init.sh" ]; then
echo "test X\$$root != X || . $r/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
echo "test X\$?$root = X1 || source $r/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
fi
done
%post
%{relocateConfig}etc/profile.d/dependencies-setup.*sh