1.1 --- a/python/python.spec Tue Sep 20 15:22:39 2011 +0200 1.2 +++ b/python/python.spec Tue Sep 20 15:24:08 2011 +0200 1.3 @@ -1,6 +1,6 @@ 1.4 ## 1.5 ## python.spec -- OpenPKG RPM Package Specification 1.6 -## Copyright (c) 2000-2011 OpenPKG Foundation e.V. <http://openpkg.net/> 1.7 +## Copyright (c) 2000-2010 OpenPKG Foundation e.V. <http://openpkg.net/> 1.8 ## 1.9 ## Permission to use, copy, modify, and distribute this software for 1.10 ## any purpose with or without fee is hereby granted, provided that 1.11 @@ -31,8 +31,8 @@ 1.12 Class: BASE 1.13 Group: Language 1.14 License: GPL 1.15 -Version: 2.7.1 1.16 -Release: 20110212 1.17 +Version: 2.7.2 1.18 +Release: 20110914 1.19 1.20 # package options 1.21 %option with_readline no 1.22 @@ -50,8 +50,10 @@ 1.23 Patch0: python.patch 1.24 1.25 # build information 1.26 -BuildPreReq: OpenPKG, openpkg >= 20100101, gcc 1.27 -PreReq: OpenPKG, openpkg >= 20100101, gcc 1.28 +Prefix: %{l_prefix} 1.29 +BuildRoot: %{l_buildroot} 1.30 +BuildPreReq: OpenPKG, openpkg >= 20060823, gcc 1.31 +PreReq: OpenPKG, openpkg >= 20060823, gcc 1.32 BuildPreReq: zlib 1.33 PreReq: zlib 1.34 %if "%{with_readline}" == "yes" 1.35 @@ -90,6 +92,8 @@ 1.36 BuildPreReq: openssl 1.37 PreReq: openssl 1.38 %endif 1.39 +AutoReq: no 1.40 +AutoReqProv: no 1.41 1.42 %description 1.43 Python is an interpreted, interactive, object-oriented programming 1.44 @@ -111,10 +115,10 @@ 1.45 %prep 1.46 %setup -q -n Python-%{version} 1.47 %patch -p0 1.48 - 1.49 -%build 1.50 - %{l_shtool} subst %{l_value -s -a} \ 1.51 - setup.py 1.52 + %{l_shtool} subst \ 1.53 + -e 's;\(LDSHARED=.*\)\$(CC);\1\\$(CC);g' \ 1.54 + -e 's;\(LDCXXSHARED=.*\)\$(CXX);\1\\$(CXX);g' \ 1.55 + configure 1.56 %{l_shtool} subst \ 1.57 -e 's;altinstall bininstall maninstall;altinstall maninstall;' \ 1.58 -e 's;python$(VERSION);python;g' \ 1.59 @@ -132,6 +136,9 @@ 1.60 %{l_shtool} subst \ 1.61 -e 's;python{py_version_short};python;g' \ 1.62 Lib/sysconfig.py 1.63 + 1.64 +%build 1.65 + echo "" >config.cache 1.66 %if "%{with_readline}" == "yes" 1.67 ( echo "readline readline.c %{l_cppflags} %{l_ldflags} -lreadline -ltermcap" 1.68 ) >>Modules/Setup.local 1.69 @@ -173,6 +180,12 @@ 1.70 ) >>Modules/Setup.local 1.71 %endif 1.72 1.73 + # getaddrinfo bug 1.74 + disableipv6="" 1.75 + case "%{l_platform -t}" in 1.76 + *-aix* ) disableipv6="--disable-ipv6" ;; 1.77 + esac 1.78 + 1.79 CC="%{l_prefix}/bin/gcc" \ 1.80 CXX="%{l_cxx}" \ 1.81 CFLAGS="%{l_cflags -O}" \ 1.82 @@ -180,13 +193,17 @@ 1.83 CXXFLAGS="%{l_cxxflags -O}" \ 1.84 LDFLAGS="%{l_ldflags}" \ 1.85 ./configure \ 1.86 + --cache-file=./config.cache \ 1.87 + --with-gcc \ 1.88 + $disableipv6 \ 1.89 --prefix=%{l_prefix} \ 1.90 --mandir=%{l_prefix}/man \ 1.91 --with-dbmliborder=ndbm \ 1.92 --with-gcc 1.93 - %{l_make} %{l_mflags} 1.94 + %{l_make} %{l_mflags -O} 1.95 1.96 %install 1.97 + rm -rf $RPM_BUILD_ROOT 1.98 %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT 1.99 ln $RPM_BUILD_ROOT%{l_prefix}/lib/python/config/libpython*.a \ 1.100 $RPM_BUILD_ROOT%{l_prefix}/lib/python/config/libpython.a 1.101 @@ -199,4 +216,5 @@ 1.102 %files -f files 1.103 1.104 %clean 1.105 + rm -rf $RPM_BUILD_ROOT 1.106