Make the RPM builder and .spec a little simpler
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@18184 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -10,8 +10,8 @@ Windows and Mac OS X binaries are built.
|
||||
|
||||
If you are reading this file then you are probably interested in
|
||||
building your own copy of wxPython from the sources contained in this
|
||||
file. If you wish to use the released wxGTK binary as has been done
|
||||
in the past then you can still follow the old build directions in
|
||||
archive. If you wish to use the released wxGTK binary as has been
|
||||
done in the past then you can still follow the old build directions in
|
||||
wxPython/BUILD.unix.txt. If you are building for Windows or Mac OS X
|
||||
then you should look at BUILD.win32.txt or BUILD.osx.txt respectivly.
|
||||
In all these cases you should use the IN_CVS_TREE=1 flag since this
|
||||
|
@@ -16,12 +16,11 @@ fi
|
||||
distdir=`pwd`/dist
|
||||
builddir=`pwd`/_build_rpm
|
||||
rpmtop=${builddir}/rpmtop
|
||||
cvsroot=:pserver:anoncvs@cvs.wxwindows.org:/home/wxcvs
|
||||
cvsroot=:pserver:anoncvs@cvs.wxwindows.org:/pack/cvsroots/wxwindows
|
||||
pythonbin=/usr/bin/python
|
||||
port=GTK
|
||||
lcport=gtk
|
||||
tarname=wxPythonSrc
|
||||
debug=0
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
@@ -40,7 +39,6 @@ function useage {
|
||||
echo " skiprpm Don't build the RPM (but why?)"
|
||||
echo " skipclean Don't do the cleanup at the end"
|
||||
echo " speconly Do nothing but write the RPM spec file"
|
||||
echo " debug Make a __WXDEBUG__ version"
|
||||
echo " smp Add SMP=2 to the envivonment to speed wxGTK build"
|
||||
}
|
||||
|
||||
@@ -70,7 +68,6 @@ function makespec {
|
||||
cat ${spectemplate} \
|
||||
| sed s:@PYTHON@:${python}:g \
|
||||
| sed s:@PYVER@:${pyver}:g \
|
||||
| sed s:@DEBUG@:${debug}:g \
|
||||
| sed s:@PORT@:${port}:g \
|
||||
| sed s:@LCPORT@:${lcport}:g \
|
||||
| sed s:@TARNAME@:${tarname}:g \
|
||||
@@ -88,7 +85,6 @@ for flag in $*; do
|
||||
skiptar) skiptar=1 ;;
|
||||
skiprpm) skiprpm=1 ;;
|
||||
smp) export SMP=2 ;;
|
||||
debug) debug=1 ;;
|
||||
speconly) makespec; exit 0 ;;
|
||||
|
||||
*) echo "Unknown flag \"${flag}\""
|
||||
@@ -190,7 +186,7 @@ fi
|
||||
if [ -z "${skiprpm}" ]; then
|
||||
echo "*** Building RPMs..."
|
||||
cp ${distdir}/${tarver}.tar.gz ${rpmtop}/SOURCES
|
||||
rpm -ba \
|
||||
rpmbuild -ba \
|
||||
--define "_topdir ${rpmtop}" \
|
||||
--define "_tmppath ${builddir}" \
|
||||
${distdir}/wxPython${port}.spec
|
||||
|
@@ -1,7 +1,6 @@
|
||||
%define pref %{_prefix}
|
||||
%define python @PYTHON@
|
||||
%define pyver @PYVER@
|
||||
%define debug @DEBUG@
|
||||
%define port @PORT@
|
||||
%define lcport @LCPORT@
|
||||
%define tarname @TARNAME@
|
||||
@@ -9,21 +8,16 @@
|
||||
%define ver2 @VER2@
|
||||
%define release 1
|
||||
%define wxpref %{pref}/lib/wxPython
|
||||
%define name wxPython%{port}-py%{pyver}
|
||||
|
||||
# Should --enable-debug_flag be used in release builds?
|
||||
# Using it defines __WXDEBUG__ and gives us runtime diagnostics
|
||||
# that are turned into Python exceptions starting with 2.3.4.
|
||||
%define debug_flag 1
|
||||
|
||||
|
||||
%if %{debug}
|
||||
%define name wxPython%{port}-py%{pyver}-dbg
|
||||
%define othername wxPython%{port}-py%{pyver}
|
||||
%else
|
||||
%define name wxPython%{port}-py%{pyver}
|
||||
%define othername wxPython%{port}-py%{pyver}-dbg
|
||||
%endif
|
||||
|
||||
|
||||
%if %{debug} || %{debug_flag}
|
||||
%if %{debug_flag}
|
||||
%define wxconfigname %{wxpref}/bin/wx%{lcport}d-%{ver2}-config
|
||||
%else
|
||||
%define wxconfigname %{wxpref}/bin/wx%{lcport}-%{ver2}-config
|
||||
@@ -49,8 +43,6 @@ Provides: wx%{port} = %{version}
|
||||
Provides: wxPython = %{version}
|
||||
|
||||
|
||||
# They conflict with each other, so let them replace each other
|
||||
Obsoletes: %{othername}
|
||||
# old wxPython packages
|
||||
Obsoletes: wxPython
|
||||
|
||||
@@ -99,13 +91,10 @@ $WXDIR/configure --with-%{lcport} \
|
||||
--disable-soname \
|
||||
--enable-rpath=%{wxpref}/lib \
|
||||
--with-opengl \
|
||||
%if %{debug}
|
||||
--enable-debug \
|
||||
%else
|
||||
--enable-geometry \
|
||||
--enable-optimise \
|
||||
%if %{debug_flag}
|
||||
--enable-debug_flag \
|
||||
%endif
|
||||
%endif
|
||||
--with-libjpeg=builtin \
|
||||
--with-libpng=builtin \
|
||||
|
Reference in New Issue
Block a user