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
|
If you are reading this file then you are probably interested in
|
||||||
building your own copy of wxPython from the sources contained in this
|
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
|
archive. If you wish to use the released wxGTK binary as has been
|
||||||
in the past then you can still follow the old build directions in
|
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
|
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.
|
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
|
In all these cases you should use the IN_CVS_TREE=1 flag since this
|
||||||
|
@@ -16,12 +16,11 @@ fi
|
|||||||
distdir=`pwd`/dist
|
distdir=`pwd`/dist
|
||||||
builddir=`pwd`/_build_rpm
|
builddir=`pwd`/_build_rpm
|
||||||
rpmtop=${builddir}/rpmtop
|
rpmtop=${builddir}/rpmtop
|
||||||
cvsroot=:pserver:anoncvs@cvs.wxwindows.org:/home/wxcvs
|
cvsroot=:pserver:anoncvs@cvs.wxwindows.org:/pack/cvsroots/wxwindows
|
||||||
pythonbin=/usr/bin/python
|
pythonbin=/usr/bin/python
|
||||||
port=GTK
|
port=GTK
|
||||||
lcport=gtk
|
lcport=gtk
|
||||||
tarname=wxPythonSrc
|
tarname=wxPythonSrc
|
||||||
debug=0
|
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
@@ -40,7 +39,6 @@ function useage {
|
|||||||
echo " skiprpm Don't build the RPM (but why?)"
|
echo " skiprpm Don't build the RPM (but why?)"
|
||||||
echo " skipclean Don't do the cleanup at the end"
|
echo " skipclean Don't do the cleanup at the end"
|
||||||
echo " speconly Do nothing but write the RPM spec file"
|
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"
|
echo " smp Add SMP=2 to the envivonment to speed wxGTK build"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -70,7 +68,6 @@ function makespec {
|
|||||||
cat ${spectemplate} \
|
cat ${spectemplate} \
|
||||||
| sed s:@PYTHON@:${python}:g \
|
| sed s:@PYTHON@:${python}:g \
|
||||||
| sed s:@PYVER@:${pyver}:g \
|
| sed s:@PYVER@:${pyver}:g \
|
||||||
| sed s:@DEBUG@:${debug}:g \
|
|
||||||
| sed s:@PORT@:${port}:g \
|
| sed s:@PORT@:${port}:g \
|
||||||
| sed s:@LCPORT@:${lcport}:g \
|
| sed s:@LCPORT@:${lcport}:g \
|
||||||
| sed s:@TARNAME@:${tarname}:g \
|
| sed s:@TARNAME@:${tarname}:g \
|
||||||
@@ -88,7 +85,6 @@ for flag in $*; do
|
|||||||
skiptar) skiptar=1 ;;
|
skiptar) skiptar=1 ;;
|
||||||
skiprpm) skiprpm=1 ;;
|
skiprpm) skiprpm=1 ;;
|
||||||
smp) export SMP=2 ;;
|
smp) export SMP=2 ;;
|
||||||
debug) debug=1 ;;
|
|
||||||
speconly) makespec; exit 0 ;;
|
speconly) makespec; exit 0 ;;
|
||||||
|
|
||||||
*) echo "Unknown flag \"${flag}\""
|
*) echo "Unknown flag \"${flag}\""
|
||||||
@@ -190,7 +186,7 @@ fi
|
|||||||
if [ -z "${skiprpm}" ]; then
|
if [ -z "${skiprpm}" ]; then
|
||||||
echo "*** Building RPMs..."
|
echo "*** Building RPMs..."
|
||||||
cp ${distdir}/${tarver}.tar.gz ${rpmtop}/SOURCES
|
cp ${distdir}/${tarver}.tar.gz ${rpmtop}/SOURCES
|
||||||
rpm -ba \
|
rpmbuild -ba \
|
||||||
--define "_topdir ${rpmtop}" \
|
--define "_topdir ${rpmtop}" \
|
||||||
--define "_tmppath ${builddir}" \
|
--define "_tmppath ${builddir}" \
|
||||||
${distdir}/wxPython${port}.spec
|
${distdir}/wxPython${port}.spec
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
%define pref %{_prefix}
|
%define pref %{_prefix}
|
||||||
%define python @PYTHON@
|
%define python @PYTHON@
|
||||||
%define pyver @PYVER@
|
%define pyver @PYVER@
|
||||||
%define debug @DEBUG@
|
|
||||||
%define port @PORT@
|
%define port @PORT@
|
||||||
%define lcport @LCPORT@
|
%define lcport @LCPORT@
|
||||||
%define tarname @TARNAME@
|
%define tarname @TARNAME@
|
||||||
@@ -9,21 +8,16 @@
|
|||||||
%define ver2 @VER2@
|
%define ver2 @VER2@
|
||||||
%define release 1
|
%define release 1
|
||||||
%define wxpref %{pref}/lib/wxPython
|
%define wxpref %{pref}/lib/wxPython
|
||||||
|
%define name wxPython%{port}-py%{pyver}
|
||||||
|
|
||||||
# Should --enable-debug_flag be used in release builds?
|
# 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
|
%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_flag}
|
||||||
%if %{debug} || %{debug_flag}
|
|
||||||
%define wxconfigname %{wxpref}/bin/wx%{lcport}d-%{ver2}-config
|
%define wxconfigname %{wxpref}/bin/wx%{lcport}d-%{ver2}-config
|
||||||
%else
|
%else
|
||||||
%define wxconfigname %{wxpref}/bin/wx%{lcport}-%{ver2}-config
|
%define wxconfigname %{wxpref}/bin/wx%{lcport}-%{ver2}-config
|
||||||
@@ -49,8 +43,6 @@ Provides: wx%{port} = %{version}
|
|||||||
Provides: wxPython = %{version}
|
Provides: wxPython = %{version}
|
||||||
|
|
||||||
|
|
||||||
# They conflict with each other, so let them replace each other
|
|
||||||
Obsoletes: %{othername}
|
|
||||||
# old wxPython packages
|
# old wxPython packages
|
||||||
Obsoletes: wxPython
|
Obsoletes: wxPython
|
||||||
|
|
||||||
@@ -99,13 +91,10 @@ $WXDIR/configure --with-%{lcport} \
|
|||||||
--disable-soname \
|
--disable-soname \
|
||||||
--enable-rpath=%{wxpref}/lib \
|
--enable-rpath=%{wxpref}/lib \
|
||||||
--with-opengl \
|
--with-opengl \
|
||||||
%if %{debug}
|
--enable-geometry \
|
||||||
--enable-debug \
|
|
||||||
%else
|
|
||||||
--enable-optimise \
|
--enable-optimise \
|
||||||
%if %{debug_flag}
|
%if %{debug_flag}
|
||||||
--enable-debug_flag \
|
--enable-debug_flag \
|
||||||
%endif
|
|
||||||
%endif
|
%endif
|
||||||
--with-libjpeg=builtin \
|
--with-libjpeg=builtin \
|
||||||
--with-libpng=builtin \
|
--with-libpng=builtin \
|
||||||
|
Reference in New Issue
Block a user