1 |
< |
### RPM external python 2.4.2 |
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 |
> |
|
6 |
> |
Requires: expat bz2lib db4 gdbm |
7 |
> |
|
8 |
> |
%if "%{?online_release:set}" != "set" |
9 |
> |
Requires: zlib openssl |
10 |
> |
%endif |
11 |
> |
|
12 |
|
# FIXME: readline, crypt |
13 |
|
# FIXME: gmp, panel, tk/tcl, x11 |
14 |
|
|
15 |
< |
Source0: http://www.python.org/ftp/%n/%v/Python-%v.tgz |
15 |
> |
Source0: http://www.python.org/ftp/%n/%realversion/Python-%realversion.tgz |
16 |
|
Patch0: python-Include-pyport.h |
17 |
|
Patch1: python-Lib-plat-mac-applesingle.py |
18 |
|
Patch2: python-Lib-site.py |
21 |
|
Patch5: python-configure |
22 |
|
Patch6: python-setup.py |
23 |
|
|
24 |
+ |
|
25 |
|
%prep |
26 |
< |
%setup -n Python-%v |
26 |
> |
%setup -n Python-%realversion |
27 |
|
#%patch0 |
28 |
|
#%patch1 |
29 |
|
#%patch2 |
50 |
|
# linked specifically, or could be built by ourselves, depending on |
51 |
|
# whether we like to pick up system libraries or want total control. |
52 |
|
mkdir -p %i/include %i/lib |
53 |
< |
dirs="$ZLIB_ROOT $EXPAT_ROOT $OPENSSL_ROOT $BZ2LIB_ROOT $NCURSES_ROOT $DB4_ROOT $GDBM_ROOT" |
53 |
> |
|
54 |
> |
%if "%{?online_release:set}" != "set" |
55 |
> |
%define extradirs $ZLIB_ROOT $OPENSSL_ROOT |
56 |
> |
%else |
57 |
> |
%define extradirs %{nil} |
58 |
> |
%endif |
59 |
> |
|
60 |
> |
dirs="$EXPAT_ROOT $BZ2LIB_ROOT $NCURSES_ROOT $DB4_ROOT $GDBM_ROOT %{extradirs}" |
61 |
> |
|
62 |
|
echo $dirs |
63 |
|
for d in $dirs; do |
64 |
|
for f in $d/include/*; do |
65 |
< |
[ -f $f ] || continue |
65 |
> |
[ -e $f ] || continue |
66 |
|
rm -f %i/include/$(basename $f) |
67 |
|
ln -s $f %i/include |
68 |
|
done |
69 |
|
for f in $d/lib/*; do |
70 |
< |
[ -f $f ] || continue |
70 |
> |
[ -e $f ] || continue |
71 |
|
rm -f %i/lib/$(basename $f) |
72 |
|
ln -s $f %i/lib |
73 |
|
done |
74 |
|
done |
75 |
|
|
76 |
< |
./configure --prefix=%i --enable-shared --without-tkinter --disable-tkinter --without-readline |
76 |
> |
./configure --prefix=%i --enable-shared --without-tkinter --disable-tkinter |
77 |
> |
|
78 |
> |
# Link 32-bit readline library missing in the system area on 64-bit |
79 |
> |
# machines: |
80 |
> |
|
81 |
> |
mkdir -p %{i}/lib |
82 |
> |
ln -s /usr/lib/libreadline.so.4.3 %{i}/lib/libreadline.so |
83 |
> |
|
84 |
|
make %makeprocesses |
85 |
|
|
86 |
|
%install |
87 |
|
make install |
88 |
< |
%define pythonv %(echo %v | cut -d. -f 1,2) |
88 |
> |
%define pythonv %(echo %realversion | cut -d. -f 1,2) |
89 |
|
|
90 |
|
#if [ $(uname) = Darwin ]; then |
91 |
|
# make install prefix=%i |
115 |
|
# boost.spec rfio.spec |
116 |
|
# |
117 |
|
# |
118 |
+ |
rm `find %{i}/lib -maxdepth 1 -mindepth 1 ! -name '*python*'` |
119 |
+ |
rm `find %{i}/include -maxdepth 1 -mindepth 1 ! -name '*python*'` |
120 |
+ |
|
121 |
+ |
# SCRAM ToolBox toolfile |
122 |
+ |
mkdir -p %i/etc/scram.d |
123 |
+ |
cat << \EOF_TOOLFILE >%i/etc/scram.d/%n |
124 |
+ |
<doc type=BuildSystem::ToolDoc version=1.0> |
125 |
+ |
<Tool name=%n version=%v> |
126 |
+ |
<lib name=python2.4> |
127 |
+ |
<Client> |
128 |
+ |
<Environment name=PYTHON_BASE default="%i"></Environment> |
129 |
+ |
<Environment name=LIBDIR default="$PYTHON_BASE/lib"></Environment> |
130 |
+ |
<Environment name=INCLUDE default="$PYTHON_BASE/include/python2.4"></Environment> |
131 |
+ |
<Environment name=PYTHON_COMPILE default="$PYTHON_BASE/lib/python2.4/compileall.py"></Environment> |
132 |
+ |
</Client> |
133 |
+ |
<use name=sockets> |
134 |
+ |
<Runtime name=PATH value="$PYTHON_BASE/bin" type=path> |
135 |
+ |
</Tool> |
136 |
+ |
EOF_TOOLFILE |
137 |
+ |
|
138 |
|
%post |
139 |
|
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 |
140 |
+ |
%{relocateConfig}etc/scram.d/%n |