A federal judge gave his final approval Thursday to a $42.6 million class-action settlement between companies that made and installed government-issued trailers after hurricanes in 2005 and Gulf Coast storm victims who claim they were exposed to hazardous fumes in the shelters. Judge Kurt D. Engelhardt of Federal District Court ruled after hearing from lawyers who brokered a deal resolving nearly all remaining court claims over formaldehyde in trailers provided by the Federal Emergency Management Agency following Hurricanes Katrina and Rita. Roughly 55,000 residents of Louisiana, Mississippi, Alabama and Texas will be eligible for shares of the $37.5 million paid by more than two dozen manufacturers. They also can get shares of a separate $5.1 million settlement with FEMA contractors who installed and maintained the units.