To do this you will need a tape measure a brake flaring tool, some steel brake line, whatever fittings you need for your application, a tool to cut your brake line to length, and some sort of oil substance to use for lube.
One piece of the flaring tool
Other piece of flaring tool
The brake line
Brake fittings
Small tube cutter
Wd-40 for lubrication.
Use a tape measure to see how long of a line you need and cut your line to length. Next slide your fitting on your brake line and put the line in the correct size hole on the flaring tool. The different sizes should be labeled on the tool. When you tighten the brake line in the tool, stick the line about 1/8" up to get a proper flare.
Put the second piece of the tool as pictured above with the tip of the cone in the hole of the brake line. Now start to tighten just barely, then loosen again. Spray the tip with the wd-40 to avoid splitting the line. Repeat this process until you have a proper flare.
Hopefully you flared it correctly and you have no issues with your brakes leaking.