flatten tube and place a flange on the flatten section.

Hi I have a project where I need to flatten the end of a 2" .05 wall tube and place a flange on the flatten section. How would I go about that ?

Thanks