Best/cheapest way to cheaply get a 5-bit DAC: R-2R, or R = 2^N
If it were me I would use an IC to do the DAC for me. The manufactures of the ICs take a lot of time and consideration for getting matched components and put them in the best configuration.

The TC1320EOA is probably a good solution for what you want. It has I2C and in an 8pin SOIC configuration. I bet you will be hard pressed to get a design this small if you take into account the traces from your micro as well as the resistors and possibly smoothing caps and such. It has 8 bits of resolution, which is more then you need, but I wouldn't think this would be an issue. I also think the cost of it will be fairly equal if you account for the more pins needed on your micro for a home brewed solution and the PCB space required.