# majversion define needed when upgrading from 2.x to 2.(x+1) releases %define majversion %(echo %version | cut -d. -f 1-2) %define libname libpython24 Name: python24 Version: 2.4.4 Release: 5mamba Summary: An interpreted, interactive, object-oriented programming language Group: Applications/Development Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: http://www.python.org Source: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.bz2 Patch0: %{name}-2.4.2-tex3-fix.patch Patch1: %{name}-2.4.2-cgi.patch Patch2: %{name}-2.4.4-gcc43.patch License: GPL ## AUTOBUILDREQ-BEGIN BuildRequires: libbzip2-devel BuildRequires: libgcc BuildRequires: libopenssl-devel BuildRequires: libreadline-devel BuildRequires: libstdc++6-devel BuildRequires: libtcl85-devel BuildRequires: libtk85-devel BuildRequires: libX11-devel BuildRequires: libz-devel ## AUTOBUILDREQ-END BuildRequires: glibc-devel >= 2.3.5 BuildRequires: libncurses-devel >= 5.4 BuildRequires: libbluez-devel >= 2.21 %if "%{?bootstrap}" != "1" #BuildRequires: latex2html >= 2002 BuildRequires: tetex >= 3.0 BuildRequires: libtk >= 8.4.11 %endif Requires: %{libname} = %{version} Provides: python-abi = %{majversion} Provides: python(abi) = %{majversion} Provides: python = %{version} BuildRoot: %{_tmppath}/%{name}-%{version}-root %description Python is an interpreted, interactive, object-oriented programming language. It is often compared to Tcl, Perl, Scheme or Java. Python combines remarkable power with very clear syntax. It has modules, classes, exceptions, very high level dynamic data types, and dynamic typing. There are interfaces to many system calls and libraries, as well as to various windowing systems (X11, Motif, Tk, Mac, MFC). New built-in modules are easily written in C or C++. Python is also usable as an extension language for applications that need a programmable interface. The Python implementation is portable: it runs on many brands of UNIX, on Windows, DOS, OS/2, Mac, Amiga... %package -n %{libname} Group: System/Libraries/Python Summary: Libraries for Python %description -n %{libname} Python is an interpreted, interactive, object-oriented programming language. It is often compared to Tcl, Perl, Scheme or Java. Python combines remarkable power with very clear syntax. It has modules, classes, exceptions, very high level dynamic data types, and dynamic typing. There are interfaces to many system calls and libraries, as well as to various windowing systems (X11, Motif, Tk, Mac, MFC). New built-in modules are easily written in C or C++. Python is also usable as an extension language for applications that need a programmable interface. The Python implementation is portable: it runs on many brands of UNIX, on Windows, DOS, OS/2, Mac, Amiga... This package contains the libraries for Python. %package -n %{libname}-devel Group: Development/Libraries/Python Summary: Devel package for Python #Requires: %{libname} = %{version} Provides: %{name}-devel = %{version} Obsoletes: %{name}-devel %description -n %{libname}-devel Python is an interpreted, interactive, object-oriented programming language. It is often compared to Tcl, Perl, Scheme or Java. Python combines remarkable power with very clear syntax. It has modules, classes, exceptions, very high level dynamic data types, and dynamic typing. There are interfaces to many system calls and libraries, as well as to various windowing systems (X11, Motif, Tk, Mac, MFC). New built-in modules are easily written in C or C++. Python is also usable as an extension language for applications that need a programmable interface. The Python implementation is portable: it runs on many brands of UNIX, on Windows, DOS, OS/2, Mac, Amiga... This package contains the development files for Python. %package doc Group: Documentation Summary: Documentation package for Python Requires: %{name} = %{version} %description doc Python is an interpreted, interactive, object-oriented programming language. It is often compared to Tcl, Perl, Scheme or Java. Python combines remarkable power with very clear syntax. It has modules, classes, exceptions, very high level dynamic data types, and dynamic typing. There are interfaces to many system calls and libraries, as well as to various windowing systems (X11, Motif, Tk, Mac, MFC). New built-in modules are easily written in C or C++. Python is also usable as an extension language for applications that need a programmable interface. The Python implementation is portable: it runs on many brands of UNIX, on Windows, DOS, OS/2, Mac, Amiga... This package contains the documentation files for Python in HTML format. %package tk Group: System/Libraries/Python Summary: Tk library for Python Requires: %{name} = %{version} %description tk Python is an interpreted, interactive, object-oriented programming language. It is often compared to Tcl, Perl, Scheme or Java. Python combines remarkable power with very clear syntax. It has modules, classes, exceptions, very high level dynamic data types, and dynamic typing. There are interfaces to many system calls and libraries, as well as to various windowing systems (X11, Motif, Tk, Mac, MFC). New built-in modules are easily written in C or C++. Python is also usable as an extension language for applications that need a programmable interface. The Python implementation is portable: it runs on many brands of UNIX, on Windows, DOS, OS/2, Mac, Amiga... This package contains the tk library for Python. %prep %setup -q -n Python-%{version} %patch0 -p1 %patch1 -p1 %patch2 -p1 %build %configure \ --enable-ipv6 \ --enable-shared %make %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %makeinstall install -d %{buildroot}%{_libdir}/python/site-packages install -d %{buildroot}%{_libdir}/site-python mv %{buildroot}%{_bindir}/idle %{buildroot}%{_bindir}/idle24 mv %{buildroot}%{_bindir}/pydoc %{buildroot}%{_bindir}/pydoc24 mv %{buildroot}%{_bindir}/smtpd.py %{buildroot}%{_bindir}/smtpd24.py #ln -s python%{majversion} %{buildroot}%{_libdir}/python #ln -s python%{majversion} %{buildroot}%{_includedir}/python # fix library permission chmod 755 %{buildroot}%{_libdir}/libpython%{majversion}.so.* %if "%{?bootstrap}" != "1" # build the HTML documentation cd Doc sed -i s@/usr/bin/env@/bin/env@ tools/mkhowto PATH=$PATH:%{_builddir}/Python-%{version}/Doc/tools #make html #install -d %{buildroot}%{_defaultdocdir}/%{name}-%{version} #cp -R html/ %{buildroot}%{_defaultdocdir}/%{name}-%{version} #rm -f %{buildroot}%{_defaultdocdir}/%{name}-%{version}/html/.cvsignore make PAPER=a4 pdf %endif %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %post /usr/sbin/update-alternatives --install %{_bindir}/python python %{_bindir}/python%{majversion} 60 exit 0 %preun if [ $1 -eq 0 ]; then /usr/sbin/update-alternatives --remove python %{_bindir}/python%{majversion} fi exit 0 %post -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig %files %defattr(-,root,root) %exclude %{_bindir}/python %{_bindir}/* %exclude %{_mandir}/man1/* %dir %{_libdir}/python %files -n %{libname} %defattr(-,root,root) %dir %{_libdir}/python%{majversion} %{_libdir}/site-python %{_libdir}/python%{majversion}/* %{_libdir}/libpython%{majversion}.so.* %if "%{?bootstrap}" != "1" %exclude %{_libdir}/python%{majversion}/lib-tk %exclude %{_libdir}/python%{majversion}/lib-dynload/_tkinter.so %endif %files -n %{libname}-devel %defattr(-,root,root) %dir %{_includedir}/python%{majversion} %{_includedir}/python%{majversion}/*.h %{_libdir}/*.so %if "%{?bootstrap}" != "1" %files tk %defattr(-,root,root) %{_libdir}/python%{majversion}/lib-tk %{_libdir}/python%{majversion}/lib-dynload/_tkinter.so #%files doc #%defattr(-,root,root) #%dir %{_defaultdocdir}/%{name}-%{version}/paper-a4/ #%{_defaultdocdir}/%{name}-%{version}/paper-a4/* #%endif %changelog * Tue Dec 08 2009 Silvan Calarco 2.4.4-5mamba - rebuild binaries with version suffix to avoid conflict with python 2.6 * Sun Jan 25 2009 Silvan Calarco 2.4.4-4mamba - remove provide for /usr/bin/python * Fri Oct 24 2008 Silvan Calarco 2.4.4-3mamba - rebuilt after python update * Thu Oct 16 2008 Silvan Calarco 2.4.4-2mamba - added provides for python 2.4 - set '24' suffix to executables - set alternative priority higher thant python 2.6 * Sat Jun 28 2008 Ercole 'ercolinux' Carpanetto 2.4.4-1mamba - renamed to legacy python24 - changed doc to pdf due to a problem with latex2html * Fri Mar 30 2007 Silvan Calarco 2.4.4-1mamba - update to version 2.4.4 by autospec * Fri Mar 31 2006 Davide Madrisan 2.4.3-1qilnx - update to version 2.4.3 by autospec * Mon Feb 27 2006 Stefano Cotta Ramusino 2.4.2-3qilnx - added cgi script patch * Mon Jan 09 2006 Davide Madrisan 2.4.2-2qilnx - provides python-abi, python(abi) * Fri Sep 30 2005 Davide Madrisan 2.4.2-1qilnx - update to version 2.4.2 by autospec - also fix the security issues CAN-2005-1849 and CAN-2005-2096 - patch to build python documentation with TeX3 updated * Tue Aug 09 2005 Silvan Calarco 2.4.1-2qilnx - remove %%pre script * Thu Jul 21 2005 Silvan Calarco 2.4.1-1qilnx - new version build * Thu Apr 07 2005 Silvan Calarco 2.3.5-2qilnx - remove Xorg-libs dependency by adding subpackage python-tk * Thu Feb 10 2005 Davide Madrisan 2.3.5-1qilnx - update to version 2.3.5 by autospec - also fix the security issue QSA-2005-013 (CAN-2005-0089) * Wed Feb 02 2005 Silvan Calarco 2.3.5-1qilnx - rebuilt with shared libraries * Thu May 27 2004 Davide Madrisan 2.3.4-1qilnx - new version rebuild (bugfix release) - added the doc package with the Python documentation in HTML format * Tue Dec 24 2003 Silvan Calarco 2.3.3-2qilnx - renamed lib and includes destdir to /usr/include/python * Tue Dec 23 2003 Davide Madrisan 2.3.3-1qilnx - rebuild with Python 2.3.3 * Mon Oct 27 2003 Davide Madrisan 2.3.2-1qilnx - rebuild with Python 2.3.2 * Tue Jul 01 2003 Silvan Calarco 2.2.3-1qilnx - first build