1 |
< |
### RPM cms prodrequest 0.4.0 |
1 |
> |
### RPM cms prodrequest 0.7.0 |
2 |
> |
## INITENV +PATH PYTHONPATH %i |
3 |
|
%define moduleName PRODREQUEST |
4 |
|
%define exportName PRODREQUEST |
5 |
< |
%define cvstag V00-04-18 |
5 |
> |
%define cvstag V00-07-07 |
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 py2-sqlobject py2-pysqlite cherrypy py2-cheetah yui sqlite py2-formencode zlib expat openssl bz2lib db4 gdbm prodcommon webtools dbs dls boss mysql py2-mysqldb py2-pycrypto |
9 |
< |
#Requires: prodagent |
8 |
> |
Requires: python py2-sqlobject py2-pysqlite cherrypy py2-cheetah yui sqlite py2-formencode zlib expat openssl bz2lib db4 gdbm webtools dbs-client py2-pycrypto oracle py2-cx-oracle beautifulsoup py2-sqlalchemy |
9 |
> |
|
10 |
|
|
11 |
|
%prep |
12 |
|
%setup -n PRODREQUEST |
13 |
|
%build |
14 |
|
rm -rf %i/etc/profile.d |
15 |
< |
mkdir -p %i/etc/profile.d/ |
16 |
< |
dependenciesRoots="$PYTHON_ROOT $SQLITE_ROOT $PY2_SQLOBJECT_ROOT $PY2_PYSQLITE_ROOT $CHERRYPY_ROOT $YUI_ROOT \ |
17 |
< |
$ZLIB_ROOT $EXPAT_ROOT $OPENSSEL_ROOT $BZ2LIB_ROOT $DB4_ROOT $GDBM_ROOT $PY2_FORMENCODE_ROOT \ |
18 |
< |
$PY2_CHEETAH_ROOT $PRODCOMMON_ROOT $WEBTOOLS_ROOT $DBS_ROOT $DLS_ROOT $BOSS_ROOT \ |
19 |
< |
$PY2_MYSQLDB_ROOT $MYSQL_ROOT $PY2_PYCRYPTO_ROOT" |
19 |
< |
|
20 |
< |
touch %i/etc/profile.d/dependencies-setup.sh |
21 |
< |
touch %i/etc/profile.d/dependencies-setup.csh |
22 |
< |
|
23 |
< |
for pkg in $dependenciesRoots |
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 |
< |
echo $pkg |
22 |
< |
echo source $pkg/etc/profile.d/init.sh >> %i/etc/profile.d/dependencies-setup.sh |
23 |
< |
echo source $pkg/etc/profile.d/init.csh >> %i/etc/profile.d/dependencies-setup.csh |
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 |
|
%{relocateConfig}etc/profile.d/dependencies-setup.sh |
39 |
|
%{relocateConfig}etc/profile.d/dependencies-setup.csh |
35 |
– |
perl -p -i -e "s!\@RPM_INSTALL_PREFIX\@!$RPM_INSTALL_PREFIX/%pkgrel!" $RPM_INSTALL_PREFIX/%pkgrel/PRODREQUEST |
36 |
– |
# |