Here is a patch for the openfires debian build system. I changes two things:
Only set JAVA_HOME if it's not already set in debian/rules
Added dependencies for openjdk
The first change is important as currently JAVA_HOME get's always set to java-1.5.0-sun. Now you can build an openfire debian package with openjdk by issuing
I was able to build openfire this way. But of course the change from SUN's jdk to openjdk needs some testing.