Could you be more specific about what you actually want the cleric to do? There's no such thing as "the ultimate build" for anything (besides Pun Pun, which definitely won't be allowed) because there's so much that's possible.
What exactly is the role you want this cleric to fulfill?
We could certainly use more information here, but World's Largest Dungeon, starting at level 1, is enough to start tossing out some advice.
I've heard WLD gives you almost no opportunities to buy magic items. So being able to craft your own might be worthwhile. Being able to survive without them is also pretty much a necessity, but luckily clerics excel at that. I'd suggest worshiping Boccob, being true neutral, and planning to use Animate Dead on every worthwhile enemy you encounter (plus just some low HD "Mooks" to use for trap springing, drawing out ambushes, etc).
Take Magic as one of your domains, so you can use any "wizard" magic items you happen to get (especially if the party doesn't have a sorcerer or wizard). The Spell domain might also be useful, so you can use spellbooks (and also craft items requiring specific arcane spells, perhaps, by using Anyspell). I'd go Cloistered Cleric as well for the skill points, and perhaps trade in the Knowledge domain for Knowledge Devotion if you actually plan to fight yourself. Alternatively, if you would rather just summon things, you might see about trading that in for something else, like the Divine Magician ACF.