This question definitely came up as we have a shaman, a cryomancer and a pyromancer in the party and until recently we did a lot of seafaring.
We decided that a fireball could be aimed at something on the deck, like the hull or an NPC or at the hull of the ship itself. cast at the hull of the ship itself, we'd use the normal damage rule described above. if the fireball targeted something on the deck, like an NPC or the mast, this would not damage the hull points of the ship but could do all sorts of other things like knock down the mast, bring down the rigging, set the hull or cargo aflame, etc.
Our party was particularly proud of an encounter with a pirate junk in the Lemurian Remnant where the unknowing pirate ship was hammered with a lighting bolt at the mast and a fireball at the crew.