What you need to do is determine the required caliper piston area (volume). The rear has smaller disc then the front, as I remember. So the rear caliper has a smaller area than the front. If you have a speedmaster don't forget you have two calipers in the front. Next you be to get a rear brake master cylinder assly. with the correct bore size to feed caliper area. I see here they have different "master cylinders" and a proportion valves.
Keep in mind that I am not a motorcycle mechanic and have not done this. I would think getting the proporting correct would be the hard part