With a cockerel, you have to stop aggressive behavior BEFORE he starts attacking humans. They always test you first, before outright attacking.
You can TRY chasing him around the yard and squawking and flapping your arms and then catching him and holding him down in the dirt until he stops struggling the next time he attacks you, but I wouldn't have much hope of this working since his behavior is already firmly entrenched.
Personally, I'd cull the bird. There are so many wonderful, sweet roosters that are culled every day for the simple reason that people can't keep all the roosters that are out there. Why give a good home to a bird that is dangerous when you can find a bird that would have been killed for no fault of his own and save his life?