In the trunk is the best place (as far as longest life is concerned) for a battery, like others have said, lower temps, and more stable temps. Stable temps is a very good point because you don't want temperature differentials within the battery it's self, as this leads to uneven charging (under charging some cells and over charging and over heating of some cells).
If a guy were to purchase a high quality pure lead AGM battery ie. Odyssey battery, or other rebranded Odyssey: Motomaster Eliminator Ultra XD, or DieHard Platinum, or Northstar Battery, just a few, all the same manufacturer... anyways, best starter batteries you can buy, throw them in your trunk with good quality heavy conductors to the front. This is a very reliable, very powerful, and long lasting setup. Amazing extreme cold starting performance, and would be impervious to the heat of summer. 10 years guaranteed.