The routing of the rear brake lines looks completely illogical, but is probably due to factory assembly procedures. They run from above the transmission, down to the rear of the differential and then back again across the rear subframe. By re-routing the brake lines, the driveline can be removed and reinstalled without touching the brake lines.
To make the correct bubble flares, I used this method: Make a Bubble Flare with a Double Flare Kit
My plan was to straighten and reuse the original brake lines, but my flare kit quickly failed as it couldn't handle the hard steel. I can't spend a fortune on a tool I'll use once, so with "Made in China" the only option is nickel copper brake lines, which are softer and easier to form.
I used a steel wire to make a template. This templates on both sides, but the length of the top section depends on how you bend the brake lines in the car (click on the picture to enlarge). All measurements are outside.
Funny side note: I had initially ordered a set of prefabricated brake lines, at a length which would fit the purpose. This is what happens when you get the units mixed up. "cm" vs "mm". My brain didn't find it logical that "mm" was the applied unit.