pyver=$3
shift;shift;shift
+ver2=`echo ${version} | cut -c 1,2,3`
tarver=${tarname}-${version}
| sed s:@LCPORT@:${lcport}:g \
| sed s:@TARNAME@:${tarname}:g \
| sed s:@VERSION@:${version}:g \
+ | sed s:@VER2@:${ver2}:g \
> ${distdir}/wxPython${port}.spec
}
rm `find . -name .cvsignore`
rm *.spec
rm -rf demos
-# rm -rf docs
+# rm -rf docs
+ rm -rf docs/html
+ rm -rf docs/latex
rm -rf samples
rm -rf utils
# rm -rf include/wx/mgl
%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}
--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 \
%{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
# Tools and scripts
#----------------------------------------------------------------------
-TOOLS = [("wxPython/tools", glob.glob("tools/*.py")),
- ("wxPython/tools/XRCed", glob.glob("tools/XRCed/*.py") +
- glob.glob("tools/XRCed/*.xrc") +
- ["tools/XRCed/CHANGES",
- "tools/XRCed/TODO",
- "tools/XRCed/README"]),
- ]
+## TOOLS = [("wxPython/tools", glob.glob("tools/*.py")),
+## ("wxPython/tools/XRCed", glob.glob("tools/XRCed/*.py") +
+## glob.glob("tools/XRCed/*.xrc") +
+## ["tools/XRCed/CHANGES",
+## "tools/XRCed/TODO",
+## "tools/XRCed/README"]),
+## ]
+SCRIPTS = ['scripts/img2png',
+ 'scripts/img2xpm',
+ 'scripts/img2py',
+ 'scripts/xrced',
+ 'scripts/pyshell',
+ 'scripts/pycrust',
+ ],
##data_files = TOOLS,
- scripts = ['scripts/img2png',
- 'scripts/img2xpm',
- 'scripts/img2py',
- 'scripts/xrced',
- 'scripts/pyshell',
- 'scripts/pycrust',
- ],
+ scripts = SCRIPTS,
)
else: