I would think -- but this is for the moment a thought, not meant as an authoritative answer -- that every notion of cohomology whatsoever has a relative version in this sense.
I am thinking here of the general abstract definition of cohomology as exposed at nLab:cohomology. This includes in particular the special case of sheaf cohomology as described there in some detail.
What I expect the fully general notion of relative cohomology from this point of view to be I have now briefly indicated at relative cohomology. I'd believe this does in particular reproduce the definition given in Emerton's answer.