Courtesy AP

What better way to spend those hard-earned tax dollars?

More than one out of every five dollars of the $126 million Massachusetts is receiving in earmarks from a $410 billion federal spending package is going to help preserve the legacy of the Kennedys.

The bill includes $5.8 million for the planning and design of a building to house a new Edward M. Kennedy Institute for the Senate. The funding may also help support an endowment for the institute.

The bill also includes $22 million to expand facilities at the John F. Kennedy Presidential Library & Museum and $5 million more for a new gateway to the Boston Harbor Islands on the Rose Kennedy Greenway, a park system in downtown Boston named after Kennedy’s mother and built on land opened up by the Big Dig highway project.

The billions in earmarks in the federal spending bill have been a source of contention.President Barack Obama signed the bill which he described as imperfect. He said it must signal an “end to the old way of doing business.”

Critics led by Republican Sen. John McCain have denounced the 8,000 pet projects contained in the bill as pork.

Somehow they missed the Chappaquiddick Memorial.