I've done it in the recent past. I added the following to the boards.txt file:
##############################################################
atmega8u.name=ATMEGA8
atmega8u.upload.protocol=arduino
atmega8u.upload.maximum_size=7680
atmega8u.upload.speed=115200
atmega8u.bootloader.low_fuses=0xff
atmega8u.bootloader.high_fuses=0xcc
atmega8u.bootloader.path=optiboot
atmega8u.bootloader.file=optiboot_atmega8.hex
atmega8u.bootloader.unlock_bits=0x3F
atmega8u.bootloader.lock_bits=0x0F
atmega8u.build.mcu=atmega8
atmega8u.build.f_cpu=16000000L
atmega8u.build.core=arduino
atmega8u.build.variant=standard
##############################################################
The only other trick is to get a programmer or another Adruino board that you can use as a programmer. I've had success with the parallel programmer described elsewhere on this site, it is a lot cheaper than the commercial programmers. Of course it will only work if your PC has a parallel port. A USB type programmer is a bit easier to work with though.