Well... the shader you posted looks pretty complicated.
I'm sorry but I don't understand enough of it to do the changes to make It work with spotlights.
But I'm working on my own lighting shader (Which looks imo much better than the engine standart-lighting) for about a week.
At the moment it supports
sunlight, normal maps, up to 7 lights (including the sun), diffuse lighting, specular lighting and a kind of fog.
I'm now about to work on the spotlight-part (diffuse already works, but I've go problems with specular reflections)
So... If you want to I'll share it with you if its finished.
Kartoffel