%define lcport @LCPORT@
%define tarname @TARNAME@
%define version @VERSION@
-%define ver2 2.3
+%define ver2 @VER2@
%define release 1
%define wxpref %{pref}/lib/wxPython
+# Should --enable-debug_flag be used in release builds?
+%define debug_flag 1
+
+
%if %{debug}
%define name wxPython%{port}-py%{pyver}-dbg
%define othername wxPython%{port}-py%{pyver}
%endif
+%if %{debug} || %{debug_flag}
+ %define wxconfigname %{wxpref}/bin/wx%{lcport}d-%{ver2}-config
+%else
+ %define wxconfigname %{wxpref}/bin/wx%{lcport}-%{ver2}-config
+%endif
+
+
#----------------------------------------------------------------
Summary: Cross platform GUI toolkit for Python using wx%{port}
Name: %{name}
Source0: %{tarname}-%{version}.tar.gz
License: wxWindows Library Licence, Version 3
URL: http://wxPython.org/
-Packager: Robin Dunn <robind@alldunn.com>
+Packager: Robin Dunn <robin@alldunn.com>
Group: Development/Python
BuildRoot: %{_tmppath}/%{name}-buildroot
Prefix: %{pref}
../configure --with-%{lcport} \
--prefix=%{wxpref} \
--disable-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 \
#----------------------------------------------------------------
%install
-## ** [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
%find_lang wxstd
cd wxPython
%{python} setup.py \
#----------------------------------------------------------------
%clean
-#[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
+[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
#----------------------------------------------------------------
%{wxpref}/lib/libwx*
%{pref}/lib/python*
%{wxpref}/share/
-
+%{pref}/bin/*
%files devel
%defattr(-,root,root)
%{wxpref}/include/wx
%{wxpref}/lib/wx
-%if %{debug}
- %{wxpref}/bin/wx%{lcport}d-%{ver2}-config
-%else
- %{wxpref}/bin/wx%{lcport}-%{ver2}-config
-%endif
+%{wxconfigname}
%{wxpref}/bin/wx-config