X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/73c7ae5aff03c821a489b4e93aed6d265b90f61c..05159a2750ed2cc5945a85bc5fc6849ad1a30e75:/wxPython/distrib/wxPythonFull.spec.in diff --git a/wxPython/distrib/wxPythonFull.spec.in b/wxPython/distrib/wxPythonFull.spec.in index 21873623d2..8dbf5154b6 100644 --- a/wxPython/distrib/wxPythonFull.spec.in +++ b/wxPython/distrib/wxPythonFull.spec.in @@ -6,10 +6,14 @@ %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} @@ -19,6 +23,13 @@ %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} @@ -27,7 +38,7 @@ Release: %{release} Source0: %{tarname}-%{version}.tar.gz License: wxWindows Library Licence, Version 3 URL: http://wxPython.org/ -Packager: Robin Dunn +Packager: Robin Dunn Group: Development/Python BuildRoot: %{_tmppath}/%{name}-buildroot Prefix: %{pref} @@ -91,6 +102,9 @@ cd build --enable-debug \ %else --enable-optimise \ +%if %{debug_flag} + --enable-debug_flag \ +%endif %endif --with-libjpeg=builtin \ --with-libpng=builtin \ @@ -121,26 +135,46 @@ make prefix=$RPM_BUILD_ROOT%{wxpref} install cd ../wxPython %{python} setup.py \ IN_CVS_TREE=1 \ + NO_SCRIPTS=1 \ WX_CONFIG="$RPM_BUILD_ROOT%{wxpref}/bin/wx-config --prefix=$RPM_BUILD_ROOT%{wxpref}" \ build #---------------------------------------------------------------- %install -## ** [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT %find_lang wxstd cd wxPython %{python} setup.py \ IN_CVS_TREE=1 \ + NO_SCRIPTS=1 \ WX_CONFIG="$RPM_BUILD_ROOT%{wxpref}/bin/wx-config --prefix=$RPM_BUILD_ROOT%{wxpref}" \ 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/usr/bin +for s in \ + img2png \ + img2py \ + img2xpm \ + pycrust \ + pyshell \ + xrced; do + cp scripts/$s $RPM_BUILD_ROOT/usr/bin +done + + #---------------------------------------------------------------- %clean -#[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT +[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT #---------------------------------------------------------------- @@ -166,18 +200,14 @@ cd wxPython %{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