1 |
< |
### RPM external scons 0.96.1 |
2 |
< |
Source: http://eulisse.web.cern.ch/eulisse/%n-%v.tar.gz |
1 |
> |
### RPM external scons 1.2.0 |
2 |
> |
Source: http://prdownloads.sourceforge.net/scons/scons-%realversion.tar.gz |
3 |
> |
Requires: python |
4 |
|
|
5 |
+ |
%prep |
6 |
+ |
%setup -n scons-%realversion |
7 |
|
%build |
8 |
|
%install |
9 |
< |
cp -r ./* %i |
9 |
> |
mkdir -p %i/lib/python`echo $PYTHON_VERSION | cut -f1,2 -d.`/site-packages |
10 |
> |
#python setup.py install --prefix=%i |
11 |
> |
python setup.py build |
12 |
> |
mv build/lib*/* %i/lib/python`echo $PYTHON_VERSION | cut -f1,2 -d.`/site-packages |
13 |
> |
mkdir -p %i/bin |
14 |
> |
mv build/scripts*/scons %i/bin |
15 |
> |
|
16 |
> |
mkdir -p %i/etc/profile.d/ |
17 |
> |
# This will generate the correct dependencies-setup.sh/dependencies-setup.csh |
18 |
> |
# using the information found in the Requires statements of the different |
19 |
> |
# specs and their dependencies. |
20 |
> |
echo '#!/bin/sh' > %{i}/etc/profile.d/dependencies-setup.sh |
21 |
> |
echo '#!/bin/tcsh' > %{i}/etc/profile.d/dependencies-setup.csh |
22 |
> |
echo requiredtools `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'` |
23 |
> |
for tool in `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'` |
24 |
> |
do |
25 |
> |
case X$tool in |
26 |
> |
Xdistcc|Xccache ) |
27 |
> |
;; |
28 |
> |
* ) |
29 |
> |
toolcap=`echo $tool | tr a-z- A-Z_` |
30 |
> |
eval echo ". $`echo ${toolcap}_ROOT`/etc/profile.d/init.sh" >> %{i}/etc/profile.d/dependencies-setup.sh |
31 |
> |
eval echo "source $`echo ${toolcap}_ROOT`/etc/profile.d/init.csh" >> %{i}/etc/profile.d/dependencies-setup.csh |
32 |
> |
;; |
33 |
> |
esac |
34 |
> |
done |
35 |
> |
perl -p -i -e 's|\. /etc/profile\.d/init\.sh||' %{i}/etc/profile.d/dependencies-setup.sh |
36 |
> |
perl -p -i -e 's|source /etc/profile\.d/init\.csh||' %{i}/etc/profile.d/dependencies-setup.csh |
37 |
> |
|
38 |
> |
%post |
39 |
> |
%{relocateConfig}etc/profile.d/dependencies-setup.sh |
40 |
> |
%{relocateConfig}etc/profile.d/dependencies-setup.csh |