You can find build instructions for many packages
here. There are 32-bit and 64-bit build instructions. There are about 700 packages represented.
There is essentially no difference in the commands used to build 32- and 64-bit pacakges. The CFLAGS and/or CXXFLAGS will be different; you need to pass -m32 for 32-bit and -m64 for 64-bit. The PKG_CONFIG_PATH environment variable should be set to use the location of the 32-bit or 64-bit metadata files (*.pc files). If you don't, pkgconfig will look in */lib/pkgconfig and find 32-bit libraries. These will obviously not work for a 64-bit build.
For example, the configure script might be executed as follows for a 32- or 64-bit build respectively:
Code:
-- for the 32-bit build --
CC="gcc -m32 -O2 -pipe -march=athlon64 -mtune=athlon64" \
PKG_CONFIG_PATH="/usr/lib/pkgconfig:/opt/gnome/lib" \
./configure --prefix=/usr
-- or for the 64-bit build --
CC="gcc -m64 -O2 -pipe -march=athlon64 -mtune=athlon64" \
PKG_CONFIG_PATH="/usr/lib64/pkgconfig:/opt/gnome/lib64" \
./configure --prefix=/usr --libdir=/usr/lib64