Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > 9d044d930b217f372af0195095617b06 > files > 2

wxPythonGTK-2.8.8.1-1mdv2009.0.src.rpm

%define pref 	%{_prefix}
%define python 	%{_bindir}/python
%define pythonver 	2.3
%define debug 	0
%define port  	GTK
%define lcport 	gtk2u
%define tarname wxPython-src
%define version 2.8.8.1
%define ver2    2.8
%define release %mkrel 1
%define wxpref  %{pref}/lib/wxPython

# Should --enable-debug_flag be used in release builds?
%define debug_flag 0
%define name      wxPython%{port}
%define major %ver2
%define libname %mklibname %{name} %{major}

%define wxconfigname %{wxpref}/lib/wx/config/gtk2-unicode-release-%ver2

%{?!py_puresitedir:%define py_puresitedir %_libdir/python%pyver/site-packages}
#----------------------------------------------------------------
Summary:   Cross platform GUI toolkit for Python using wx%{port}
Name:      %{name}
Version:   %{version}
Release:   %{release}
Epoch:1
Source0:   http://prdownloads.sourceforge.net/wxpython/%{tarname}-%{version}.tar.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 >= %pythonver
BuildRequires: gtk2-devel
BuildRequires: SDL-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: libtiff-devel
BuildRequires: libgnomeprintui-devel

Provides: wxwin
Provides: wxPython  = %{version}
# old wxPython packages
Obsoletes: wxPython
Requires: %libname = %epoch:%version
Requires: %name-wxversion = %epoch:%version
%define _requires_exceptions libwx_
%define _provides_exceptions libwx_
 
%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 wxversion
Summary: Select a specific version of wxPython
Group: Development/Python
Conflicts: wxPythonGTK < 1:2.8.3.0-2

%description wxversion
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 contains the wxversion python module needed if several versions of
wxPython are installed.

%package tools
Summary: Example applications from wxPythonGTK
Group: Development/Python
Requires: %name = %epoch:%version

%description tools
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 contains the example applications that come with wxPython like
PyShell and XRCed.

%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 = %epoch:%version-%release
Requires: wxPython%{port} = %epoch:%{version}
Requires: %libname = %epoch:%{version}

%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}
mkdir bld

%build
WXDIR=`pwd`

# Configure and build wxWidgets
cd bld
# Configure, trying to reduce dependencies
../configure --with-%{lcport} \
	--prefix=%{wxpref} \
	--enable-monolithic \
	--disable-rpath \
	--with-opengl \
	--enable-geometry \
	--enable-optimise \
	--enable-sound 	--with-sdl \
	--enable-display \
%if %{debug}
	--enable-debug \
%else
	--enable-optimise \
%if %{debug_flag}
	--enable-debug_flag \
%endif
%endif
	--with-libjpeg=sys \
	--with-libpng=sys \
	--with-libtiff=sys \
	--with-zlib=sys \
        --enable-gtk2 \
        --enable-unicode \
	--enable-exceptions \
	--enable-catch_segvs \
##	--enable-debug_flag \
##	--with-odbc \


# Build wxWindows
make
#%make -C contrib/src/animate 
%make -C contrib/src/gizmos 
%make -C contrib/src/stc


cd ../locale
make allmo

# Now build wxPython
cd $WXDIR/wxPython
%{python} setup.py \
	WXPORT='gtk2'\
	UNICODE=1 \
	EP_ADD_OPTS=1 \
	NO_SCRIPTS=1 \
	WX_CONFIG="$WXDIR/bld/wx-config --no_rpath" \
       	build_ext --rpath=%{wxpref}/lib \
	build

%install
rm -rf %buildroot %name.lang
WXDIR=`pwd`

# Install wxGTK and contribs
cd bld
make prefix=$RPM_BUILD_ROOT%{wxpref} install
#make -C contrib/src/animate prefix=$RPM_BUILD_ROOT%{wxpref} install
make -C contrib/src/gizmos prefix=$RPM_BUILD_ROOT%{wxpref} install
make -C contrib/src/stc prefix=$RPM_BUILD_ROOT%{wxpref} install

cd $WXDIR/wxPython
%{python} setup.py \
	WXPORT='gtk2'\
	UNICODE=1 \
	EP_ADD_OPTS=1 \
	NO_SCRIPTS=1 \
	WX_CONFIG="$RPM_BUILD_ROOT%{wxpref}/bin/wx-config --prefix=$RPM_BUILD_ROOT%{wxpref} --no_rpath" \
       	build_ext --rpath=%{wxpref}/lib \
	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 \
	helpviewer \
	img2png \
	img2py \
	img2xpm \
	pyalacarte \
	pyalamode \
	pycrust \
	pywrap \
	pyshell \
	pywxrc \
	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

#menu
# install Mandriva menu items

mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
cat > $RPM_BUILD_ROOT%{_datadir}/applications/mandriva-pyshell.desktop << EOF
[Desktop Entry]
Name=PyShell
Comment=GUI Python Shell
Exec=%{_bindir}/pyshell %U
Icon=PyCrust
Terminal=false
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Development;X-MandrivaLinux-Development-Tools;
EOF
cat > $RPM_BUILD_ROOT%{_datadir}/applications/mandriva-pycrust.desktop << EOF
[Desktop Entry]
Name=PyCrust
Comment=GUI Python Shell with Filling
Exec=%{_bindir}/pycrust %U
Icon=PyCrust
Terminal=false
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Development;X-MandrivaLinux-Development-Tools;
EOF
cat > $RPM_BUILD_ROOT%{_datadir}/applications/mandriva-pyalamode.desktop << EOF
[Desktop Entry]
Name=PyAlaMode
Comment=GUI Python Shell with Filling and Editor Windows
Exec=%{_bindir}/pyalamode %U
Icon=PyCrust
Terminal=false
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Development;X-MandrivaLinux-Development-Tools;
EOF
cat > $RPM_BUILD_ROOT%{_datadir}/applications/mandriva-xrced.desktop << EOF
[Desktop Entry]
Name=XRCed
Comment=XRC resource editor for wxPython
Exec=%{_bindir}/xrced %U
Icon=XRCed
Terminal=false
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Development;X-MandrivaLinux-Development-Tools;
EOF



#icons
cd wxPython
mkdir -p %buildroot%_miconsdir
install -m 644 wx/py/PyCrust_16.png $RPM_BUILD_ROOT%_miconsdir/PyCrust.png
install -m 644 wx/py/PyCrust_32.png $RPM_BUILD_ROOT%_iconsdir/PyCrust.png
install -m 644 wx/tools/XRCed/XRCed_16.png $RPM_BUILD_ROOT%{_miconsdir}/XRCed.png
install -m 644 wx/tools/XRCed/XRCed_32.png $RPM_BUILD_ROOT%{_iconsdir}/XRCed.png

#gw fix paths
%if %_lib != lib
mv %buildroot%py_puresitedir/* %buildroot%py_platsitedir
%endif


%clean
rm -rf $RPM_BUILD_ROOT

%if %mdkversion < 200900
%post tools
%update_menus
%endif
%if %mdkversion < 200900
%postun tools
%clean_menus
%endif

%if %mdkversion < 200900
%post -n %libname -p /sbin/ldconfig
%endif
%if %mdkversion < 200900
%postun -n %libname -p /sbin/ldconfig
%endif


%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
%py_platsitedir/wx.pth
%py_platsitedir/wx*-*
%py_platsitedir/wxaddons*
%dir %{wxpref}
%dir %{wxpref}/share/
%dir %{wxpref}/share/locale
%{wxpref}/share/bakefile

%files tools
%defattr(-,root,root)
%{pref}/bin/*
%_datadir/applications/mandriva-*
%_iconsdir/*.png
%_miconsdir/*.png

%files wxversion
%defattr(-,root,root)
%py_platsitedir/wxversion*

%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-%ver2/
%{wxpref}/lib/*.so
%{wxpref}/lib/wx
%dir %{wxpref}/share/aclocal
%{wxpref}/share/aclocal/wxwin.m4
%dir %{wxpref}/bin
%{wxpref}/bin/wx-config
%{wxpref}/bin/wxrc*


%changelog
* Mon Jul 21 2008 Götz Waschk <waschk@mandriva.org> 1:2.8.8.1-1mdv2009.0
+ Revision: 239366
- new version

* Thu Jun 26 2008 Götz Waschk <waschk@mandriva.org> 1:2.8.8.0-1mdv2009.0
+ Revision: 229258
- fix buildrequires
- new version

  + Pixel <pixel@mandriva.com>
    - rpm filetriggers deprecates update_menus/update_scrollkeeper/update_mime_database/update_icon_cache/update_desktop_database/post_install_gconf_schemas
    - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers

* Tue Apr 15 2008 Götz Waschk <waschk@mandriva.org> 1:2.8.7.1-4mdv2009.0
+ Revision: 193697
- fix deps

* Wed Apr 09 2008 Götz Waschk <waschk@mandriva.org> 1:2.8.7.1-3mdv2009.0
+ Revision: 192490
- split example programs to the tools package

* Fri Feb 08 2008 Thierry Vignaud <tvignaud@mandriva.com> 1:2.8.7.1-2mdv2008.1
+ Revision: 163971
- drop old menu
- fix mesaglu-devel BR
- kill re-definition of %%buildroot on Pixel's request

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

* Sat Dec 01 2007 Götz Waschk <waschk@mandriva.org> 1:2.8.7.1-1mdv2008.1
+ Revision: 114276
- new version

* Mon Oct 29 2007 Götz Waschk <waschk@mandriva.org> 1:2.8.6.1-1mdv2008.1
+ Revision: 102943
- new version

  + Thierry Vignaud <tvignaud@mandriva.com>
    - kill hardcoded icon extension
    - s/Mandrake/Mandriva/

* Wed Sep 12 2007 Götz Waschk <waschk@mandriva.org> 1:2.8.4.2-2mdv2008.0
+ Revision: 84620
- fix deps and provides (bug #33480)

  + Thierry Vignaud <tvignaud@mandriva.com>
    - kill desktop-file-validate's 'warning: key "Encoding" in group "Desktop Entry" is deprecated'

* Thu Aug 09 2007 Götz Waschk <waschk@mandriva.org> 1:2.8.4.2-1mdv2008.0
+ Revision: 60703
- new version
- drop the patch

* Tue Jul 10 2007 Anssi Hannula <anssi@mandriva.org> 1:2.8.4.0-3mdv2008.0
+ Revision: 51030
- add conflicts with old wxPythonGTK to ensure smooth upgrade

* Wed Jun 27 2007 Götz Waschk <waschk@mandriva.org> 1:2.8.4.0-2mdv2008.0
+ Revision: 44891
- fix for new gslice

* Wed May 16 2007 Götz Waschk <waschk@mandriva.org> 1:2.8.4.0-1mdv2008.0
+ Revision: 27164
- new version

* Thu May 10 2007 Götz Waschk <waschk@mandriva.org> 1:2.8.3.0-2mdv2008.0
+ Revision: 25902
- split out wxversion

* Wed Apr 18 2007 Götz Waschk <waschk@mandriva.org> 1:2.8.3.0-1mdv2008.0
+ Revision: 14733
- new version
- drop animate extension


* Thu Nov 30 2006 Götz Waschk <waschk@mandriva.org> 2.6.3.3-1mdv2007.0
+ Revision: 88876
- back to wxpython 2.6, as required by bittorrent

* Tue Nov 28 2006 Götz Waschk <waschk@mandriva.org> 2.7.2.0-2mdv2007.1
+ Revision: 88096
- add new files
- new version
- drop animate extension
- Import wxPythonGTK

* Wed Oct 04 2006 Götz Waschk <waschk@mandriva.org> 2.6.3.3-3mdv2007.0
- fix python path on lib64 architecture (bug #23427)

* Thu Jul 20 2006 Jerome Martin <jmartin@mandriva.org> 2.6.3.3-2mdv2007.0
- Fix BuildRequires for backport

* Mon Jul 17 2006 Götz Waschk <waschk@mandriva.org> 2.6.3.3-1mdv2007.0
- update file list
- New release 2.6.3.3

* Thu Jun 22 2006 Götz Waschk <waschk@mandriva.org> 2.6.3.2-4mdv2007.0
- fix deps of the devel package
- xdg menu

* Mon Jun 19 2006 Stefan van der Eijk <stefan@eijk.nu> 2.6.3.2-1mdv2007.0
- rebuild for png

* Sun Jun 18 2006 Götz Waschk <waschk@mandriva.org> 2.6.3.2-2mdv2007.0
- fix buildrequires

* Thu Apr 06 2006 Götz Waschk <waschk@mandriva.org> 2.6.3.2-1mdk
- New release 2.6.3.2

* Wed Mar 29 2006 Götz Waschk <waschk@mandriva.org> 2.6.3.0-1mdk
- New release 2.6.3.0

* Mon Jan 23 2006 Götz Waschk <waschk@mandriva.org> 2.6.2.1-2mdk
- fix build with new python

* Wed Jan 11 2006 Götz Waschk <waschk@mandriva.org> 2.6.2.1-1mdk
- update file list
- New release 2.6.2.1
- use mkrel

* Mon Jun 06 2005 Götz Waschk <waschk@mandriva.org> 2.6.1.0-1mdk
- New release 2.6.1.0

* Wed Jun 01 2005 Götz Waschk <waschk@mandriva.org> 2.6.0.1-1mdk
- New release 2.6.0.1

* Thu Apr 28 2005 Götz Waschk <waschk@mandriva.org> 2.6.0.0-1mdk
- add menu entries
- drop the patch
- New release 2.6.0.0

* Sat Apr 23 2005 Götz Waschk <waschk@mandriva.org> 2.5.5.1-3mdk
- patch to support G_FILENAME_ENCODING=@locale

* Wed Apr 20 2005 Götz Waschk <waschk@mandriva.org> 2.5.5.1-2mdk
- switch to system versions of the graphics libraries
- fix build, using the official spec as a template

* Tue Apr 19 2005 Götz Waschk <waschk@linux-mandrake.com> 2.5.5.1-1mdk
- bump major
- New release 2.5.5.1
- drop the patch

* 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 03 2004 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 2.5.2.7-3mdk
- fix build on x86_64

* Sat Sep 18 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

* Mon Aug 16 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

* Tue Jun 15 2004 Laurent MONTEL <lmontel@mandrakesoft.com> 2.5.1.5-2mdk
- Rebuild

* Tue Apr 06 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 02 2003 Götz Waschk <waschk@linux-mandrake.com> 2.4.2.4-2mdk
- rebuild for missing package