ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/python.spec
(Generate patch)

Comparing COMP/CMSDIST/python.spec (file contents):
Revision 1.13 by elmer, Thu Jun 1 22:41:48 2006 UTC vs.
Revision 1.61 by diego, Mon Dec 14 18:39:57 2009 UTC

# Line 1 | Line 1
1 < ### RPM external python 2.4.2
1 > ### RPM external python 2.4.2_CMS19
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 > %define closingbrace )
6 > %define online %(case %cmsplatf in *onl_*_*%closingbrace echo true;; *%closingbrace echo flase;; esac)
7 > %define downloadv %(echo %realversion | cut -d"_" -f1)
8 > Requires: expat bz2lib db4 gdbm
9 > Provides: libpython2.4.so.1.0
10 >
11 > %if "%online" != "true"
12 > Requires: zlib openssl
13 > %endif
14 >
15   # FIXME: readline, crypt
16   # FIXME: gmp, panel, tk/tcl, x11
17  
18 < Source0: http://www.python.org/ftp/%n/%v/Python-%v.tgz
18 > Source0: http://www.python.org/ftp/%n/%downloadv/Python-%downloadv.tgz
19   Patch0: python-Include-pyport.h
20   Patch1: python-Lib-plat-mac-applesingle.py
21   Patch2: python-Lib-site.py
# Line 15 | Line 24 | Patch4: python-Makefile.pre.in
24   Patch5: python-configure
25   Patch6: python-setup.py
26  
27 +
28   %prep
29 < %setup -n Python-%v
29 > %setup -n Python-%downloadv
30   #%patch0
31   #%patch1
32   #%patch2
# Line 43 | Line 53 | perl -p -i -e "s|#!.*/usr/local/bin/pyth
53   # linked specifically, or could be built by ourselves, depending on
54   # whether we like to pick up system libraries or want total control.
55   mkdir -p %i/include %i/lib
56 < dirs="$ZLIB_ROOT $EXPAT_ROOT $OPENSSL_ROOT $BZ2LIB_ROOT $NCURSES_ROOT $DB4_ROOT $GDBM_ROOT"
56 >
57 > %if "%online" != "true"
58 > %define extradirs $ZLIB_ROOT $OPENSSL_ROOT
59 > %else
60 > %define extradirs %{nil}
61 > %endif
62 >
63 > dirs="$EXPAT_ROOT $BZ2LIB_ROOT $NCURSES_ROOT $DB4_ROOT $GDBM_ROOT %{extradirs}"
64 >
65 > echo $dirs
66   for d in $dirs; do
67    for f in $d/include/*; do
68 <    [ -f $f ] || continue
68 >    [ -e $f ] || continue
69      rm -f %i/include/$(basename $f)
70      ln -s $f %i/include
71    done
72    for f in $d/lib/*; do
73 <    [ -f $f ] || continue
73 >    [ -e $f ] || continue
74      rm -f %i/lib/$(basename $f)
75      ln -s $f %i/lib
76    done
77   done
78  
79 < ./configure --prefix=%i --enable-shared --without-tkinter --disable-tkinter --without-readline
79 > additionalConfigureOptions=""
80 > case %cmsplatf in
81 >    osx105* )
82 >    additionalConfigureOptions="--disable-readline"
83 >    ;;
84 > esac
85 >
86 > ./configure --prefix=%i $additionalConfigureOptions --enable-shared \
87 >            --without-tkinter --disable-tkinter
88 >
89 > # The following is a kludge around the fact that the /usr/lib/libreadline.so
90 > # symlink (for 32-bit lib) is missing on the 64bit machines
91 > %if "%cmsplatf" == "slc4_ia32_gcc345"
92 >  mkdir -p %{i}/lib
93 >  ln -s /usr/lib/libreadline.so.4.3 %{i}/lib/libreadline.so
94 > %endif
95 > %if "%cmsplatf" == "slc4_ia32_gcc412"
96 >  mkdir -p %{i}/lib
97 >  ln -s /usr/lib/libreadline.so.4.3 %{i}/lib/libreadline.so
98 > %endif
99   make %makeprocesses
100  
101   %install
102   make install
103 < %define pythonv %(echo %v | cut -d. -f 1,2)
103 > %define pythonv %(echo %downloadv | cut -d. -f 1,2)
104  
105   #if [ $(uname) = Darwin ]; then
106    # make install prefix=%i
# Line 89 | Line 127 | perl -p -i -e "s|^#!.*python|#!/usr/bin/
127                      %{i}/lib/python2.4/test/test_bz2.py \
128                      %{i}/lib/python2.4/test/test_largefile.py \
129                      %{i}/lib/python2.4/test/test_optparse.py
130 + # boost.spec rfio.spec
131 + #
132 + #
133 + rm  `find %{i}/lib -maxdepth 1 -mindepth 1 ! -name '*python*'`
134 + rm  `find %{i}/include -maxdepth 1 -mindepth 1 ! -name '*python*'`
135 +
136 + %if "%online" == "true"
137 + # remove tkinter that brings dependency on libtk:
138 + find %{i}/lib -type f -name "_tkinter.so" -exec rm {} \;
139 + %endif
140 +
141 + # SCRAM ToolBox toolfile
142 + mkdir -p %i/etc/scram.d
143 + cat << \EOF_TOOLFILE >%i/etc/scram.d/%n
144 + <doc type=BuildSystem::ToolDoc version=1.0>
145 + <Tool name=%n version=%downloadv>
146 + <lib name=python2.4>
147 + <Client>
148 + <Environment name=PYTHON_BASE default="%i"></Environment>
149 + <Environment name=LIBDIR default="$PYTHON_BASE/lib"></Environment>
150 + <Environment name=INCLUDE default="$PYTHON_BASE/include/python2.4"></Environment>
151 + <Environment name=PYTHON_COMPILE default="$PYTHON_BASE/lib/python2.4/compileall.py"></Environment>
152 + </Client>
153 + <use name=sockets>
154 + <Runtime name=PYTHONHOME value="$PYTHON_BASE">
155 + <Runtime name=PATH value="$PYTHON_BASE/bin" type=path>
156 + </Tool>
157 + EOF_TOOLFILE
158 +
159 + %post
160 + 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
161 + %{relocateConfig}etc/scram.d/%n

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines