11 |
|
%build |
12 |
|
rm -rf %i/etc/profile.d |
13 |
|
mkdir -p %i/etc/profile.d/ |
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 $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 $PY2_FORMENCODE_ROOT/etc/profile.d/init.sh ) > %i/etc/profile.d/dependencies-setup.sh |
14 |
> |
dependenciesRoots="$PYTHON_ROOT $SQLITE_ROOT $PY2_SQLOBJECT_ROOT $PY2_PYSQLITE_ROOT $CHERRYPY_ROOT $YUI_ROOT \ |
15 |
> |
$ZLIB_ROOT $EXPAT_ROOT $OPENSSEL_ROOT $BZ2LIB_ROOT $DB4_ROOT $GDBM_ROOT $PY2_FORMENCODE_ROOT" |
16 |
> |
|
17 |
> |
touch %i/etc/profile.d/dependencies-setup.sh |
18 |
> |
touch %i/etc/profile.d/dependencies-setup.csh |
19 |
> |
|
20 |
> |
for pkg in $dependenciesRoots |
21 |
> |
do |
22 |
> |
echo $pkg |
23 |
> |
echo source $pkg/etc/profile.d/init.sh >> %i/etc/profile.d/dependencies-setup.sh |
24 |
> |
echo source $pkg/etc/profile.d/init.csh >> %i/etc/profile.d/dependencies-setup.csh |
25 |
> |
done |
26 |
> |
|
27 |
|
%install |
28 |
|
cp -r * %i/ |
29 |
|
%post |
30 |
+ |
%{relocateConfig}etc/profile.d/dependencies-setup.sh |
31 |
+ |
%{relocateConfig}etc/profile.d/dependencies-setup.csh |
32 |
|
perl -p -i -e "s!\@RPM_INSTALL_PREFIX\@!$RPM_INSTALL_PREFIX/%pkgrel!" $RPM_INSTALL_PREFIX/%pkgrel/PRODREQUEST |