How to evenly unwrap / texture long extruded objects with folds and uneven segments?
First step:

See the different values under "Scale" on the right side?
Your model is stretched in different directions.



for unwrapping to work correctly, apply the scale (the numbers for x,y and z should all be 1).
select your object -> ctrl+a -> Apply Scale



Next

As you don't care about the blue backside, create a seam on the outside of the blue Part.
alt+shift+rmb might help a lot in edge select mode (shift+tab).



If you unwrap now, the image will still be distorted. so we need to add one more little step:

We need to create seems in every corner. You don't need to go all the way to the bottom though – only as long as the tilted faces on the top go. This way your texture is continuous all the way through (you might or might not want that – if you don't, extend the seams to the bottom).



now select everything -> u -> unwrap

depending on the project i often get better results if I change the unwrapping method to "conformal" on the left panel.



The final UV in the Image Editor (The blue backsides on the bottom aren't 100% straight, but you don't care, right?):



And the Object in Material View:






Let me know, if you have any questions.