I split the Deferred Shading sample in a sample and a plugin. However, I could not thoroughly test it. I only use Ogre on WinXP, static-linked. There it worked.
Also I couldn't figure out how to handle the installation of the deferredshading resources.
Finally, I wasn't sure about the license. I just copied the notice that was used for the sample, but don't know if that was the right setup.
So this patch requires some more looking at, but I at least made a big with it.