London-based Silverapples Media and Dublin-based Screenworks Film & TV have optioned feature film and documentary rights for Gavin Bain's as yet unpublished autobiographical California Schemin'.

Trainspotting author Irvine Welsh and his screenwriting partner Dean Cavanagh have been commissioned to adapt the book for the big screen, under the working title Porcupine.

Porcupine is due to go into production in 2009/2010.

After a protracted bidding war, California Schemin' will be published by Simon & Schuster in 2009.

It tells the extraordinary true story of how Bain, a 27year-old from Scotland, spent five years pretending to be a Californian rapper called Brains McLoud in order to get a record contract.

Avril McRory of Silverapples Media and Paul Duane of Screenworks Film & TV worked together previously in acquiring the TV rights to Belle de Jour's blog, and oversaw its adaptation into the series, Secret Diary of a Call Girl , which ran on ITV (UK) and Showtime (US) with great success.

McRory and Duane said, 'We are thrilled to be working with Irvine and Dean on this project. We love Gavin's story and were delighted to discover that these two fantastic writers were not only equally inspired by his extraordinary life but had actually been actively looking for a film story based in the mad bad world of contemporary music. Irvine and Dean believe they were born to write this film and we believe we were born to produce it.'