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 |
+ |
%define closingbrace ) |
6 |
+ |
%define online %(case %cmsplatf in *onl_*_*%closingbrace echo true;; *%closingbrace echo flase;; esac) |
7 |
|
|
8 |
|
Requires: expat bz2lib db4 gdbm |
9 |
|
|
10 |
< |
%if "%cmsplatf" != "slc4onl_ia32_gcc346" |
10 |
> |
%if "%online" != "true" |
11 |
|
Requires: zlib openssl |
12 |
|
%endif |
13 |
|
|
53 |
|
# whether we like to pick up system libraries or want total control. |
54 |
|
mkdir -p %i/include %i/lib |
55 |
|
|
56 |
< |
%if "%cmsplatf" != "slc4onl_ia32_gcc346" |
56 |
> |
%if "%online" != "true" |
57 |
|
%define extradirs $ZLIB_ROOT $OPENSSL_ROOT |
58 |
|
%else |
59 |
|
%define extradirs %{nil} |
87 |
|
|
88 |
|
# The following is a kludge around the fact that the /usr/lib/libreadline.so |
89 |
|
# symlink (for 32-bit lib) is missing on the 64bit machines |
90 |
< |
case %cmsplatf in |
91 |
< |
slc4_ia32* ) |
92 |
< |
mkdir -p %{i}/lib |
93 |
< |
ln -s /usr/lib/libreadline.so.4.3 %{i}/lib/libreadline.so |
94 |
< |
;; |
95 |
< |
esac |
90 |
> |
%if "%cmsplatf" == "slc4_ia32_gcc345" |
91 |
> |
mkdir -p %{i}/lib |
92 |
> |
ln -s /usr/lib/libreadline.so.4.3 %{i}/lib/libreadline.so |
93 |
> |
%endif |
94 |
> |
%if "%cmsplatf" == "slc4_ia32_gcc412" |
95 |
> |
mkdir -p %{i}/lib |
96 |
> |
ln -s /usr/lib/libreadline.so.4.3 %{i}/lib/libreadline.so |
97 |
> |
%endif |
98 |
|
make %makeprocesses |
99 |
|
|
100 |
|
%install |
101 |
|
make install |
102 |
|
%define pythonv %(echo %realversion | cut -d. -f 1,2) |
103 |
|
|
104 |
< |
case %cmsplatf in |
105 |
< |
osx*) |
106 |
< |
make install prefix=%i |
107 |
< |
(cd Misc; /bin/rm -rf RPM) |
108 |
< |
mkdir -p %i/share/doc/%n |
109 |
< |
cp -R Demo Doc %i/share/doc/%n |
110 |
< |
cp -R Misc Tools %i/lib/python%{pythonv} |
111 |
< |
gcc -dynamiclib -all_load -single_module \ |
112 |
< |
-framework System -framework CoreServices -framework Foundation \ |
113 |
< |
%i/lib/python%{pythonv}/config/libpython%{pythonv}.a \ |
114 |
< |
-undefined dynamic_lookup \ |
115 |
< |
-o %i/lib/python%{pythonv}/config/libpython%{pythonv}.dylib \ |
116 |
< |
-install_name %i/lib/python%{pythonv}/config/libpython%{pythonv}.dylib \ |
117 |
< |
-current_version %{pythonv} -compatibility_version %{pythonv} -ldl |
118 |
< |
(cd %i/lib/python%{pythonv}/config |
119 |
< |
perl -p -i -e 's|-fno-common||g' Makefile) |
120 |
< |
|
117 |
< |
find %i/lib/python%{pythonv}/config -name 'libpython*' -exec mv {} %i/lib \; |
118 |
< |
;; |
119 |
< |
esac |
104 |
> |
#if [ $(uname) = Darwin ]; then |
105 |
> |
# make install prefix=%i |
106 |
> |
# (cd Misc; /bin/rm -rf RPM) |
107 |
> |
# mkdir -p %i/share/doc/%n |
108 |
> |
# cp -R Demo Doc %i/share/doc/%n |
109 |
> |
# cp -R Misc Tools %i/lib/python%{pythonv} |
110 |
> |
# gcc -dynamiclib -all_load -single_module \ |
111 |
> |
# -framework System -framework CoreServices -framework Foundation \ |
112 |
> |
# %i/lib/python%{pythonv}/config/libpython%{pythonv}.a \ |
113 |
> |
# -undefined dynamic_lookup \ |
114 |
> |
# -o %i/lib/python%{pythonv}/config/libpython%{pythonv}.dylib \ |
115 |
> |
# -install_name %i/lib/python%{pythonv}/config/libpython%{pythonv}.dylib \ |
116 |
> |
# -current_version %{pythonv} -compatibility_version %{pythonv} -ldl |
117 |
> |
# ln -s libpython%{pythonv}.dylib %i/lib/python%{pythonv}/config/libpython%{pythonv}.dylib # for boost |
118 |
> |
# (cd %i/lib/python%{pythonv}/config; mv Makefile Makefile.orig; |
119 |
> |
# sed 's|-fno-common||g' < Makefile.orig > Makefile; /bin/rm -f Makefile.orig) |
120 |
> |
#fi |
121 |
|
|
122 |
|
perl -p -i -e "s|^#!.*python|#!/usr/bin/env python|" %{i}/bin/idle \ |
123 |
|
%{i}/bin/pydoc \ |
126 |
|
%{i}/lib/python2.4/test/test_bz2.py \ |
127 |
|
%{i}/lib/python2.4/test/test_largefile.py \ |
128 |
|
%{i}/lib/python2.4/test/test_optparse.py |
129 |
+ |
# boost.spec rfio.spec |
130 |
+ |
# |
131 |
+ |
# |
132 |
|
rm `find %{i}/lib -maxdepth 1 -mindepth 1 ! -name '*python*'` |
133 |
|
rm `find %{i}/include -maxdepth 1 -mindepth 1 ! -name '*python*'` |
134 |
|
|
135 |
+ |
%if "%online" == "true" |
136 |
|
# remove tkinter that brings dependency on libtk: |
132 |
– |
# |
133 |
– |
|
137 |
|
rm `find %{i}/lib -type f -name "_tkinter.so"` |
138 |
+ |
%endif |
139 |
|
|
140 |
|
# SCRAM ToolBox toolfile |
141 |
|
mkdir -p %i/etc/scram.d |
150 |
|
<Environment name=PYTHON_COMPILE default="$PYTHON_BASE/lib/python2.4/compileall.py"></Environment> |
151 |
|
</Client> |
152 |
|
<use name=sockets> |
153 |
+ |
<Runtime name=PYTHONHOME value="$PYTHON_BASE"> |
154 |
|
<Runtime name=PATH value="$PYTHON_BASE/bin" type=path> |
155 |
|
</Tool> |
156 |
|
EOF_TOOLFILE |