1 %define pref
%{_prefix}
2 %define python @PYTHON@
6 %define lcport @LCPORT@
7 %define tarname @TARNAME@
8 %define version @VERSION@
11 %define wxpref
%{pref}/lib
/wxPython
13 # Should --enable-debug_flag be used in release builds?
18 %define name wxPython
%{port}-py%{pyver}-dbg
19 %define othername wxPython
%{port}-py%{pyver}
21 %define name wxPython
%{port}-py%{pyver}
22 %define othername wxPython
%{port}-py%{pyver}-dbg
26 %if %{debug} || %{debug_flag}
27 %define wxconfigname
%{wxpref}/bin/wx%{lcport}d-%{ver2}-config
29 %define wxconfigname
%{wxpref}/bin/wx%{lcport}-%{ver2}-config
33 #----------------------------------------------------------------
34 Summary: Cross platform GUI toolkit
for Python using wx
%{port}
38 Source0: %{tarname}-%{version}.tar.gz
39 License: wxWindows Library Licence
, Version 3
40 URL: http
://wxPython.org
/
41 Packager: Robin Dunn
<robin@alldunn.com
>
42 Group: Development
/Python
43 BuildRoot: %{_tmppath}/%{name}-buildroot
45 #BuildRequires: %{python}
48 Provides: wx
%{port} = %{version}
49 Provides: wxPython
= %{version}
52 # They conflict with each other, so let them replace each other
53 Obsoletes
: %{othername}
54 # old wxPython packages
59 wxPython is a GUI toolkit
for Python that is a wrapper around the
60 wxWindows C
++ GUI library. wxPython provides a large variety of
61 window types and controls
, all implemented with a native look and feel
62 (and native runtime speed
) on the platforms it is supported on.
64 This package is implemented using the
%{port} port of wxWindows
, and
65 includes the wx
%{port} shared libs and etc.
69 Summary: wxPython
%{port} development files
70 Group: Development
/Libraries
71 Requires: wxPython
%{port} = %{version}
75 This packages contains the headers and etc.
for building apps or
76 Python extension modules that use the same wx
%{port} shared libraries
79 #----------------------------------------------------------------
81 %setup -q
-n
%{tarname}-%{version}
84 #----------------------------------------------------------------
86 if [ "$SMP"
!= ""
]; then
95 # Configure, trying to reduce dependencies
96 ..
/configure
--with
-%{lcport} \
99 --enable-rpath
=%{wxpref}/lib \
106 --enable-debug_flag \
109 --with
-libjpeg
=builtin \
110 --with
-libpng
=builtin \
111 --with
-libtiff
=builtin \
112 --with
-zlib
=builtin \
114 ## --enable-debug_flag \
125 # ** Unfortunately we have to do a bit of installation here so wxPython
126 # can be built. Perhaps wx-config should be changed to be able to be
127 # used from the build dir, maybe with an --inplace flag... Move these
128 # three lines to %install if/when that happens.
129 [ "$RPM_BUILD_ROOT"
!= "
/"
] && rm -rf $RPM_BUILD_ROOT
131 make prefix
=$RPM_BUILD_ROOT
%{wxpref} install
139 WX_CONFIG
="$RPM_BUILD_ROOT
%{wxpref}/bin/wx-config --prefix=$RPM_BUILD_ROOT%{wxpref}" \
143 #----------------------------------------------------------------
150 WX_CONFIG
="$RPM_BUILD_ROOT
%{wxpref}/bin/wx-config --prefix=$RPM_BUILD_ROOT%{wxpref}" \
152 --root
=$RPM_BUILD_ROOT
154 # Since I want this RPM to be as generic as possible I won't let
155 # distutils copy the scripts, since it will mangle the #! line
156 # to use the real python pathname. Since some distros install
157 # python 2.2 as python2 and others as python, then I can't let
158 # it do that otherwise the dependencies will be fouled up. Copy
159 # them manually instead:
161 mkdir -p $RPM_BUILD_ROOT
/usr
/bin
169 cp scripts
/$s $RPM_BUILD_ROOT
/usr
/bin
175 #----------------------------------------------------------------
177 [ "$RPM_BUILD_ROOT"
!= "
/"
] && rm -rf $RPM_BUILD_ROOT
180 #----------------------------------------------------------------
185 #----------------------------------------------------------------
191 #----------------------------------------------------------------
193 %doc docs
/preamble.txt
194 %doc docs
/licence.txt
196 %doc docs
/changes.txt
197 %doc wxPython
/README.txt
198 %doc wxPython
/CHANGES.txt
199 %defattr(-,root
,root
)
207 %defattr(-,root
,root
)
211 %{wxpref}/bin
/wx
-config
214 #----------------------------------------------------------------