Add a hack to make rpms of mozilla on the fly straight in the cvs tree.

Change the version number to 666 to make marketing happy.
a=waterson@mozilla.org, r=mcafee@netscape.com


git-svn-id: svn://10.0.0.236/trunk@61349 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
ramiro%fateware.com
2000-02-19 02:38:31 +00:00
parent 744a9edd0b
commit 39e1745d6a
2 changed files with 131 additions and 5 deletions

View File

@@ -0,0 +1,125 @@
#!/bin/sh
# A hack to make mozilla rpms in place.
here=`pwd`
if [ ! -d ./mozilla ]
then
printf "\n\nDude, you have to be on the root of the mozilla cvs tree.\n\n"
exit 1
fi
rpm_place=$here/rpm_on_demand_dir
rm -rf $rpm_place
mkdir -p $rpm_place
mkdir -p $rpm_place/tarball
mkdir -p $rpm_place/home
mkdir -p $rpm_place/topdir
mkdir -p $rpm_place/topdir/BUILD
mkdir -p $rpm_place/topdir/RPMS
mkdir -p $rpm_place/topdir/RPMS/i386
mkdir -p $rpm_place/topdir/RPMS/noarch
mkdir -p $rpm_place/topdir/SOURCES
mkdir -p $rpm_place/topdir/SPECS
mkdir -p $rpm_place/topdir/SRPMS
_top_dir=$rpm_place/topdir
_spec_dir=$_top_dir/SPECS
_sources_dir=$_top_dir/SOURCES
_rpms_dir=$_top_dir/RPMS
_home=$rpm_place/home
_rpm_macros=$_home/.rpmmacros
_tarball_dir=$rpm_place/tarball
#_spec_file=$here/build/package/rpm/mozilla.spec
##
## Setup a phony topdir for the phony rpm macros file
##
echo "%_topdir $_top_dir" >> $_rpm_macros
##
## Make a tarball of the beast
##
cd $_tarball_dir
cvs co mozilla/client.mk
make -f mozilla/client.mk pull_all
tar vzcf mozilla-source.tar.gz mozilla
#XXXX YANK
#cp /tmp/mozilla-source.tar.gz .
#XXXX YANK
tarball=`/bin/ls -1 mozilla*.tar.gz | head -1`
if [ ! -f $tarball ]
then
printf "\n\nDude, failed to make mozilla tarball.\n\n"
exit 1
fi
# Put the tarball in the SOURCES dir
mv -f $tarball $_sources_dir
printf "\n\nMozilla tarball = %s\n\n" $_sources_dir/$tarball
# Find the spec file from the rpm
spec_in_rpm=`tar tzvf $_sources_dir/$tarball |grep -w "mozilla\.spec$" | awk '{ print $6; }'`
printf "\n\nspec_in_rpm=%s\n\n" $spec_in_rpm
# Extract the spec file from the tarball
spec_in_rpm_dir=`echo $spec_in_rpm | awk -F"/" '{ print $1; }'`
printf "\n\nspec_in_rpm_dir=%s\n\n" $spec_in_rpm_dir
tar zvxf $_sources_dir/$tarball $spec_in_rpm
#_spec_file=`/bin/ls -1 $spec_in_rpm_dir | grep "\.spec$" | head -1`
#printf "\n\n_spec_file=%s\n\n" $_spec_file
if [ ! -f $spec_in_rpm ]
then
printf "\n\nFailed to extract spec file from tarball.\n\n"
exit 1
fi
# Put the spec file in SPECS
#cp $spec_in_rpm $_spec_dir
#XXXX YANK
cp /tmp/mozilla.spec $_spec_dir
#XXXX YANK
HOME=$_home rpm -ba $_spec_dir/mozilla.spec # > /dev/null 2>&1
if [ $? -eq 0 ]
then
mkdir -p $rpm_place/RPMS
cp $_rpms_dir/i386/*.rpm $rpm_place/RPMS/
last=`/bin/ls -lt1 $rpm_place/RPMS|head -1`
echo "New RPM written to RPMS/$last"
else
echo "Failed to build the rpm. Check the spec file."
fi
echo
cd $rpm_place
# Cleanup
rm -rf $rpm_place/topdir $rpm_place/home

View File

@@ -1,6 +1,6 @@
Summary: Mozilla and stuff
Name: mozilla
Version: 5.0
Version: 666
Release: 0
Serial: 0
Copyright: NPL/MPL
@@ -241,13 +241,14 @@ then
###
###
rm -f $here/blank
touch $here/blank
MOZCONFIG=blank
export MOZCONFIG
./configure --disable-tests --with-xlib=no --with-motif=no --disable-gtk-mozilla
#./configure --disable-debug --enable-optimize --disable-mailnews --disable-tests --with-xlib=no --with-motif=no --enable-strip-libs --disable-gtk-mozilla
./configure --disable-tests --with-xlib=no --with-motif=no --enable-strip-libs --disable-debug --enable-optimize --disable-gtk-mozilla
make
@@ -263,6 +264,7 @@ mkdir -p $RPM_BUILD_ROOT/%{prefix}/lib/mozilla/plugins
#
################################
here=`pwd`
mkdir -p $here/file-lists
cd build/package/rpm
@@ -368,7 +370,6 @@ rm -rf $RPM_BUILD_ROOT
%files -f file-lists/mozilla-xptoolkit-file-list.txt xptoolkit
%defattr(-,root,root)
%{prefix}/lib/mozilla/bin/mozilla
%files -f file-lists/mozilla-xptoolkit-devel-file-list.txt xptoolkit-devel
%defattr(-,root,root)