Author: jfrederic.clere(a)jboss.com
Date: 2007-12-11 03:37:44 -0500 (Tue, 11 Dec 2007)
New Revision: 1167
Modified:
trunk/build/unix/buildsrc.rhel-httpd.sh
Log:
Arrange the sources location.
Modified: trunk/build/unix/buildsrc.rhel-httpd.sh
===================================================================
--- trunk/build/unix/buildsrc.rhel-httpd.sh 2007-12-10 18:36:56 UTC (rev 1166)
+++ trunk/build/unix/buildsrc.rhel-httpd.sh 2007-12-11 08:37:44 UTC (rev 1167)
@@ -49,25 +49,34 @@
# XXX: fix it to get 2_2_3-11_el5 into 2.2.3-11_el5.
native_ext="$tag"
fi
+
+rhel_loc=${native_dist}/srclib
+mkdir -p ${rhel_loc}/httpd
echo "Doing cvs -d ${cvsloc} export ${native_tag_opt} httpd/RHEL-5"
cvs -d ${cvsloc} export ${native_tag_opt} httpd/RHEL-5
+mv httpd/RHEL-5 ${rhel_loc}/httpd
+rhel_loc=${native_dist}/srclib/httpd/RHEL-5
+
# download something like:
#
http://cvs.devel.redhat.com/repo/dist/httpd/httpd-2.2.3.tar.gz/f72ffb176e...
-fname=`cat httpd/RHEL-5/sources | awk '{ print $2 }'`
-dir=`cat httpd/RHEL-5/sources | awk '{ print $1 }'`
+fname=`cat ${rhel_loc}/sources | awk '{ print $2 }'`
+dir=`cat ${rhel_loc}/sources | awk '{ print $1 }'`
wget --tries=0 --retry-connrefused
http://cvs.devel.redhat.com/repo/dist/httpd/${fname}/${dir}/${fname}
gunzip -c ${fname} | tar -xf -
dirsources=`gunzip -c ${fname} | tar -tf - | head -1 | awk '{ print $1 }'`
+mv ${dirsources} ${native_dist}/srclib
+dirsources=${native_dist}/srclib/${dirsources}
#
# Read the patches list and apply them
-WHERE=`pwd`
-grep ^%patch httpd/RHEL-5/httpd.spec | sed 's:%:@:' | sed 's: :@ :' | awk
' { print $1 " " $2 } ' > patch.cmd
-grep ^Patch httpd/RHEL-5/httpd.spec | sed 's:^Patch:@patch:' | sed
's/:/@/' | awk ' { print "s:" $1 ": patch -i @DIR@" $2
":" } ' > patch.files
-sed -f patch.files patch.cmd | sed "s:@DIR@:${WHERE}/httpd/RHEL-5/:" >
patch.sh
+WHERE=${native_dist}/tools
+mkdir -p ${WHERE}
+grep ^%patch ${rhel_loc}/httpd.spec | sed 's:%:@:' | sed 's: :@ :' | awk
' { print $1 " " $2 } ' > ${WHERE}/patch.cmd
+grep ^Patch ${rhel_loc}/httpd.spec | sed 's:^Patch:@patch:' | sed
's/:/@/' | awk ' { print "s:" $1 ": patch -i @DIR@" $2
":" } ' > ${WHERE}/patch.files
+sed -f ${WHERE}/patch.files ${WHERE}/patch.cmd | sed "s:@DIR@:${rhel_loc}/:"
> ${WHERE}/patch.sh
echo "Applying the rhel patches to ${dirsources}"
-chmod a+x patch.sh
+chmod a+x ${WHERE}/patch.sh
(cd ${dirsources}
- ../patch.sh
+ ${WHERE}/patch.sh
)