Donald Trump has endorsed a spending deal negotiated by US Senate Republicans and Democrats that would stave off a government shutdown and temporarily fund the Department of Homeland Security.