Starting to update the tarball and rpm spec files for 2.5. Mostly

done but some fine tuning still needs done.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25147 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2004-01-13 03:42:43 +00:00
parent 47e8744686
commit 59455c67d4
2 changed files with 143 additions and 103 deletions

View File

@ -2,6 +2,8 @@
#---------------------------------------------------------------------- #----------------------------------------------------------------------
# Build an RPM containing both wxGTK and wxPython # Build an RPM containing both wxGTK and wxPython
##set -o xtrace
spectemplate=distrib/wxPythonFull.spec.in spectemplate=distrib/wxPythonFull.spec.in
if [ ! -d wxPython -o ! -e ${spectemplate} ]; then if [ ! -d wxPython -o ! -e ${spectemplate} ]; then
@ -13,6 +15,7 @@ fi
#---------------------------------------------------------------------- #----------------------------------------------------------------------
# Initialization # Initialization
version=`python -c "import setup;print setup.VERSION"`
wxpdir=`pwd` wxpdir=`pwd`
wxdir=${wxpdir}/.. wxdir=${wxpdir}/..
distdir=${wxpdir}/dist distdir=${wxpdir}/dist
@ -29,9 +32,8 @@ rpmflag=-ba
#---------------------------------------------------------------------- #----------------------------------------------------------------------
# Check parameters # Check parameters
function useage { function usage {
echo "Usage: $0 wx_version py_version [command flags...]" echo "Usage: $0 py_version [command flags...]"
echo " wx_version String to use for version in filenames, etc."
echo " py_version String to append to $pythonbin (which python" echo " py_version String to append to $pythonbin (which python"
echo " version to use.)" echo " version to use.)"
echo "" echo ""
@ -48,13 +50,12 @@ function useage {
} }
if [ $# -lt 2 ]; then if [ $# -lt 2 ]; then
useage usage
exit 1 exit 1
fi fi
version=$1 pyver=$1
pyver=$2 shift
shift;shift
ver2=`echo ${version} | cut -c 1,2,3` ver2=`echo ${version} | cut -c 1,2,3`
tarver=${tarname}-${version} tarver=${tarname}-${version}
@ -95,7 +96,7 @@ for flag in $*; do
srpm) rpmflag=-bs; ;; srpm) rpmflag=-bs; ;;
*) echo "Unknown flag \"${flag}\"" *) echo "Unknown flag \"${flag}\""
useage usage
exit 1 exit 1
esac esac
done done
@ -124,6 +125,14 @@ done
#---------------------------------------------------------------------- #----------------------------------------------------------------------
# Copy the sources from my CVS workspace # Copy the sources from my CVS workspace
function cleanup {
RMFILES=`find . -name "$1"`
if [ "$RMFILES" != "" ]; then
rm -rf $RMFILES
fi
}
if [ -z "${skipcopy}" ]; then if [ -z "${skipcopy}" ]; then
echo "*** Copying CVS tree" echo "*** Copying CVS tree"
pushd ${builddir} > /dev/null pushd ${builddir} > /dev/null
@ -136,7 +145,7 @@ if [ -z "${skipcopy}" ]; then
cp -pf --link ${wxdir}/* ${tarver} > /dev/null 2>&1 cp -pf --link ${wxdir}/* ${tarver} > /dev/null 2>&1
# copy all top dirs except CVS, build, demos, utils, samples, and wxPython # copy all top dirs except CVS, build, demos, utils, samples, and wxPython
for d in art contrib debian distrib docs include lib locale misc patches src; do for d in art build contrib debian distrib docs include lib locale misc patches src; do
if [ -e ${wxdir}/$d ]; then if [ -e ${wxdir}/$d ]; then
cp -Rpf --link ${wxdir}/$d ${tarver} #> /dev/null 2>&1 cp -Rpf --link ${wxdir}/$d ${tarver} #> /dev/null 2>&1
fi fi
@ -145,36 +154,36 @@ if [ -z "${skipcopy}" ]; then
# now do the same thing for wxPython, skipping it's build dirs and such # now do the same thing for wxPython, skipping it's build dirs and such
mkdir ${tarver}/wxPython mkdir ${tarver}/wxPython
cp -pf --link ${wxdir}/wxPython/* ${tarver}/wxPython > /dev/null 2>&1 cp -pf --link ${wxdir}/wxPython/* ${tarver}/wxPython > /dev/null 2>&1
for d in contrib demo distrib distutils docs licence samples scripts src wx wxPython; do for d in contrib demo distrib distutils docs include licence samples scripts src SWIG wx wxPython; do
cp -Rpf --link ${wxdir}/wxPython/$d ${tarver}/wxPython #> /dev/null 2>&1 cp -Rpf --link ${wxdir}/wxPython/$d ${tarver}/wxPython #> /dev/null 2>&1
done done
# cp -Rpf --link ${wxdir}/* ${tarver} > /dev/null 2>&1
# rm -r ${tarver}/bld*
# rm -r ${tarver}/wxPython/build*
# rm -r ${tarver}/wxPython/_build_rpm
echo "*** Removing uneeded stuff from copy of CVS tree" echo "*** Removing uneeded stuff from copy of CVS tree"
pushd ${tarver} > /dev/null pushd ${tarver} > /dev/null
rm `find . -name .cvsignore` cleanup .cvsignore
rm -rf `find . -name CVS` cleanup CVS
cleanup CVSROOT
rm BuildCVS.txt
rm *.spec rm *.spec
rm -rf docs/html rm -rf docs/html
rm -rf docs/latex rm -rf docs/latex
rm -rf contrib/docs rm -rf contrib/docs
rm -rf contrib/samples rm -rf contrib/samples
rm locale/*.mo rm locale/*.mo
rm `find . -name ".#*"` cleanup ".#*"
rm `find . -name "*~"` cleanup "*~"
rm `find . -name "*.pyc"` cleanup "*.pyc"
rm `find . -name "core"` cleanup core
rm `find . -name "core.[0-9]*"` cleanup "core.[0-9]*"
rm -f wxPython/wxPython/* > /dev/null 2>&1 rm -f wxPython/wx/* > /dev/null 2>&1
rm wxPython/demo/.setup.sh rm wxPython/demo/.setup.sh
rm -rf wxPython/contrib/art2d rm -r wxPython/docs/xml-raw
rm -rf wxPython/contrib/canvas
rm -rf wxPython/contrib/canvas2
rm -rf wxPython/contrib/gizmos/contrib
rm -rf wxPython/contrib/ogl/contrib
rm -rf wxPython/contrib/stc/contrib
rm -rf wxPython/contrib/xrc/contrib
popd > /dev/null popd > /dev/null
popd > /dev/null popd > /dev/null

View File

@ -52,10 +52,10 @@ Prefix: %{pref}
Provides: wxPython = %{version} Provides: wxPython = %{version}
Provides: wxPython%{port} = %{version} Provides: wxPython%{port} = %{version}
Provides: libwx_%{lcport}%{uniflg}%{dbgflg}-%{ver2}.so # Provides: libwx_%{lcport}%{uniflg}%{dbgflg}-%{ver2}.so
Provides: libwx_%{lcport}%{uniflg}%{dbgflg}-%{ver2}.so(WX%{port}%{UNIFLG}%{DBGFLG}_%{ver2}) # Provides: libwx_%{lcport}%{uniflg}%{dbgflg}-%{ver2}.so(WX%{port}%{UNIFLG}%{DBGFLG}_%{ver2})
Provides: libwx_%{lcport}%{uniflg}%{dbgflg}_gl-%{ver2}.so # Provides: libwx_%{lcport}%{uniflg}%{dbgflg}_gl-%{ver2}.so
Provides: libwx_%{lcport}%{uniflg}%{dbgflg}_gl-%{ver2}.so(WX%{port}%{UNIFLG}%{DBGFLG}_%{ver2}) # Provides: libwx_%{lcport}%{uniflg}%{dbgflg}_gl-%{ver2}.so(WX%{port}%{UNIFLG}%{DBGFLG}_%{ver2})
# old wxPython packages # old wxPython packages
@ -90,20 +90,16 @@ that wxPython uses.
#---------------------------------------------------------------- #----------------------------------------------------------------
%build %build
if [ "$SMP" != "" ]; then
MAKE="make -j$SMP"
else
MAKE="make"
fi
WXDIR=`pwd` WXDIR=`pwd`
mkdir build mkdir bld
cd build cd bld
# Configure, trying to reduce external dependencies # Configure, trying to reduce external dependencies
$WXDIR/configure --with-%{lcport} \ ../configure --with-%{lcport} \
--prefix=%{wxpref} \ --prefix=%{wxpref} \
--disable-soname \ --disable-soname \
--disable-monolithic \
--enable-rpath=%{wxpref}/lib \ --enable-rpath=%{wxpref}/lib \
--with-opengl \ --with-opengl \
%if %{unicode} %if %{unicode}
@ -123,55 +119,43 @@ $WXDIR/configure --with-%{lcport} \
%endif %endif
# Build wxWindows # Build wxWindows and some contrib libs
$MAKE make
make -C contrib/src/gizmos
make -C contrib/src/ogl CXXFLAGS="-DwxUSE_DEPRECATED=0"
make -C contrib/src/stc
make -C contrib/src/xrc
# Install wxWindows and the contribs so the wxPython build can find
# all the headers it needs
make prefix=$RPM_BUILD_ROOT%{wxpref} install
make -C contrib/src/gizmos prefix=$RPM_BUILD_ROOT%{wxpref} install
make -C contrib/src/ogl CXXFLAGS="-DwxUSE_DEPRECATED=0" prefix=$RPM_BUILD_ROOT%{wxpref} install
make -C contrib/src/stc prefix=$RPM_BUILD_ROOT%{wxpref} install
make -C contrib/src/xrc prefix=$RPM_BUILD_ROOT%{wxpref} install
# Now build wxPython # Now build wxPython
cd $WXDIR/wxPython cd $WXDIR/wxPython
%{python} setup.py \ %{python} setup.py \
IN_CVS_TREE=1 \
NO_SCRIPTS=1 \ NO_SCRIPTS=1 \
WXPORT=%{lcport} \ WXPORT=%{lcport} \
UNICODE=%{unicode} \ UNICODE=%{unicode} \
WX_CONFIG="$WXDIR/build/wx-config --prefix=$WXDIR --exec-prefix=$WXDIR/build" \ WX_CONFIG="$RPM_BUILD_ROOT%{wxpref}/bin/wx-config --prefix=$RPM_BUILD_ROOT%{wxpref}" \
build build
## $WXDIR/bld/wx-config --prefix=$WXDIR --exec-prefix=$WXDIR/bld"
# Build wxrc (XRC resource tool)
# Build wxrc (XRC resource tool) but don't use the makefiles since they expect cd $WXDIR/bld/contrib/utils/wxrc
# a shared version of the xrc lib to have been built... make
cd $WXDIR/contrib/utils/wxrc
WX_CONFIG="$WXDIR/build/wx-config --prefix=$WXDIR --exec-prefix=$WXDIR/build"
wCC=`$WX_CONFIG --cc`
wCXX=`$WX_CONFIG --cxx`
for f in wxrc.cpp ../../src/xrc/xml.cpp ../../src/xrc/xmlres.cpp; do
echo $f
$wCXX `$WX_CONFIG --cxxflags` -I ../../include -I ../../src/xrc/expat/xmlparse -I ../../src/xrc/expat/xmltok -c $f
done
for f in ../../src/xrc/expat/xmlparse/xmlparse.c ../../src/xrc/expat/xmltok/xmlrole.c ../../src/xrc/expat/xmltok/xmltok.c; do
echo $f
$wCC `$WX_CONFIG --cxxflags` -I ../../include -I ../../src/xrc/expat/xmlparse -I ../../src/xrc/expat/xmltok -c $f
done
$wCXX `$WX_CONFIG --libs` *.o -o wxrc
strip wxrc strip wxrc
#----------------------------------------------------------------
%install
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
# install wxWindows
WXDIR=`pwd`
cd build
make prefix=$RPM_BUILD_ROOT%{wxpref} install
# install wxPython # install wxPython
cd $WXDIR/wxPython cd $WXDIR/wxPython
%{python} setup.py \ %{python} setup.py \
IN_CVS_TREE=1 \
NO_SCRIPTS=1 \ NO_SCRIPTS=1 \
WXPORT=%{lcport} \ WXPORT=%{lcport} \
UNICODE=%{unicode} \ UNICODE=%{unicode} \
@ -179,14 +163,52 @@ cd $WXDIR/wxPython
install \ install \
--root=$RPM_BUILD_ROOT --root=$RPM_BUILD_ROOT
#----------------------------------------------------------------
%install
##[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
WXDIR=`pwd`
# # install wxWindows
# cd bld
# make prefix=$RPM_BUILD_ROOT%{wxpref} install
# make -C contrib/src/gizmos prefix=$RPM_BUILD_ROOT%{wxpref} install
# make -C contrib/src/ogl CXXFLAGS="-DwxUSE_DEPRECATED=0" prefix=$RPM_BUILD_ROOT%{wxpref} install
# make -C contrib/src/stc prefix=$RPM_BUILD_ROOT%{wxpref} install
# make -C contrib/src/xrc prefix=$RPM_BUILD_ROOT%{wxpref} install
# # install wxPython
# cd $WXDIR/wxPython
# %{python} setup.py \
# NO_SCRIPTS=1 \
# WXPORT=%{lcport} \
# UNICODE=%{unicode} \
# WX_CONFIG="$RPM_BUILD_ROOT%{wxpref}/bin/wx-config --prefix=$RPM_BUILD_ROOT%{wxpref}" \
# install \
# --root=$RPM_BUILD_ROOT
# Other "install" tasks...
cd $WXDIR/wxPython
# install the wxPython headers
cp -R include $RPM_BUILD_ROOT%{wxpref}
mkdir -p $RPM_BUILD_ROOT%{wxpref}/include/wx/wxPython/i_files
cp src/*.i $RPM_BUILD_ROOT%{wxpref}/include/wx/wxPython/i_files
# Since I want this RPM to be as generic as possible I won't let # 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 # distutils copy the scripts (NO_SCRIPTS=1 above) since it will mangle
# the real python pathname. Since some distros install python 2.2 as # the #! line to use the real python pathname. Since some distros
# python2 and others as python, then I can't let distutils do that # install python 2.2 as python2 and others as python I can't let
# otherwise the dependencies will be fouled up. Copy them manually # distutils do that otherwise the dependencies will be fouled up.
# instead, leaving the #!/bin/env line intact. # Copy them manually instead, leaving the #!/bin/env line intact.
# # TODO: Should this be dependent on %{builtin_libs} or something like
# TODO: Should this be dependent on %{builtin_libs} or something like it? # it?
mkdir -p $RPM_BUILD_ROOT%{pref}/bin mkdir -p $RPM_BUILD_ROOT%{pref}/bin
for s in \ for s in \
@ -205,7 +227,7 @@ done
# Install wxrc # Install wxrc
cp $WXDIR/contrib/utils/wxrc/wxrc $RPM_BUILD_ROOT%{pref}/bin cp $WXDIR/bld/contrib/utils/wxrc/wxrc $RPM_BUILD_ROOT%{pref}/bin
# link specific name to generic name # link specific name to generic name
@ -213,6 +235,7 @@ ln -s wxPython-%{version} $RPM_BUILD_ROOT%{wxprefbase}
# Copy icons and make menu entries # Copy icons and make menu entries
#-- This only works for Mandrake. Is there a cross-distro way to do it? #-- This only works for Mandrake. Is there a cross-distro way to do it?
##mkdir -p $RPM_BUILD_ROOT%{_iconsdir} ##mkdir -p $RPM_BUILD_ROOT%{_iconsdir}
@ -250,26 +273,26 @@ ln -s wxPython-%{version} $RPM_BUILD_ROOT%{wxprefbase}
# So instead we'll build some explicit filelists here and use %attr on # So instead we'll build some explicit filelists here and use %attr on
# each entry. # each entry.
cd $WXDIR cd $WXDIR
mkdir -p $RPM_BUILD_ROOT%{pref}/share/doc # mkdir -p $RPM_BUILD_ROOT%{pref}/share/doc
GFL="%{python} wxPython/distrib/genfilelist.py" # GFL="%{python} wxPython/distrib/genfilelist.py"
$GFL $RPM_BUILD_ROOT %{pref} > FILELIST # $GFL $RPM_BUILD_ROOT %{pref} > FILELIST
$GFL -r $RPM_BUILD_ROOT %{pref}/bin >> FILELIST # $GFL -r $RPM_BUILD_ROOT %{pref}/bin >> FILELIST
$GFL $RPM_BUILD_ROOT %{pref}/lib >> FILELIST # $GFL $RPM_BUILD_ROOT %{pref}/lib >> FILELIST
$GFL -r $RPM_BUILD_ROOT %{pref}/lib/python%{pyver} >> FILELIST # $GFL -r $RPM_BUILD_ROOT %{pref}/lib/python%{pyver} >> FILELIST
$GFL -r $RPM_BUILD_ROOT %{pref}/share >> FILELIST # $GFL -r $RPM_BUILD_ROOT %{pref}/share >> FILELIST
$GFL $RPM_BUILD_ROOT %{wxpref} >> FILELIST # $GFL $RPM_BUILD_ROOT %{wxpref} >> FILELIST
$GFL $RPM_BUILD_ROOT %{wxprefbase} >> FILELIST # $GFL $RPM_BUILD_ROOT %{wxprefbase} >> FILELIST
$GFL $RPM_BUILD_ROOT %{wxpref}/lib >> FILELIST # $GFL $RPM_BUILD_ROOT %{wxpref}/lib >> FILELIST
$GFL $RPM_BUILD_ROOT "%{wxpref}/lib/libwx*" >> FILELIST # $GFL $RPM_BUILD_ROOT "%{wxpref}/lib/libwx*" >> FILELIST
$GFL -r $RPM_BUILD_ROOT %{wxpref}/share >> FILELIST # $GFL -r $RPM_BUILD_ROOT %{wxpref}/share >> FILELIST
###GFL -r $RPM_BUILD_ROOT %{_iconsdir} >> FILELIST # ###GFL -r $RPM_BUILD_ROOT %{_iconsdir} >> FILELIST
##$GFL -r $RPM_BUILD_ROOT %{_menudir} >> FILELIST # ##$GFL -r $RPM_BUILD_ROOT %{_menudir} >> FILELIST
$GFL $RPM_BUILD_ROOT %{wxpref}/include > DEVELLIST # $GFL $RPM_BUILD_ROOT %{wxpref}/include > DEVELLIST
$GFL -r $RPM_BUILD_ROOT %{wxpref}/include/wx >> DEVELLIST # $GFL -r $RPM_BUILD_ROOT %{wxpref}/include/wx >> DEVELLIST
$GFL -r $RPM_BUILD_ROOT %{wxpref}/lib/wx >> DEVELLIST # $GFL -r $RPM_BUILD_ROOT %{wxpref}/lib/wx >> DEVELLIST
$GFL $RPM_BUILD_ROOT %{wxconfigname} >> DEVELLIST # $GFL $RPM_BUILD_ROOT %{wxconfigname} >> DEVELLIST
$GFL $RPM_BUILD_ROOT %{wxpref}/bin/wx-config >> DEVELLIST # $GFL $RPM_BUILD_ROOT %{wxpref}/bin/wx-config >> DEVELLIST
#---------------------------------------------------------------- #----------------------------------------------------------------
@ -291,21 +314,29 @@ if [ -e %{wxprefbase} ]; then
fi fi
#---------------------------------------------------------------- #----------------------------------------------------------------
%clean #%clean
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT #[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
#---------------------------------------------------------------- #----------------------------------------------------------------
%files -f FILELIST %files
%defattr(-,root,root) %defattr(-,root,root)
%doc docs/preamble.txt docs/licence.txt docs/readme.txt docs/changes.txt %doc docs/preamble.txt docs/licence.txt docs/lgpl.txt docs/readme.txt docs/changes.txt
%doc wxPython/README.txt wxPython/CHANGES.txt
%doc wxPython/docs/* %doc wxPython/docs/*
%{_bindir}/*
%{_libdir}/python%{pyver}/site-packages/*
%{wxpref}/lib/libwx*
%{wxpref}/share
%{wxprefbase}
%files -n wxPython%{port}-devel -f DEVELLIST
%files -n wxPython%{port}-devel
%defattr(-,root,root) %defattr(-,root,root)
%{wxpref}/include
%{wxpref}/lib/wx
%{wxconfigname}
%{wxpref}/bin/wx-config
#---------------------------------------------------------------- #----------------------------------------------------------------
# end of file # end of file