The Xorg chapter has a lot of work to do. So using that template of bash commands for those five large groups of files is very helpful (essential, for me).
I only wanted to add that the example in the book, and that you posted, can be used almost "as is" for the Xorg Protocol Headers group. If you...
1. Change directories in your terminal to your /xc directory
2. Copy the .wget and .md5 files for the proto group to that directory
3. Change
<proto> in the template to
proto (get rid of the brackets)
...then you can paste the whole thing into the terminal, execute it, and things will happen.
The template also will work "as is" for the Xorg Fonts group since its build commands are the same as proto's. Only, change
section=proto to
section=font and copy the .wget and .md5 files for the fonts group to the /xc directory.
For the other three groups (Xorg Libraries, Xorg Applications, Xorg Drivers), you have to substitute their more complex build commands in place of the ones in the template. Example for Xorg Libraries...
Code:
bash -e #exit on all errors
section=lib
version=7.6-2
mkdir $section
cd $section
# download and check packages
grep -v '^#' ../${section}-${version}.wget | wget -i- -c \
-B http://xorg.freedesktop.org/releases/individual/${section}/
md5sum -c ../${section}-${version}.md5
# build packages
for package in $(grep -v '^#' ../${section}-${version}.wget)
do
packagedir=$(echo $package | sed 's/.tar.bz2//')
tar -xf $package
cd $packagedir
case $(basename "$PWD") in
libXfont-[0-9]* )
./configure $XORG_CONFIG --disable-devel-docs
;;
libXt-[0-9]* )
./configure $XORG_CONFIG \
--with-appdefaultdir=/etc/X11/app-defaults
;;
* )
./configure $XORG_CONFIG
;;
esac &&
make
make install &&
ldconfig
cd ..
rm -rf $packagedir
done 2>&1 | tee -a ../xorg-${section}-compile.log #log the entire loop
And so on for Xorg Applications and Xorg Drivers which also have different and complex build commands. So summarizing, you only need to change the section variable and the build commands in the command template for each of the five groups. I like to "fix up" the template for each section in a text editor and then paste it from there into the terminal. This is how I do this anyway. Considering the number of files being installed, it's worth the effort.
P.S.: A new bash shell is started by these, so remember to exit the shell when each one is done (exit).