The challenge is to create productive work for these people so that they can earn an income. Some of the Chinese 'make work' projects have been interesting in that regard but they are not a final solution.
What might be a more durable system would be to create a manufacturing plant that these folks could work in. It doesn't have to be complex, could be as simple as making cinder block for building construction. It has to be run as a business in the sense that standards are set and checked and people are paid based on their production. You have to be rigidly scrupulous about keeping corruption out of it, this is a lot harder than you estimate. Ideally the production is consumed in other projects. (like building buildings or railroads or other factories).