To clarify things, the version currently on Debian lenny is 5.0.51, this DOES have the 4GB limit mentioned in the previous post, what you need is 5.0.52+ (See previous post)
To get that on debian lenny, You do not need to recompile or compile anything
Add the line below to your /etc/apt/sources.list
deb http://backports.debian.org/debian-backports lenny-backports main
apt-get update
apt-get -t lenny-backports install mysql-server-5.1
This should have you running with a key_buffer of any size you wish that your ram permits, and to overcome the 4GB limit on the MyISAM key buffer
Happy Databasing