1 |
< |
### RPM cms prodrequest V00-00-01 |
1 |
> |
### RPM cms prodrequest 0.8.0 |
2 |
> |
## INITENV +PATH PYTHONPATH %i |
3 |
|
%define moduleName PRODREQUEST |
4 |
|
%define exportName PRODREQUEST |
5 |
< |
%define cvstag %{v} |
5 |
> |
%define cvstag V00-08-00 |
6 |
|
%define cvsserver cvs://:pserver:anonymous@cmscvs.cern.ch:2401/cvs_server/repositories/CMSSW?passwd=AA_:yZZ3e |
7 |
|
Source: %cvsserver&strategy=checkout&module=%{moduleName}&nocache=true&export=%{exportName}&tag=-r%{cvstag}&output=/PRODREQUEST.tar.gz |
8 |
< |
Requires: python sqlobject py2-pysqlite py2-cherrypy py2-cheetah yui sqlite |
8 |
> |
Requires: python py2-pysqlite cherrypy py2-cheetah sqlite py2-formencode zlib expat openssl bz2lib db4 gdbm webtools py2-pycrypto oracle py2-cx-oracle beautifulsoup py2-sqlalchemy |
9 |
> |
|
10 |
|
|
11 |
|
%prep |
12 |
< |
%setup PRODREQUEST |
12 |
> |
%setup -n PRODREQUEST |
13 |
|
%build |
14 |
< |
( echo source $PYTHON_ROOT/etc/profile.d/init.sh ; \ |
15 |
< |
echo source $SQLITE_ROOT/etc/profile.d/init.sh ; \ |
16 |
< |
echo source $PY2_SQLOBJECT_ROOT/etc/profile.d/init.sh ; \ |
17 |
< |
echo source $PY2_PYSQLITE_ROOT/etc/profile.d/init.sh ; \ |
18 |
< |
echo source $PY2_CHERRYPY_ROOT/etc/profile.d/init.sh ; \ |
19 |
< |
echo source $PY2_CHEETAH_ROOT/etc/profile.d/init.sh ; \ |
20 |
< |
echo source $YUI_ROOT/etc/profile.d/init.sh ; \ |
21 |
< |
echo source $ZLIB_ROOT/etc/profile.d/init.sh ; \ |
22 |
< |
echo source $EXPAT_ROOT/etc/profile.d/init.sh ; \ |
23 |
< |
echo source $OPENSSL_ROOT/etc/profile.d/init.sh ; \ |
24 |
< |
echo source $BZ2LIB_ROOT/etc/profile.d/init.sh ; \ |
25 |
< |
echo source $DB4_ROOT/etc/profile.d/init.sh ; \ |
26 |
< |
echo source $GDBM_ROOT/etc/profile.d/init.sh ; \ |
27 |
< |
echo source $DB4_ROOT/etc/profile.d/init.sh ; ) > %i/etc/profile.d/dependencies-setup.sh |
14 |
> |
rm -rf %i/etc/profile.d |
15 |
> |
mkdir -p %i/etc/profile.d |
16 |
> |
echo '#!/bin/sh' > %{i}/etc/profile.d/dependencies-setup.sh |
17 |
> |
echo '#!/bin/tcsh' > %{i}/etc/profile.d/dependencies-setup.csh |
18 |
> |
echo requiredtools `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'` |
19 |
> |
for tool in `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'` |
20 |
> |
do |
21 |
> |
case X$tool in |
22 |
> |
Xdistcc|Xccache ) |
23 |
> |
;; |
24 |
> |
* ) |
25 |
> |
toolcap=`echo $tool | tr a-z- A-Z_` |
26 |
> |
eval echo ". $`echo ${toolcap}_ROOT`/etc/profile.d/init.sh" >> %{i}/etc/profile.d/dependencies-setup.sh |
27 |
> |
eval echo "source $`echo ${toolcap}_ROOT`/etc/profile.d/init.csh" >> %{i}/etc/profile.d/dependencies-setup.csh |
28 |
> |
;; |
29 |
> |
esac |
30 |
> |
done |
31 |
> |
|
32 |
> |
perl -p -i -e 's|\. /etc/profile\.d/init\.sh||' %{i}/etc/profile.d/dependencies-setup.sh |
33 |
> |
perl -p -i -e 's|source /etc/profile\.d/init\.csh||' %{i}/etc/profile.d/dependencies-setup.csh |
34 |
> |
|
35 |
|
%install |
36 |
|
cp -r * %i/ |
37 |
|
%post |
38 |
< |
perl -p -i -e "s!\@RPM_INSTALL_PREFIX\@!$RPM_INSTALL_PREFIX!" PRODREQUEST |
38 |
> |
%{relocateConfig}etc/profile.d/dependencies-setup.sh |
39 |
> |
%{relocateConfig}etc/profile.d/dependencies-setup.csh |