Don't use --inplace any longer.

Move the building of the .mo files to the tarfile rather than the RPM
Add the wxrc tool to the RPM.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19323 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2003-02-26 05:02:21 +00:00
parent 4c1916e923
commit ee4ae17a72
2 changed files with 44 additions and 7 deletions

View File

@@ -135,7 +135,7 @@ if [ -z "${skipcvs}" ]; then
exit 1
fi
echo "*** Removing unneeded stuff from CVS tree"
echo "*** Removing uneeded stuff from CVS tree"
pushd ${tarver} > /dev/null
rm `find . -name .cvsignore`
rm *.spec
@@ -173,10 +173,16 @@ cp ${distdir}/wxPython${port}.spec ${builddir}/${tarver}/wxPython${port}.spec
# Build the tar file
if [ -z "${skiptar}" ]; then
echo "*** Creating language catalogs..."
pushd ${builddir}/${tarver}/locale > /dev/null
make allmo
popd > /dev/null
echo "*** Creating tarball..."
cp distrib/README.1st.txt ${builddir}/${tarver}
pushd ${builddir} > /dev/null
tar cvf ${distdir}/${tarver}.tar ${tarver} > /dev/null
echo "*** Compressing..."
if [ -e ${distdir}/${tarver}.tar.gz ]; then
rm ${distdir}/${tarver}.tar.gz

View File

@@ -7,7 +7,7 @@
%define tarname @TARNAME@
%define version @VERSION@
%define ver2 @VER2@
%define release 2
%define release 1
%define wxpref %{pref}/lib/wxPython
%define name wxPython%{port}-py%{pyver}
@@ -115,8 +115,7 @@ $WXDIR/configure --with-%{lcport} \
# Build wxWindows
$MAKE
cd $WXDIR/locale
make allmo
# Now build wxPython
cd $WXDIR/wxPython
@@ -125,9 +124,35 @@ cd $WXDIR/wxPython
NO_SCRIPTS=1 \
WXPORT=%{lcport} \
UNICODE=%{unicode} \
WX_CONFIG="$WXDIR/build/wx-config --inplace --prefix=$RPM_BUILD_ROOT%{wxpref}" \
WX_CONFIG="$WXDIR/build/wx-config --prefix=$WXDIR --exec-prefix=$WXDIR/build" \
build
## WX_CONFIG="$WXDIR/build/wx-config --inplace --prefix=$RPM_BUILD_ROOT%{wxpref}" \
# Build wxrc (XRC resource tool) but don't use the makefiles since they expect
# a shared version of the xrc lib to have been built...
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/*.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
# the handlers are not needed
rm xh_*.o xmlrsall.o
$wCXX `$WX_CONFIG --libs` *.o -o wxrc
strip wxrc
#----------------------------------------------------------------
%install
@@ -154,7 +179,9 @@ cd $WXDIR/wxPython
# the real python pathname. Since some distros install python 2.2 as
# python2 and others as python, then I can't let distutils do that
# otherwise the dependencies will be fouled up. Copy them manually
# instead, leaving the #!/bin/env line intact:
# instead, leaving the #!/bin/env line intact.
#
# TODO: Should this be dependent on %{builtin_libs} or something like it?
mkdir -p $RPM_BUILD_ROOT/usr/bin
for s in \
@@ -165,10 +192,14 @@ for s in \
pycrust \
pyshell \
xrced; do
cp scripts/$s $RPM_BUILD_ROOT/usr/bin
cp scripts/$s $RPM_BUILD_ROOT/%{pref}/bin
done
# Install wxrc
cp $WXDIR/contrib/utils/wxrc/wxrc $RPM_BUILD_ROOT/%{pref}/bin
# Generate the filelists. For some reason the %defattr below is still
# resulting in many (but not all) files not owned by root when just
# specifying directories and wildcards to be included in each package.