From 39e1745d6ace2fd5f3a0287e32dd4df5201d321d Mon Sep 17 00:00:00 2001 From: "ramiro%fateware.com" Date: Sat, 19 Feb 2000 02:38:31 +0000 Subject: [PATCH] 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 --- mozilla/build/package/rpm/make-rpm.sh | 125 +++++++++++++++++++++++++ mozilla/build/package/rpm/mozilla.spec | 11 ++- 2 files changed, 131 insertions(+), 5 deletions(-) create mode 100755 mozilla/build/package/rpm/make-rpm.sh diff --git a/mozilla/build/package/rpm/make-rpm.sh b/mozilla/build/package/rpm/make-rpm.sh new file mode 100755 index 00000000000..cf7d3c7a83a --- /dev/null +++ b/mozilla/build/package/rpm/make-rpm.sh @@ -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 diff --git a/mozilla/build/package/rpm/mozilla.spec b/mozilla/build/package/rpm/mozilla.spec index 46e8de97db9..f959c16491f 100644 --- a/mozilla/build/package/rpm/mozilla.spec +++ b/mozilla/build/package/rpm/mozilla.spec @@ -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)