Some refinements to my experimental RPM builder script and spec
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16219 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -14,13 +14,13 @@ fi
|
|||||||
# Initialization
|
# Initialization
|
||||||
|
|
||||||
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:/home/wxcvs
|
||||||
pythonbin=/usr/bin/python
|
pythonbin=/usr/bin/python
|
||||||
port=GTK
|
port=GTK
|
||||||
lcport=gtk
|
lcport=gtk
|
||||||
tarname=wxPythonFull
|
tarname=wxPythonSrc
|
||||||
debug=0
|
debug=0
|
||||||
|
|
||||||
|
|
||||||
@@ -54,6 +54,8 @@ version=$2
|
|||||||
pyver=$3
|
pyver=$3
|
||||||
shift;shift;shift
|
shift;shift;shift
|
||||||
|
|
||||||
|
tarver=${tarname}-${version}
|
||||||
|
|
||||||
|
|
||||||
python=${pythonbin}${pyver}
|
python=${pythonbin}${pyver}
|
||||||
if [ ! -e ${python} ]; then
|
if [ ! -e ${python} ]; then
|
||||||
@@ -71,6 +73,7 @@ function makespec {
|
|||||||
| 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 \
|
||||||
|
| sed s:@VERSION@:${version}:g \
|
||||||
> ${distdir}/wxPython${port}.spec
|
> ${distdir}/wxPython${port}.spec
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -93,8 +96,6 @@ for flag in $*; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
tarver=${tarname}-${version}
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
# Setup build dirs
|
# Setup build dirs
|
||||||
|
|
||||||
@@ -152,12 +153,11 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
# Make the spec file and copy to ${builddir}/${tarver}
|
# Make the spec file and copy to ${builddir}/${tarver} so it will be
|
||||||
|
# in the tar file when it's built
|
||||||
|
|
||||||
#if [ -z "${skiptar}" ]; then
|
makespec
|
||||||
makespec
|
cp ${distdir}/wxPython${port}.spec ${builddir}/${tarver}/wxPython${port}.spec
|
||||||
cp ${distdir}/wxPython${port}.spec ${builddir}/${tarver}/wxPython${port}.spec
|
|
||||||
#fi
|
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
@@ -190,6 +190,7 @@ if [ -z "${skiprpm}" ]; then
|
|||||||
echo "*** RPM failure, exiting."
|
echo "*** RPM failure, exiting."
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
|
echo "*** Moving RPMs to ${distdir}"
|
||||||
mv -f `find ${rpmtop} -name "wxPython*.rpm"` ${distdir}
|
mv -f `find ${rpmtop} -name "wxPython*.rpm"` ${distdir}
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@@ -5,14 +5,16 @@
|
|||||||
%define port @PORT@
|
%define port @PORT@
|
||||||
%define lcport @LCPORT@
|
%define lcport @LCPORT@
|
||||||
%define tarname @TARNAME@
|
%define tarname @TARNAME@
|
||||||
|
%define version @VERSION@
|
||||||
|
%define release 1
|
||||||
|
|
||||||
%if %{debug}
|
%if %{debug}
|
||||||
%define name wxPython%{port}_py%{pyver}_dbg
|
%define name wxPython%{port}-py%{pyver}-dbg
|
||||||
|
%define othername wxPython%{port}-py%{pyver}
|
||||||
%else
|
%else
|
||||||
%define name wxPython%{port}_py%{pyver}
|
%define name wxPython%{port}-py%{pyver}
|
||||||
|
%define othername wxPython%{port}-py%{pyver}-dbg
|
||||||
%endif
|
%endif
|
||||||
%define version 2.3.3pre5
|
|
||||||
%define release 1
|
|
||||||
|
|
||||||
|
|
||||||
Summary: Cross platform GUI toolkit for Python using wx%{port}
|
Summary: Cross platform GUI toolkit for Python using wx%{port}
|
||||||
@@ -28,21 +30,17 @@ BuildRoot: %{_tmppath}/%{name}-buildroot
|
|||||||
Prefix: %{pref}
|
Prefix: %{pref}
|
||||||
|
|
||||||
|
|
||||||
# They conflict with each other
|
|
||||||
%if %{debug}
|
|
||||||
Conflicts: wxPython%{port}_py%{pyver}
|
|
||||||
%else
|
|
||||||
Conflicts: wxPython%{port}_py%{pyver}_dbg
|
|
||||||
%endif
|
|
||||||
|
|
||||||
Provides: wxwin
|
Provides: wxwin
|
||||||
Provides: wx%{port} = %{version}
|
Provides: wx%{port} = %{version}
|
||||||
Provides: wxPython = %{version}
|
Provides: wxPython = %{version}
|
||||||
|
|
||||||
|
|
||||||
# ?? Obsoletes: wx%{port}, wxPython
|
# They conflict with each other, so let them replace each other
|
||||||
# Some funky mandrake names
|
Obsoletes: %{othername}
|
||||||
Conflicts: wxGTK2.3, wxGTK6
|
# old wx and wxPython packages
|
||||||
|
Obsoletes: wx%{port}, wxPython
|
||||||
|
# and some funky mandrake names
|
||||||
|
Obsoletes: wxGTK2.3, wxGTK6
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@@ -56,7 +54,7 @@ includes the wx%{port} shared libs and etc.
|
|||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -n %{tarname}-%{version}
|
%setup -q -n %{tarname}-%{version}
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@@ -83,6 +81,8 @@ cd build
|
|||||||
--with-libtiff=builtin \
|
--with-libtiff=builtin \
|
||||||
--with-zlib=builtin \
|
--with-zlib=builtin \
|
||||||
|
|
||||||
|
## --enable-debug_flag \
|
||||||
|
|
||||||
# Build wxWindows
|
# Build wxWindows
|
||||||
$MAKE
|
$MAKE
|
||||||
|
|
||||||
@@ -120,7 +120,7 @@ cd wxPython
|
|||||||
|
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
##[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
#[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
|
Reference in New Issue
Block a user