python/python.spec

changeset 784
8a194ef19c9c
parent 654
9da33cc654ba
child 786
d42403a4ec05
equal deleted inserted replaced
3:e1ec6c0b8744 4:e561a2b91b70
29 Packager: OpenPKG Foundation e.V. 29 Packager: OpenPKG Foundation e.V.
30 Distribution: OpenPKG Community 30 Distribution: OpenPKG Community
31 Class: BASE 31 Class: BASE
32 Group: Language 32 Group: Language
33 License: GPL 33 License: GPL
34 Version: 2.7.3 34 Version: 3.3.2
35 Release: 20120800 35 Release: 20120800
36 36
37 # package options 37 # package options
38 %option with_readline no 38 %option with_readline no
39 %option with_db no 39 %option with_db no
40 %option with_dbm no 40 %option with_dbm no
41 %option with_curses no 41 %option with_curses no
42 %option with_zlib no 42 %option with_zlib no
43 %option with_bzip2 no 43 %option with_bzip2 no
44 %option with_xml no 44 %option with_xml no
45 %option with_locale no
46 %option with_ssl no 45 %option with_ssl no
47 46
48 # list of sources 47 # list of sources
49 Source0: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.bz2 48 Source0: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.bz2
50 Patch0: python.patch 49 Patch0: python.patch
51 50
52 # build information 51 # build information
53 BuildPreReq: OpenPKG, openpkg >= 20100101, gcc, make 52 BuildPreReq: OpenPKG, openpkg >= 20100101, gcc, make
54 PreReq: OpenPKG, openpkg >= 20100101, gcc 53 PreReq: OpenPKG, openpkg >= 20100101, gcc
55 BuildPreReq: zlib 54 BuildPreReq: zlib, gettext, libiconv
56 PreReq: zlib 55 PreReq: zlib, gettext, libiconv
57 %if "%{with_readline}" == "yes" 56 %if "%{with_readline}" == "yes"
58 BuildPreReq: readline 57 BuildPreReq: readline
59 PreReq: readline 58 PreReq: readline
60 %endif 59 %endif
61 %if "%{with_db}" == "yes" 60 %if "%{with_db}" == "yes"
79 PreReq: bzip2 78 PreReq: bzip2
80 %endif 79 %endif
81 %if "%{with_xml}" == "yes" 80 %if "%{with_xml}" == "yes"
82 BuildPreReq: expat 81 BuildPreReq: expat
83 PreReq: expat 82 PreReq: expat
84 %endif
85 %if "%{with_locale}" == "yes"
86 BuildPreReq: gettext, libiconv
87 PreReq: gettext, libiconv
88 %endif 83 %endif
89 %if "%{with_ssl}" == "yes" 84 %if "%{with_ssl}" == "yes"
90 BuildPreReq: openssl 85 BuildPreReq: openssl
91 PreReq: openssl 86 PreReq: openssl
92 %endif 87 %endif
160 %if "%{with_xml}" == "yes" 155 %if "%{with_xml}" == "yes"
161 ( echo "EXPAT_DIR=%{l_prefix}" 156 ( echo "EXPAT_DIR=%{l_prefix}"
162 echo "pyexpat pyexpat.c -DHAVE_EXPAT_H %{l_cppflags} %{l_ldflags} -lexpat" 157 echo "pyexpat pyexpat.c -DHAVE_EXPAT_H %{l_cppflags} %{l_ldflags} -lexpat"
163 ) >>Modules/Setup.local 158 ) >>Modules/Setup.local
164 %endif 159 %endif
165 %if "%{with_locale}" == "yes"
166 ( echo "_locale _localemodule.c %{l_cppflags} %{l_ldflags} -lintl -liconv"
167 ) >>Modules/Setup.local
168 %endif
169 %if "%{with_ssl}" == "yes" 160 %if "%{with_ssl}" == "yes"
170 ( echo "_socket socketmodule.c" 161 ( echo "_socket socketmodule.c"
171 echo "SSL=%{l_prefix}" 162 echo "SSL=%{l_prefix}"
172 echo "_ssl _ssl.c -DUSE_SSL %{l_cppflags openssl .} %{l_ldflags} -lssl -lcrypto" 163 echo "_ssl _ssl.c -DUSE_SSL %{l_cppflags openssl .} %{l_ldflags} -lssl -lcrypto"
173 ) >>Modules/Setup.local 164 ) >>Modules/Setup.local
182 CFLAGS="%{l_cflags -O}" \ 173 CFLAGS="%{l_cflags -O}" \
183 OPT="%{l_cflags -O}" \ 174 OPT="%{l_cflags -O}" \
184 CXXFLAGS="%{l_cxxflags -O}" \ 175 CXXFLAGS="%{l_cxxflags -O}" \
185 CPPFLAGS="$l_cppflags" \ 176 CPPFLAGS="$l_cppflags" \
186 LDFLAGS="%{l_ldflags}" \ 177 LDFLAGS="%{l_ldflags}" \
178 LIBS="-lintl -liconv" \
187 ./configure \ 179 ./configure \
188 --prefix=%{l_prefix} \ 180 --prefix=%{l_prefix} \
189 --mandir=%{l_prefix}/man \ 181 --mandir=%{l_prefix}/man \
190 --with-dbmliborder=ndbm \ 182 --with-dbmliborder=ndbm \
191 --with-gcc 183 --with-gcc
192 %{l_make} %{l_mflags -O} 184 %{l_make} %{l_mflags}
193 185
194 %install 186 %install
195 %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT 187 %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
196 ln $RPM_BUILD_ROOT%{l_prefix}/lib/python/config/libpython*.a \ 188 ( cd $RPM_BUILD_ROOT%{l_prefix}/lib/python/config*
197 $RPM_BUILD_ROOT%{l_prefix}/lib/python/config/libpython.a 189 ln libpython*.a libpython.a
190 ) || exit $?
198 rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/smtpd.py 191 rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/smtpd.py
199 rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/idle 192 rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/idle
200 rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/python/test 193 rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/python/test
201 strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true 194 strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
202 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} 195 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}

mercurial