This Old House - Installing Outdoor Light Fixtures> 1. First, cut a block to size out of ½ wood trim or, even better, no-rot cellular PVC. I like to size my blocks
Repair An Outdoor Light Fixture
Do Outdoor Lights Need A Junction Box? - LED & Lighting Info
11 Types of Electrical Boxes and How to Choose One
Outdoor Garage Lights: Learn to Install Them in 8 Steps - This Old House
lighting - Do I need an outlet box to install an outdoor light fixture? - Home Improvement Stack Exchange
Electrical box for exterior light fixture? - GreenBuildingAdvisor