1 |
< |
### RPM external python 2.4.2-XXXX |
1 |
> |
### RPM external python 2.4.2-CMS10 |
2 |
|
## INITENV +PATH PATH %i/bin |
3 |
|
## INITENV +PATH LD_LIBRARY_PATH %i/lib |
4 |
|
# OS X patches and build fudging stolen from fink |
5 |
< |
Requires: zlib expat openssl bz2lib db4 gdbm openssl |
5 |
> |
Requires: zlib expat openssl bz2lib db4 gdbm |
6 |
|
# FIXME: readline, crypt |
7 |
|
# FIXME: gmp, panel, tk/tcl, x11 |
8 |
|
|
48 |
|
echo $dirs |
49 |
|
for d in $dirs; do |
50 |
|
for f in $d/include/*; do |
51 |
< |
[ -f $f ] || continue |
51 |
> |
[ -e $f ] || continue |
52 |
|
rm -f %i/include/$(basename $f) |
53 |
|
ln -s $f %i/include |
54 |
|
done |
55 |
|
for f in $d/lib/*; do |
56 |
< |
[ -f $f ] || continue |
56 |
> |
[ -e $f ] || continue |
57 |
|
rm -f %i/lib/$(basename $f) |
58 |
|
ln -s $f %i/lib |
59 |
|
done |
60 |
|
done |
61 |
|
|
62 |
< |
./configure --prefix=%i --enable-shared --without-tkinter --disable-tkinter --without-readline |
62 |
> |
./configure --prefix=%i --enable-shared --without-tkinter --disable-tkinter |
63 |
> |
|
64 |
> |
# Link 32-bit readline library missing in the system area on 64-bit |
65 |
> |
# machines: |
66 |
> |
|
67 |
> |
mkdir -p %{i}/lib |
68 |
> |
ln -s /usr/lib/libreadline.so.4.3 %{i}/lib/libreadline.so |
69 |
> |
|
70 |
|
make %makeprocesses |
71 |
|
|
72 |
|
%install |
103 |
|
# |
104 |
|
rm `find %{i}/lib -maxdepth 1 -mindepth 1 ! -name '*python*'` |
105 |
|
rm `find %{i}/include -maxdepth 1 -mindepth 1 ! -name '*python*'` |
106 |
+ |
|
107 |
+ |
# SCRAM ToolBox toolfile |
108 |
+ |
mkdir -p %i/etc/scram.d |
109 |
+ |
cat << \EOF_TOOLFILE >%i/etc/scram.d/%n |
110 |
+ |
<doc type=BuildSystem::ToolDoc version=1.0> |
111 |
+ |
<Tool name=%n version=%v> |
112 |
+ |
<lib name=python2.4> |
113 |
+ |
<Client> |
114 |
+ |
<Environment name=PYTHON_BASE default="%i"></Environment> |
115 |
+ |
<Environment name=LIBDIR default="$PYTHON_BASE/lib"></Environment> |
116 |
+ |
<Environment name=INCLUDE default="$PYTHON_BASE/include/python2.4"></Environment> |
117 |
+ |
<Environment name=PYTHON_COMPILE default="$PYTHON_BASE/lib/python2.4/compileall.py"></Environment> |
118 |
+ |
</Client> |
119 |
+ |
<use name=sockets> |
120 |
+ |
<Runtime name=PATH value="$PYTHON_BASE/bin" type=path> |
121 |
+ |
</Tool> |
122 |
+ |
EOF_TOOLFILE |
123 |
+ |
|
124 |
|
%post |
125 |
|
find $RPM_INSTALL_PREFIX/%pkgrel/lib -type l | xargs ls -la | sed -e "s|.*[ ]\(/.*\) -> \(.*\)| \2 \1|;s|[ ]/[^ ]*/external| $RPM_INSTALL_PREFIX/%cmsplatf/external|g" | xargs -n2 ln -sf |
126 |
+ |
%{relocateConfig}etc/scram.d/%n |