I own a circa 1950's brick rowhouse in Baltimore. The house originally had a wooden rear door that swelled in the summer time. My friend broke that door and offered to install a new one. He bought a standard pre-hung door, but when he ripped out the old one he realized that there are no studs onto which to affix the door - just a jagged brick edge. He rigged the door on there, but of course 3 years later the door is loose and bugs are getting in.

Does anyone have any suggestions as to how to anchor a door frame properly onto the brick frame so that it will stay put indefinitely?