Recent versions of Arduino support custom boards by adding URL of json with package and in this way you can put address https://github.com/Optiboot/optiboot/releases/download/v6.2/package_optiboot_optiboot-additional_index.json and get the optiboot bootloaders BUT if want to use Atmega8 (at moment of writing this post) you will receive error because of avrdude command line has declared extended_fuses which do not exist in Atmega8. This is the first problem. Second problem is that you need to compile optiboot for Atmega8 for your own because it is not in the package.
I solved both problems and made a rar file which you need only to extract to Arduino’s sketch folder. hardware.rar
It is tested with Arduino 1.6.6
UPDATE: I found fork of optiboot repository with good support for Atmega8 and working fine with latest Arduino IDE. See this page: https://github.com/sleemanj/optiboot