Revision: | 1.27 |
Committed: | Wed Jun 27 12:50:44 2007 UTC (17 years, 10 months ago) by elmer |
Branch: | MAIN |
CVS Tags: | nr20071011-bootstrap, nr20070926-bootstrap, ap-20070925, CMSSW_1_6_1, CMSSW_1_6_1_pre1, CMSSW_1_6_0, CMSSW_1_6_0_pre14, pe20070831d-160p14, pe20070831c-160p14, pe20070831b-160p14, pe20070831a-160p14, pe20070830a-160p14, CMSSW_1_7_0_pre1, dl070829, CMSSW_1_6_0_DAQ3, CMSSW_1_6_0_pre13, dl070828t2, dl070828, dl070827, dl070826, pe20070826a-160p13, CMSSW_1_6_0_pre12, dl070824, pe20070824b-160p12, pe20070824-160p12, pe20070823-160p12, CMSSW_1_6_0_pre11, CMSSW_1_6_0_pre10, ge20070810-ptc, CMSSW_1_6_0_pre9, CMSSW_1_6_0_pre8, CMSSW_1_6_0_pre7, dl070730, cms160daq1_zhen2, cms160daq1_zhen1, ge20070730-cmsbuild, ge20070729-amd64, CMSSW_1_6_0_pre6, pe20070727-160p6, CMSSW_1_6_0_DAQ1, ge20070726, ge20070724-slc3, nr20070723_fwlite160p5, ap20070723, CMSSW_1_6_0_pre5, dl070721, dl070720_160daq1_1, pe20070720-160daq1, pe20070720-160p5, ge20070718, ge20070717, ap20070717, ge20070713-macosx, ap20070712, ge20070712-migration, ge20070712, ge20070711-prodcommon, CMSSW_1_6_0_pre4, ge20070710-formencode, ge20070709-slc3, ge20070709-macosx, ge20070709a-macosx, ge20070706-macosx, ap20070706, CMSSW_1_6_0_pre3, pe20070705a-160p3, CMSSW_1_6_0_pre2, ge20070705, ge20070704, ge20070703b, pe20070702b-160p3, pe20070702b-160p2, ge20070702-rpm-webtools, CMSSW_1_6_0_pre1, pe20070729b-160p2, pe20070729b-160p1, pe20070729a-160p2, pe20070729a-160p1, pe20070629a-ports, pe20070628e-ports, pe20070628d-ports, pe20070628c-ports, pe20070628b-ports, pe20070628a-ports, pe20070627b-ports, pe20070627a-ports |
Changes since 1.26: | +2 -2 lines |
Log Message: | Update to -CMS3 for full rebuild |
# | User | Rev | Content |
---|---|---|---|
1 | elmer | 1.27 | ### RPM external python 2.4.2-CMS3 |
2 | eulisse | 1.3 | ## INITENV +PATH PATH %i/bin |
3 | ## INITENV +PATH LD_LIBRARY_PATH %i/lib | ||
4 | argiro | 1.1 | # OS X patches and build fudging stolen from fink |
5 | elmer | 1.27 | Requires: zlib expat openssl bz2lib db4 gdbm openssl |
6 | eulisse | 1.8 | # FIXME: readline, crypt |
7 | argiro | 1.1 | # FIXME: gmp, panel, tk/tcl, x11 |
8 | |||
9 | elmer | 1.24 | Source0: http://www.python.org/ftp/%n/%realversion/Python-%realversion.tgz |
10 | elmer | 1.13 | Patch0: python-Include-pyport.h |
11 | Patch1: python-Lib-plat-mac-applesingle.py | ||
12 | Patch2: python-Lib-site.py | ||
13 | Patch3: python-Mac-OSX-Makefile | ||
14 | Patch4: python-Makefile.pre.in | ||
15 | Patch5: python-configure | ||
16 | Patch6: python-setup.py | ||
17 | argiro | 1.1 | |
18 | steen | 1.19 | |
19 | argiro | 1.1 | %prep |
20 | elmer | 1.24 | %setup -n Python-%realversion |
21 | elmer | 1.13 | #%patch0 |
22 | #%patch1 | ||
23 | #%patch2 | ||
24 | #%patch3 | ||
25 | #%patch4 | ||
26 | #%patch5 | ||
27 | #%patch6 | ||
28 | eulisse | 1.5 | perl -p -i -e "s|#!.*/usr/local/bin/python|#!/usr/bin/env python|" Lib/cgi.py |
29 | |||
30 | argiro | 1.1 | %ifos darwin |
31 | sed 's|@PREFIX@|%i|g' < %_sourcedir/python-osx | patch -p1 | ||
32 | %endif | ||
33 | |||
34 | %build | ||
35 | # Python is awkward about passing other include or library directories | ||
36 | # to it. Basically there is no way to pass anything from configure to | ||
37 | # make, or down to python itself. To get python detect the extensions | ||
38 | # we want to enable, we simply have to link the contents into python's | ||
39 | # own include/lib directories. Ugh. | ||
40 | # | ||
41 | # NB: It would sort-of make sense to link more stuff from /sw on OS X, | ||
42 | # but we simply cannot link the whole world. If you need something, | ||
43 | # see above for the commented-out list of packages that could be | ||
44 | # linked specifically, or could be built by ourselves, depending on | ||
45 | # whether we like to pick up system libraries or want total control. | ||
46 | mkdir -p %i/include %i/lib | ||
47 | eulisse | 1.7 | dirs="$ZLIB_ROOT $EXPAT_ROOT $OPENSSL_ROOT $BZ2LIB_ROOT $NCURSES_ROOT $DB4_ROOT $GDBM_ROOT" |
48 | eulisse | 1.16 | echo $dirs |
49 | argiro | 1.1 | for d in $dirs; do |
50 | for f in $d/include/*; do | ||
51 | [ -f $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 | ||
57 | rm -f %i/lib/$(basename $f) | ||
58 | ln -s $f %i/lib | ||
59 | done | ||
60 | done | ||
61 | |||
62 | eulisse | 1.6 | ./configure --prefix=%i --enable-shared --without-tkinter --disable-tkinter --without-readline |
63 | eulisse | 1.3 | make %makeprocesses |
64 | argiro | 1.1 | |
65 | %install | ||
66 | make install | ||
67 | elmer | 1.24 | %define pythonv %(echo %realversion | cut -d. -f 1,2) |
68 | eulisse | 1.8 | |
69 | elmer | 1.13 | #if [ $(uname) = Darwin ]; then |
70 | argiro | 1.1 | # make install prefix=%i |
71 | # (cd Misc; /bin/rm -rf RPM) | ||
72 | # mkdir -p %i/share/doc/%n | ||
73 | # cp -R Demo Doc %i/share/doc/%n | ||
74 | eulisse | 1.8 | # cp -R Misc Tools %i/lib/python%{pythonv} |
75 | elmer | 1.13 | # gcc -dynamiclib -all_load -single_module \ |
76 | # -framework System -framework CoreServices -framework Foundation \ | ||
77 | # %i/lib/python%{pythonv}/config/libpython%{pythonv}.a \ | ||
78 | # -undefined dynamic_lookup \ | ||
79 | # -o %i/lib/python%{pythonv}/config/libpython%{pythonv}.dylib \ | ||
80 | # -install_name %i/lib/python%{pythonv}/config/libpython%{pythonv}.dylib \ | ||
81 | # -current_version %{pythonv} -compatibility_version %{pythonv} -ldl | ||
82 | # ln -s libpython%{pythonv}.dylib %i/lib/python%{pythonv}/config/libpython%{pythonv}.dylib # for boost | ||
83 | eulisse | 1.8 | # (cd %i/lib/python%{pythonv}/config; mv Makefile Makefile.orig; |
84 | argiro | 1.1 | # sed 's|-fno-common||g' < Makefile.orig > Makefile; /bin/rm -f Makefile.orig) |
85 | elmer | 1.13 | #fi |
86 | eulisse | 1.9 | |
87 | perl -p -i -e "s|^#!.*python|#!/usr/bin/env python|" %{i}/bin/idle \ | ||
88 | %{i}/bin/pydoc \ | ||
89 | %{i}/bin/smtpd.py \ | ||
90 | %{i}/lib/python2.4/bsddb/dbshelve.py \ | ||
91 | %{i}/lib/python2.4/test/test_bz2.py \ | ||
92 | %{i}/lib/python2.4/test/test_largefile.py \ | ||
93 | %{i}/lib/python2.4/test/test_optparse.py | ||
94 | eulisse | 1.14 | # boost.spec rfio.spec |
95 | eulisse | 1.15 | # |
96 | # | ||
97 | eulisse | 1.17 | rm `find %{i}/lib -maxdepth 1 -mindepth 1 ! -name '*python*'` |
98 | eulisse | 1.18 | rm `find %{i}/include -maxdepth 1 -mindepth 1 ! -name '*python*'` |
99 | eulisse | 1.16 | %post |
100 | 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 |