## ## TODO: make it lib64 clean ## %define buildfor_mdk90 %(awk '{print ($4 == "9.0")}' %{_sysconfdir}/mandrake-release) %define pref %{_prefix} %define python %{_bindir}/python %define pyver 2.3 %define debug 0 %define port GTK %define lcport gtk2u %define tarname wxPython-src %define version 2.5.3.1 %define ver2 2.5 %define release 3mdk %define wxpref %{pref}/lib/wxPython # Should --enable-debug_flag be used in release builds? %define debug_flag 0 %define name wxPython%{port} %define major 2.5_3 %if %buildfor_mdk90 %define libname lib%{name}%{major} %else %define libname %mklibname %{name} %{major} %endif %define wxconfigname %{wxpref}/lib/wx/config/gtk2-unicode-release-%ver2 #---------------------------------------------------------------- Summary: Cross platform GUI toolkit for Python using wx%{port} Name: %{name} Version: %{version} Release: %{release} Source0: http://prdownloads.sourceforge.net/wxpython/%{tarname}-%{version}.tar.bz2 Patch1: wxGTK-2.5.3-va_copy-check-fix.patch.bz2 License: LGPL/wxWindows Library Licence, Version 3 URL: http://wxPython.org/ Group: Development/Python BuildRoot: %{_tmppath}/%{name}-buildroot BuildRequires: libMesaGLU-devel BuildRequires: libpython-devel >= %pyver BuildRequires: gtk2-devel Provides: wxwin Provides: wxPython = %{version} # old wxPython packages Obsoletes: wxPython Requires: %libname = %version-%release %description wxPython is a GUI toolkit for Python that is a wrapper around the wxWindows C++ GUI library. wxPython provides a large variety of window types and controls, all implemented with a native look and feel (and native runtime speed) on the platforms it is supported on. This package is implemented using the %{port} port of wxWindows. %package -n %libname Summary: Shared library of wxGTK for wxPythonGTK Group: System/Libraries %description -n %libname This is the internal version of the wxGTK shared library included in wxPythonGTK. %package -n %libname-devel Summary: Development files of wxPython%{port} Group: Development/Python Provides: libwxPythonGTK-devel = %version-%release Provides: libwxPythonGTK2.3-devel = %version-%release Requires: wxPython%{port} = %{version}-%release Requires: %libname = %{version}-%release %description -n %libname-devel This packages contains the headers and etc. for building apps or Python extension modules that use the same wx%{port} shared libraries that wxPython uses. %prep %setup -q -n %{tarname}-%{version} %patch1 -p1 -b .va_copy %build autoconf #mkdir build cd build # Configure, trying to reduce dependencies ../configure --with-%{lcport} \ --prefix=%{wxpref} \ --enable-soname \ --enable-rpath=%{wxpref}/lib \ --with-opengl \ %if %{debug} --enable-debug \ %else --enable-optimise \ %if %{debug_flag} --enable-debug_flag \ %endif %endif --with-libjpeg=builtin \ --with-libpng=builtin \ --with-libtiff=builtin \ --with-zlib=builtin \ --enable-gtk2 \ --enable-unicode \ --enable-exceptions \ --enable-catch_segvs \ ## --enable-debug_flag \ ## --with-odbc \ # Build wxWindows %make cd contrib %make cd ../../locale make allmo # ** Unfortunately we have to do a bit of installation here so wxPython # can be built. Perhaps wx-config should be changed to be able to be # used from the build dir, maybe with an --inplace flag... Move these # three lines to install if/when that happens. rm -rf $RPM_BUILD_ROOT cd ../build make prefix=$RPM_BUILD_ROOT%{wxpref} \ install cd contrib make prefix=$RPM_BUILD_ROOT%{wxpref} \ install # Now build wxPython cd ../../wxPython %{python} setup.py \ NO_SCRIPTS=1 \ WX_CONFIG="$RPM_BUILD_ROOT%{wxpref}/bin/wx-config --prefix=$RPM_BUILD_ROOT%{wxpref}" \ WXPORT='gtk2'\ build %install cd wxPython %{python} setup.py \ NO_SCRIPTS=1 \ WX_CONFIG="$RPM_BUILD_ROOT%{wxpref}/bin/wx-config --prefix=$RPM_BUILD_ROOT%{wxpref}" \ WXPORT='gtk2'\ install \ --root=$RPM_BUILD_ROOT # Since I want this RPM to be as generic as possible I won't let # distutils copy the scripts, since it will mangle the #! line # to use the real python pathname. Since some distros install # python 2.2 as python2 and others as python, then I can't let # it do that otherwise the dependencies will be fouled up. Copy # them manually instead: mkdir -p $RPM_BUILD_ROOT%{_bindir} for s in \ img2png \ img2py \ img2xpm \ pycrust \ pyshell \ xrced; do cp scripts/$s $RPM_BUILD_ROOT%{_bindir} done cd .. for subdir in %buildroot%{wxpref}/share/locale/*;do echo "%lang($(basename $subdir)) $(echo $subdir|sed s!%buildroot!!)" >> %name.lang done #gw fix wx-config symlink ln -sf %{wxconfigname} %buildroot%wxpref/bin/wx-config #gw hmm, let's remove this: rm -rf %buildroot/include %clean rm -rf $RPM_BUILD_ROOT %post -n %libname -p /sbin/ldconfig %postun -n %libname -p /sbin/ldconfig %files -f %name.lang %defattr(-,root,root) %doc docs/preamble.txt %doc docs/licence.txt %doc docs/readme.txt %doc docs/changes.txt %doc wxPython/docs/*.* %doc wxPython/docs/screenshots %{pref}/%{_lib}/python* %dir %{wxpref} %dir %{wxpref}/share/ %dir %{wxpref}/share/locale %{wxpref}/share/wx %{pref}/bin/* %files -n %libname %defattr(-,root,root) %dir %{wxpref}/lib %{wxpref}/lib/libwx*.so.* %files -n %libname-devel %defattr(-,root,root) %dir %{wxpref}/include/ %{wxpref}/include/wx-2.5/ %{wxpref}/lib/*.so %{wxpref}/lib/wx %dir %{wxpref}/share/aclocal %{wxpref}/share/aclocal/wxwin.m4 %{wxconfigname} %dir %{wxpref}/bin %{wxpref}/bin/wx-config %changelog * Wed Feb 23 2005 Christiaan Welvaart <cjw@daneel.dyndns.org> 2.5.3.1-3mdk - Patch1: fix va_copy configure check * Sun Dec 05 2004 Michael Scherer <misc@mandrake.org> 2.5.3.1-2mdk - Rebuild for new python * Wed Nov 10 2004 Götz Waschk <waschk@linux-mandrake.com> 2.5.3.1-1mdk - new major - update file list - drop obsolete patch - New release 2.5.3.1 * Wed Nov 3 2004 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 2.5.2.7-3mdk - fix build on x86_64 * Fri Sep 17 2004 Frederic Lepied <flepied@mandrakesoft.com> 2.5.2.7-2mdk - activate --enable-exceptions and --enable-catch_segvs to be able to continue when an exception occurs * Sun Aug 15 2004 Götz Waschk <waschk@linux-mandrake.com> 2.5.2.7-1mdk - major 2.5_2 - update file list - fix source URL - New release 2.5.2.7 * Mon Jun 14 2004 Laurent MONTEL <lmontel@mandrakesoft.com> 2.5.1.5-2mdk - Rebuild * Mon Apr 5 2004 Götz Waschk <waschk@linux-mandrake.com> 2.5.1.5-1mdk - also build contrib part of wxGTK - new major - fix build - new version * Tue Dec 2 2003 Götz Waschk <waschk@linux-mandrake.com> 2.4.2.4-2mdk - rebuild for missing package * Tue Nov 4 2003 Götz Waschk <waschk@linux-mandrake.com> 2.4.2.4-1mdk - fix locale directories - fix buildrequires - switch to gtk2 port of wxGTK - drop useless prefix - new version * Fri Aug 08 2003 Frederic Lepied <flepied@mandrakesoft.com> 2.4.1.2-3mdk - python 2.3 * Wed Jul 9 2003 Götz Waschk <waschk@linux-mandrake.com> 2.4.1.2-2mdk - rebuild for new rpm * Fri Jun 20 2003 Götz Waschk <waschk@linux-mandrake.com> 2.4.1.2-1mdk - remove install macro from a comment - new version * Fri May 2 2003 Götz Waschk <waschk@linux-mandrake.com> 2.4.0.6-2mdk - fix directory ownership * Wed Mar 12 2003 Götz Waschk <waschk@linux-mandrake.com> 2.4.0.6-1mdk - fix buildrequires - new version * Wed Mar 12 2003 Götz Waschk <waschk@linux-mandrake.com> 2.4.0.5-1mdk - new version * Sat Mar 8 2003 Götz Waschk <waschk@linux-mandrake.com> 2.4.0.4-1mdk - new version * Wed Jan 29 2003 Götz Waschk <waschk@linux-mandrake.com> 2.4.0.2-2mdk - fix mdk9.0 build - fix buildrequires * Wed Jan 29 2003 Götz Waschk <waschk@linux-mandrake.com> 2.4.0.2-1mdk - mklibname macro - new version * Sat Jan 11 2003 Götz Waschk <waschk@linux-mandrake.com> 2.4.0.1-1mdk - update file list - new major - new version * Fri Dec 27 2002 Götz Waschk <waschk@linux-mandrake.com> 2.3.4.2-1mdk - add missing file - new version * Mon Oct 14 2002 Götz Waschk <waschk@linux-mandrake.com> 2.3.3.1-2mdk - build wxGTK with soname, to make libification work * Fri Sep 20 2002 Götz Waschk <waschk@linux-mandrake.com> 2.3.3.1-1mdk - changed license to the official dual license - use included wxGTK version like recommended - sync with official spec file - renamed do wxPythonGTK - new version * Thu Sep 5 2002 Götz Waschk <waschk@linux-mandrake.com> 2.3.2.1-4mdk - remove unused patch - rebuild with gcc 3.2 * Wed Jun 5 2002 Alexander Skwar <ASkwar@DigitalProjects.com> 2.3.2.1-3mdk - Enable gizmos * Fri May 17 2002 Götz Waschk <waschk@linux-mandrake.com> 2.3.2.1-2mdk - disable gizmos, doesn't build with gcc3.1 - build with gcc3.1 * Sat Apr 20 2002 Alexander Skwar <ASkwar@DigitalProjects.com> 2.3.2.1-1mdk - First Mandrake release, based on spec by Robin Dunn <robin@alldunn.com>