Then following drogons posts on the following link add the ace dude and arduino IDE software. Ignore the bit about connecting the pins on the gertboard as this is all done with the jumpers, these can also stay in place after programming the chip although taking out sclk mosi and miso means you can then use these pins.
Here are the three links to follow:
Once done choose the arduino 328 with gpio for board and the programmer bring raspberrypi gpio.
Providing you have already run avrdude as per link above (and selected option 1) and have chosen the board and programmer you can now attach the led to pb5 and gnd open up blink, compile and upload and if all successful should blink on and off.
Of course I have tried programming arduino s in the past, however wasn't very successful. But thanks to Alex at raspio I have been able to write the above with information he has provided and hopefully will be useful to many others.